Page 2 of 2

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

Posted: Mon Apr 19, 2010 11:17 am
by mmestnik
This script has changed a little since I last read it. As indicated it's still in a pre-release state.

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

Posted: Mon Apr 19, 2010 12:44 pm
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

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

Posted: Mon Apr 19, 2010 2:07 pm
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.

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

Posted: Tue Apr 20, 2010 4:20 pm
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-)

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

Posted: Wed Apr 28, 2010 3:38 pm
by tonyyarusso

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

Posted: Tue May 11, 2010 4:52 pm
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.