snmptt wont startx

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: snmptt wont startx

Post by bosecorp »

root@usvanagiospxi3:(08-07 08:01): /
# echo "show tables;"|mysql -pnagiosxi nagiosxi|grep trap
xi_cmp_trapdata
xi_cmp_trapdata_log
root@usvanagiospxi3:(08-07 08:01): /
swolf

Re: snmptt wont startx

Post by swolf »

Okay, so you have the tables, which is good.

I'd like you to run this on the terminal, to see whether one of the previous commands worked:

Code: Select all

echo "select * from xi_cmp_trapdata_log;" | mysql -pnagiosxi nagiosxi
The SNMP Trap Interface in Nagios XI does expect net_snmp_perl to be enabled, so at least some functionality won't be there if it's not included. I was able to confirm that the One-Click Systems Test does fail at stage 4 if it's disabled. You do have net_snmp_perl installed, which is the correct package, but there's a chance that some other perl module is creating a conflict with it. I'd also like you to run

Code: Select all

find / -type f -name "SNMP.pm"
so that we can see what else exists with that name.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: snmptt wont startx

Post by bosecorp »

#
root@usvanagiospxi3:(08-07 12:28): /root
#
root@usvanagiospxi3:(08-07 12:28): /root
#
root@usvanagiospxi3:(08-07 12:28): /root
# echo "select * from xi_cmp_trapdata_log;" | mysql -pnagiosxi nagiosxi
trapdata_log_id trapdata_log_event_name trapdata_log_event_oid trapdata_log_numeric_oid trapdata_log_symbolic_oid trapdata_log_community trapdata_log_trap_hostname trapdata_log_trap_ip trapdata_log_agent_hostname trapdata_log_agent_IP trapdata_log_category trapdata_log_severity trapdata_log_uptime trapdata_log_datetime trapdata_log_bindings
2 Test Event .1.3.6.1.4.1.8072.2.3.0.1 .1.3.6.1.4.1.8072.2.3.0.1 NET-SNMP-EXAMPLES-MIB::.iso.org.dod.int\nernet.private.enterprises.netSnmp.netSnmpExamples.netSnmpExa localhost 127.0.0.1 \nlocalhost 127.0.0.1 NXTI Test Event Normal 88:20:29:22.25 2018-07-21 10:06:10 YToxOntpOjA7czozNDoibmV0U25tcEV4YW1wbGVIZWFydGJlYXRSYXRlOjEyMzQ1NiI7fQ==
root@usvanagiospxi3:(08-07 12:28): /root
# find / -type f -name "SNMP.pm"
find: ‘/proc/80950’: No such file or directory
find: ‘/proc/81336’: No such file or directory
find: ‘/proc/81371’: No such file or directory
find: ‘/proc/81374’: No such file or directory
find: ‘/proc/82361’: No such file or directory
find: ‘/proc/82375’: No such file or directory
find: ‘/proc/82376’: No such file or directory
find: ‘/proc/82396’: No such file or directory
find: ‘/proc/82401’: No such file or directory
find: ‘/proc/82404’: No such file or directory
find: ‘/proc/82448’: No such file or directory
find: ‘/proc/82451’: No such file or directory
find: ‘/proc/82452’: No such file or directory
find: ‘/proc/82462’: No such file or directory
find: ‘/proc/82466’: No such file or directory
find: ‘/proc/82475’: No such file or directory
find: ‘/proc/82476’: No such file or directory
find: ‘/proc/82477’: No such file or directory
find: ‘/proc/82479’: No such file or directory
find: ‘/proc/82480’: No such file or directory
find: ‘/proc/82483’: No such file or directory
find: ‘/proc/82485’: No such file or directory
find: ‘/proc/82494’: No such file or directory
find: ‘/proc/82497’: No such file or directory
find: ‘/proc/82501’: No such file or directory
/root/.cpan/build/SNMP-5.0404-KNDvEM/SNMP.pm
/root/.cpan/build/SNMP-5.0404-ArEVEA/SNMP.pm
/usr/lib64/perl5/vendor_perl/SNMP.pm
/usr/share/perl5/vendor_perl/Net/SNMP.pm
/usr/local/lib64/perl5/SNMP.pm
root@usvanagiospxi3:(08-07 12:28): /root
#
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: snmptt wont startx

Post by scottwilkerson »

What we'll want to do is change the second and third of these so that perl doesn't try to read the module:

Code: Select all

mv /usr/share/perl5/vendor_perl/Net/SNMP.pm /usr/share/perl5/vendor_perl/Net/SNMP.pm.bak
mv /usr/local/lib64/perl5/SNMP.pm /usr/local/lib64/perl5/SNMP.pm.bak
Then try to restart snmptt again
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: snmptt wont startx

Post by bosecorp »

same error from the GUI
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: snmptt wont startx

Post by scottwilkerson »

I forgot to mention after doing this I'd like you to edit /etc/snmp/snmptt.ini

and set this back to 1

Code: Select all

net_snmp_perl_enable = 1
Then restart snmptt
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: snmptt wont startx

Post by bosecorp »

the move command created thousands of alerts

(No output on stdout) stderr: Can't locate Net/SNMP.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nagios/libexec/check_

I need to revert that. made the problem worse
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: snmptt wont startx

Post by cdienger »

There are a couple modules that use the name net snmp which I think is causing some confusion here. I believe what you need to do to get the right one is:

yum cpan
perl -MCPAN -e shell
install Net::SNMP
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: snmptt wont startx

Post by bosecorp »

Ok, some progress here

I did the move command again. Saw thousands of alerts again. but then ran the CPAN commands. that took care of the PERL alerts, but also fixed the issue with not being able to start snmptt with Perl enable.

but I still get that error from the GUI when I run the test
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: snmptt wont startx

Post by tgriep »

That error when running the test should be fixed in the next release of XI only if the Nagios server is using Postgres for the nagiosxi database.
If you look in the /usr/local/nagiosxi/html/config.inc.php file

You should see this

Code: Select all

$cfg['db_info'] = array(
    "nagiosxi" => array(
        "dbtype" => 'pgsql',
        "dbserver" => '',
        "user" => 'nagiosxi',
        "pwd" => 'n@gweb',
        "db" => 'nagiosxi',
        "dbmaint" => array( // variables affecting maintenance of db
            "max_auditlog_age" => 30, // max time (in DAYS) to keep audit log entries
            "max_commands_age" => 480, // max time (minutes) to keep commands
            "max_events_age" => 480, // max time (minutes) to keep events
            "optimize_interval" => 60, // time (in minutes) between db optimization runs
            "repair_interval" => 0, // time (in minutes) between db repair runs
        ),
If your dbtype is pgsql like the example above, you will have to wait for the next XI release for the fix.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked