5.6.2 SNMP Configuration In Alertmanager IDIH
SNMP Configuration
In the following command, provide valid ip and port in docker compose file
snmp_notifier:
image: occnidih-docker.dockerhub-iad.oci.oraclecorp.com/snmp-notifier:v1.5.0
privileged: true
volumes:
- ./snmp/:/templates/
command:
- "--snmp.trap-description-template=/templates/description-template.tpl"
- "--snmp.extra-field-template=4=/templates/extra-field-4-template.tpl"
- "--snmp.extra-field-template=5=/templates/extra-field-5-template.tpl"
- "--snmp.extra-field-template=6=/templates/extra-field-6-template.tpl"
- "--snmp.destination=[ip]:[port]"
- "--snmp.retries=2"
- "--snmp.timeout=5s"
ports:
- "0.0.0.0:9464:9464"
logging:
options:
max-size: "10m" # Limits each log file to 10 MB
max-file: "3" # Retains up to 3 rotated log files
networks:
- cnidih-network
Update the alertmanager.yaml
to ensure snmp is configured appropriately
for sending data to respective NMS.
global:
resolve_timeout: 5m
receivers:
- name: default-receiver
webhook_configs:
- url: http://snmp_notifier:9464/alerts
- name: alarmmanagement-receiver
webhook_configs:
# below line is for non tls
- url: 'http://alarmmanagement:8092/api/cnidih/alarmmanagement/v1/alarms'
# below four lines is for tls
#- url: 'https://alarmmanagement:8092/api/cnidih/alarmmanagement/v1/alarms'
# http_config:
# tls_config:
# insecure_skip_verify: true
route:
group_by:
- namespace
group_interval: 5m
group_wait: 30s
receiver: default-receiver
repeat_interval: 12h
routes:
- matchers:
- alertname = "Watchdog"
receiver: default-receiver
- matchers:
- app =~ "tdrstorage|ttrdecoder|protrace.*|protraceprocessor|nfconfig.*|nfconfigmanager|protocoldecoder|alarmmanagement|apigateway|cnidihportal|cnidih*|portal*|logauditmanager|logaudit*|usermanagement|kafka-broker|kafka*|zookeeper*"
receiver: alarmmanagement-receiver