Page 1 of 2

Broken Link on Nagios Library - Integrating SNMP Traps with

Posted: Thu Apr 15, 2010 1:00 pm
by metalheat
We are currently trying to implement SNMP traps on our NagiosXI Server for receiving and processing. After searching nagios exchange we found information regarding the integration of SNMP Traps and Nagios XI. Nevertheless the article points out to a documentation that is not currently available on the Nagios Library and appears to be a broken link. Can you please point us out to where we can find this information or post it.


NagiosXI Server version is 2009R1.1G

Exchange info:
http://exchange.nagios.org/directory/Ad ... rd/details

Nagios Library Broken Link:

http://library.nagios.com/library/produ ... -nagios-xi

Re: Broken Link on Nagios Library - Integrating SNMP Traps with

Posted: Thu Apr 15, 2010 1:53 pm
by mmestnik
Ohh, yes you don't want that... or rather what that was.
Attached is current SVN HEAD, not official or supported.

We are just talking about publishing this.

Re: Broken Link on Nagios Library - Integrating SNMP Traps with

Posted: Thu Apr 15, 2010 2:36 pm
by metalheat
mmestnik wrote:Ohh, yes you don't want that... or rather what that was.
Attached is current SVN HEAD, not official or supported.

We are just talking about publishing this.

Mmestnik, thanks for the update, yet the document posted has an .odt file which is missing the images they appear to be broken links also, do you have a local copy of the document with the images?

Thanks again

Re: Broken Link on Nagios Library - Integrating SNMP Traps with

Posted: Thu Apr 15, 2010 3:59 pm
by metalheat
Also, the script halts after restarting snmptrapd. Please see attached file.
snmptrap nagios halt.JPG

Re: Broken Link on Nagios Library - Integrating SNMP Traps with

Posted: Fri Apr 16, 2010 2:36 pm
by mmestnik
The next step reconfigures the firewall, you likely got disconnected? This prints some things b4 doing anything though.
Is /etc/sysconfig/iptables not a file, link, or directory by chance?

My guess is that the service is failing to daemonize properly. This didn't happen in testing, though as I said this is still a WIP that you don't want to try and use.

Re: Broken Link on Nagios Library - Integrating SNMP Traps with

Posted: Sat Apr 17, 2010 11:47 am
by metalheat
We do not use IP Tables on our server. This might be the reason, any other suggestions as to how we can receive SNMP Traps on our Nagios XI Implementation?

Re: Broken Link on Nagios Library - Integrating SNMP Traps with

Posted: Sun Apr 18, 2010 12:58 pm
by tonyyarusso
Do you use something else in place of iptables, and if so, what? Or do you just have no firewall rules at all? Nagios XI itself should have tried to set up some iptables rules during installation, so I'm surprised you didn't have issues before.

Re: Broken Link on Nagios Library - Integrating SNMP Traps with

Posted: Sun Apr 18, 2010 10:15 pm
by mmestnik
These scripts expect a default CentOS/RedHat deployment and the results of our installation script. If you have made other changes to your server then your are responsible for maintaining these changes.

You can remove a few lines of code from our script to that end.

Re: Broken Link on Nagios Library - Integrating SNMP Traps with

Posted: Mon Apr 19, 2010 8:25 am
by metalheat
We do not run IP Tables or any other firewall on our Nagios XI server since it is running on a closed environment. Nevertheless the problem is showing up far before the IP Tables addition, since it happens after restarting the SNMPTRAPD service not the SNMPTT it doesn't even get to create the appropriate folder information for the SNMPTT program. It appears to get stuck when downloading the PERL on the yumperlget function.

Re: Broken Link on Nagios Library - Integrating SNMP Traps with

Posted: Mon Apr 19, 2010 11:12 am
by mmestnik
That's correct, my mistake.
Try having bash trace it's execution, like so:

Code: Select all

( set -x; . <PathToScript, I.E. starts with ./>; )
I prefer copy/past or text attachments over images.

Another simpler test:

Code: Select all

( set -x; # Install prerequisite Perl modules
function yumperlget () {
 yum provides perl"($1)" |
   awk '/^Repo/ { print pkg "\t" $3; next; };
   /^[^ ].* : / { pkg = $1; next; };' |
   # Here we write our guidelines for pkg selection.
   sort -r -n | cut -f1 > /tmp/perl-package-versions
 topver=$(head -n 1 /tmp/perl-package-versions)
 if [ $(wc -l /tmp/perl-package-versions | cut -d\  -f1) -ge 2 ]; then
   for i in $(tail -n +2 /tmp/perl-package-versions); do
     if [ $(rpmdev-vercmp $topver $i | grep -c newer) -ge 1 ]; then
       topver=$(rpmdev-vercmp $topver $i | grep newer | cut -d\  -f1)
     fi
   done
 fi
  yum -qy install $topver
}
yumperlget "SNMP"
yumperlget "Config::IniFiles"
)