Hi,
Need some help here. Have attempted the integration of Nagios Core to a 3rd party tool (TrueSight Operation Manager). It seems however that the traps are not firing as expected. I have added configs as shown below. Any advise?
In commands.cfg I added the below:
# 'send-service-trap' command definition
define command{
command_name send-service-trap
command_line /usr/local/nagios/bin/send-service-trap 10.xxx.24.xxx public "$HOSTNAME$" "$SERVICEDESC$" $SERVICESTATEID$ "$SERVICEOUTPUT$"
}
In /usr/local/nagios/bin/send-service-trap I have:
/usr/sbin/snmptrapd -M /usr/share/snmp/mibs -v 2c -c $2 $1 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "$3" nSvcDesc s "$4" nSvcStateID i $5 nSvcOutput s "$6"
In contacts.cfg I have:
define contact{
contact_name tsom_snmp
use generic-contact
alias TSOM SNMP Integration user
service_notification_period 24x7
host_notification_period 24x7
service_notification_options u,c,r
host_notification_options d,r
service_notification_commands send-service-trap
host_notification_commands send-host-trap
}
define contactgroup{
contactgroup_name tsom_group
alias TSOM Integration
members tsom_snmp
}
In the service definition I have:
define service {
use generic-service
host_name dabxxxxx1p.xxx.com
service_description File System Status - /
check_command check_nrpe!check_root!!!!!!!
max_check_attempts 3
check_interval 10
retry_interval 1
check_period 24x7
process_perf_data 1
contact_groups tsom_group
register 1
}
I have copied the Nagios MIB files to /usr/share/snmp/mibs/ also.
Nagios Core SNMP integration
Re: Nagios Core SNMP integration
Your sending command is using the wrong application.
THe snmptrapd application is a daemon that receives traps and not for sending traps.
The application is called snmptrap ( no d ) and you can use the following example for your command
THe snmptrapd application is a daemon that receives traps and not for sending traps.
The application is called snmptrap ( no d ) and you can use the following example for your command
Code: Select all
/usr/bin/snmptrap -M /usr/share/snmp/mibs -v 2c -c $2 $1 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "$3" nSvcDesc s "$4" nSvcStateID i $5 nSvcOutput s "$6"
Be sure to check out our Knowledgebase for helpful articles and solutions!