Page 1 of 1

Customization of snmptrapsender.inc.php

Posted: Thu Oct 16, 2014 5:49 am
by iptribe
Hi,

i need to have the nSvcNotify trap to contain the following information values.

nHostname
nHostStateID
nSvcGroupName
nSvcLastCheck
nSvcLastChange
nSvcOutput
nSvcDesc
nSvcStateID
nSvcAttempt
nSvcDurationSec
nSvcNotifyType
nSvcNotifyNum
nSvcAckAuthor
nSvcAckComment

i can edit the snmptrapsender.inc.php to contain the variables but how do i get the values? For example, the nSvcHostname is %host%. Where can i get those information?

Thanks.

Re: Customization of snmptrapsender.inc.php

Posted: Thu Oct 16, 2014 4:45 pm
by Nagios Support
Just to give you heads up - we will do some more digging into this and get back to you within the next 24 hours.

Re: Customization of snmptrapsender.inc.php

Posted: Fri Oct 17, 2014 11:05 am
by sreinhardt
To clarify what you are looking for, your nagios system presently sends traps to a remote system. You would like to include additional information in the traps that are sent. Would that be a correct understanding of what you are looking for? If so, this will probably require a fair amount of work on your part. You will need to modify the xi event handler script, snmptrapsender script, and possibly the nagios mibs if those oid's are not included in the trap. Would it be possible to do this through a different method of alerting the remote system something as happened? Reason I ask, is that both of those scripts will be over written upon each update and changes would have to be reapplied.