Hello Team,
We have seen some snmp trap data missing in servicenow. To investigate further we want to capture the SNMP trap data before sending to service now using below command defnition in /usr/local/nagios/etc/commands.cfg
Please let me know if anything missed out in below command definition as we are not able to capture the snmp trap data
define command{
command_name service_trap_command
command_line echo [ 'date' ] /usr/bin/snmptrap -v 2c -c public '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "$HOSTNAME$" n nSvcDesc s "$SERVICEDESC$" nSvcStateID i "$SERVICESTATEID$" nSvcOutput s "$SERVICEOUTPUT$" >> /opt/snmptrap.log
}
SNMP Trap sender issue
Re: SNMP Trap sender issue
You should be using the SNMP Trap Sender component for this as I don't think this will work as expected, are you running this as an event handler or how are you running it?
Please send me a copy of your profile so that we can review how you have this configured, you can download it from Admin > System Profile > Download Profile and upload it to the ticket by clicking the "choose item" link at the bottom of the menu. Make sure to wait until the file is finished uploading before clicking the Post Reply button.
If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:
Then send me the resulting /usr/local/nagiosxi/var/components/profile.zip file.
If the profile script fails, please include the ENTIRE output.
Please send me a copy of your profile so that we can review how you have this configured, you can download it from Admin > System Profile > Download Profile and upload it to the ticket by clicking the "choose item" link at the bottom of the menu. Make sure to wait until the file is finished uploading before clicking the Post Reply button.
If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:
Code: Select all
rm -rf /usr/local/nagiosxi/var/components/profile*
/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh SUPPORT
If the profile script fails, please include the ENTIRE output.