Broken Link on Nagios Library - Integrating SNMP Traps with

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

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

Post by mmestnik »

This script has changed a little since I last read it. As indicated it's still in a pre-release state.
metalheat
Posts: 8
Joined: Tue Feb 02, 2010 12:30 pm

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

Post by metalheat »

Thanks for the fast response. Apparently it is trying to find a newer version of perl and stays there. Here's the trace:

Code: Select all

[root@monitor scripts]# ./NagiosXI-SNMPTrap.sh
Retrieving http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.no
Preparing...                ########################################### [100%]
        package epel-release-5-3.noarch is already installed
Loaded plugins: rhnplugin, security
Setting up Install Process
Package bzr-2.0.3-1.el5.rf.x86_64 already installed and latest version
Package 1:net-snmp-5.3.2.2-7.el5_4.2.x86_64 already installed and latest version
Package rpmdevtools-5.3-2.el5.noarch already installed and latest version
Nothing to do
"NagiosXI-SNMPTrap.sh" does not seem to contain an email address.  This is allowed, but not recommended.
Committing to: /etc/
aborting commit write group: PointlessCommit(No changes to commit)
bzr: ERROR: No changes to commit. Use --unchanged to commit anyhow.
1
Committing to: /etc/
aborting commit write group: PointlessCommit(No changes to commit)
bzr: ERROR: No changes to commit. Use --unchanged to commit anyhow.
Committing to: /etc/
aborting commit write group: PointlessCommit(No changes to commit)
bzr: ERROR: No changes to commit. Use --unchanged to commit anyhow.
Stopping snmptrapd:                                        [  OK  ]
Starting snmptrapd:                                        [  OK  ]
+ yumperlget SNMP
+ yum provides 'perl(SNMP)'
+ awk '/^Repo/ { print pkg "\t" $3; next; };
                        /^[^ ].* : / { pkg = $1; next; };'
+ sort -r -n
+ cut -f1
++ head -n 1 /tmp/perl-package-versions
+ topver=1:net-snmp-perl-5.3.2.2-7.el5.x86_64
++ wc -l /tmp/perl-package-versions
++ cut '-d ' -f1
+ '[' 15 -ge 2 ']'
++ tail -n +2 /tmp/perl-package-versions
+ for i in '$(tail -n +2 /tmp/perl-package-versions)'
++ rpmdev-vercmp 1:net-snmp-perl-5.3.2.2-7.el5.x86_64 1:net-snmp-perl-5.3.2.2-7.el5_4.2.x86_64
++ grep -c newer
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

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

Post by mmestnik »

Looking at this code for the first time I see why it's not working. "then" must explicitly be followed by a command, not on the next line as it is here.

I'm working on cleaning this code up, you can remove these lines and install these two packages using yum. This is not supported at the moment.
metalheat
Posts: 8
Joined: Tue Feb 02, 2010 12:30 pm

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

Post by metalheat »

Problem was fixed by manually installing NET-SNMP-PERL packages and removing that part from install script. Thanks for the Help Guys, will be expecting to see more info from Nagios regarding SNMPTraps soon!! I Hope 8-)
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

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

Post by tonyyarusso »

Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

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

Post by tonyyarusso »

Also see http://support.nagios.com/forum/viewtopic.php?f=8&t=310 if you would like to discuss that document from the Library.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
Locked