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.
Customization of snmptrapsender.inc.php
- Nagios Support
- Posts: 36
- Joined: Thu Sep 04, 2014 12:16 pm
Re: Customization of snmptrapsender.inc.php
Just to give you heads up - we will do some more digging into this and get back to you within the next 24 hours.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Customization of snmptrapsender.inc.php
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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.