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 »

I am not using postgres
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: snmptt wont startx

Post by tgriep »

First, lets see if there are any errors generated when the test is ran.
Run this as root

Code: Select all

tail -f /var/log/httpd/*_log
Then run the test again and if you see any errors in the tail window, post them here.

If you do not see any errors, we would need to see the SNMP configuration files and the MIB files from the server so can you run the following 3 commands as root.

Code: Select all

tar cvfz /tmp/snmp.tgz /etc/snmp/*
tar cvfz /tmp/sharesnmp.tgz /usr/share/snmp/mibs/*
tar cvfz /tmp/snmplog.tgz /var/log/snmptt/*
Then post these 3 files so we can check the settings and the MIB files for any errors.

Code: Select all

/tmp/snmp.tgz
/tmp/sharesnmp.tgz
/tmp/snmplog.tgz
Also, we would need to see the database settings so run the following as root and post the /tmp/trap.txt file

Code: Select all

echo 'select * from xi_cmp_trapdata;' |mysql -u root -pnagiosxi nagiosxi >/tmp/trap.txt
echo 'select * from xi_cmp_trapdata_log;' |mysql -u root -pnagiosxi nagiosxi >>/tmp/trap.txt
Thanks
Be sure to check out our Knowledgebase for helpful articles and solutions!
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: snmptt wont startx

Post by bosecorp »

here you go
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 »

The /etc/snmptt.ini file was not changed when the XI upgrade process ran so the nxti settings were not updated (Permission issue).

To fix this, run the following as root to fix the permissions

Code: Select all

chown nagios.nagios /etc/snmptt.ini
chmod 664 /etc/snmptt.ini
Then edit the /etc/snmptt.ini file and change this from

Code: Select all

snmptt_conf_files = <<END
/etc/snmp/snmptt.conf
END
to

Code: Select all

snmptt_conf_files = <<END
/etc/snmp/snmptt.conf
/etc/snmp/snmptt.conf.nxti
END
Save the file and restart the Trap daemon

Code: Select all

service snmptt restart
Login to the XI GUI and go to the Trap interface and delete the Test Trap configurations and any received traps.
Then try the test again and see if it works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: snmptt wont startx

Post by bosecorp »

no same error
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: snmptt wont startx

Post by tgriep »

Run these commands as root in a shell.

Code: Select all

chown -R nagios.nagios /usr/share/snmp/mibs
chmod 664 /usr/share/snmp/mibs
chown nagios.nagios /etc/snmptt.conf
chmod 664 /etc/snmptt.conf
Go to the SNMP Trap interface menu, click on the Advanced Tab.
Click on the Restore SNMPTT Configuration button.

Then run this as root in a shell.

Code: Select all

tail -f /var/log/httpd/*_log
Click on the One Click test and post any errors from the tail shell.

Other than the One Click issue, can you Define a Trap in the menu?
Be sure to check out our Knowledgebase for helpful articles and solutions!
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: snmptt wont startx

Post by bosecorp »

I am getting this error


Cannot rename /var/lib/net-snmp/snmpapp.conf to /var/lib/net-snmp/snmpapp.0.conf
Cannot unlink /var/lib/net-snmp/snmpapp.conf
[Thu Aug 09 09:56:44.924674 2018] [:error] [pid 82793] [client 10.144.2.183:10825] PHP Notice: Undefined variable: restart in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://nagiosxi/nagiosxi/includes/compo ... /index.php
Cannot rename /var/lib/net-snmp/snmpapp.conf to /var/lib/net-snmp/snmpapp.0.conf
Cannot unlink /var/lib/net-snmp/snmpapp.conf
[Thu Aug 09 09:57:10.744623 2018] [:error] [pid 36780] [client 10.144.1.77:37754] PHP Notice: Array to string conversion in /usr/local/nagiosxi/html/includes/utils-xmlstatus.inc.php on line 1386, referer: http://nagiosxi/nagiosxi/dashboards/dashboard.php?&=
[Thu Aug 09 09:57:46.811355 2018] [:error] [pid 5999] [client 10.144.2.183:11009] PHP Notice: Array to string conversion in /usr/local/nagiosxi/html/includes/utils-xmlstatus.inc.php on line 1386, referer: http://nagiosxi.bose.com/nagiosxi/dashb ... ard.php?&=
[Thu Aug 09 09:58:07.857602 2018] [:error] [pid 79717] [client 10.144.2.183:11069] PHP Notice: Undefined variable: restart in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://nagiosxi/nagiosxi/includes/compo ... /index.php
Cannot rename /var/lib/net-snmp/snmpapp.conf to /var/lib/net-snmp/snmpapp.0.conf
Cannot unlink /var/lib/net-snmp/snmpapp.conf
[Thu Aug 09 09:58:40.817754 2018] [:error] [pid 99104] [client 10.144.1.77:37982] PHP Notice: Array to string conversion in /usr/local/nagiosxi/html/includes/utils-xmlstatus.inc.php on line 1386, referer: http://nagiosxi/nagiosxi/dashboards/dashboard.php?&=
[Thu Aug 09 09:58:47.206981 2018] [:error] [pid 23290] [client 10.144.2.183:11153] PHP Notice: Undefined variable: restart in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://nagiosxi/nagiosxi/includes/compo ... /index.php
Cannot rename /var/lib/net-snmp/snmpapp.conf to /var/lib/net-snmp/snmpapp.0.conf
Cannot unlink /var/lib/net-snmp/snmpapp.conf
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: snmptt wont startx

Post by tgriep »

Thanks for the output.
It looks like the permissions for that file and folders need to be reset.
Run this as root to fix that.

Code: Select all

chown -R  nagios.nagios /var/lib/net-snmp
chmod -R 775 /var/lib/net-snmp
Then test it again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: snmptt wont startx

Post by bosecorp »

get this error



[Thu Aug 09 10:45:31.980012 2018] [:error] [pid 96705] [client 10.144.1.77:44862] PHP Notice: Undefined variable: restart in /usr/local/nagiosxi/html/includes/components/nxti/index.php on line 0, referer: http://nagiosxi/nagiosxi/includes/compo ... /index.php
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: snmptt wont startx

Post by tgriep »

That is not an error, it is only a PHP Notice so you can ignore it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked