Page 2 of 5

Re: snmptt wont startx

Posted: Wed Aug 01, 2018 1:04 pm
by bosecorp
nothing

# yum install perl-Net-SNMP -y
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos, versionlock
epel/x86_64/metalink | 17 kB 00:00:00
nagios-base | 1.5 kB 00:00:00
nagiosxi-deps | 1.5 kB 00:00:00
rhui-REGION-client-config-server-7 | 2.9 kB 00:00:00
rhui-REGION-rhel-server-releases | 3.5 kB 00:00:00
rhui-REGION-rhel-server-rh-common | 3.8 kB 00:00:00
Package perl-Net-SNMP-6.0.1-7.el7.noarch already installed and latest version
Nothing to do
root@usvanagiospxi3:(08-01 14:03): /root

Re: snmptt wont startx

Posted: Wed Aug 01, 2018 1:52 pm
by scottwilkerson
lets reinstall

Code: Select all

yum reinstall perl-Net-SNMP -y

Re: snmptt wont startx

Posted: Thu Aug 02, 2018 11:19 am
by bosecorp
no

didnt work

# yum reinstall perl-Net-SNMP -y
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos, versionlock
epel/x86_64/metalink | 19 kB 00:00:00
nagios-base | 1.5 kB 00:00:00
nagiosxi-deps | 1.5 kB 00:00:00
rhui-REGION-client-config-server-7 | 2.9 kB 00:00:00
rhui-REGION-rhel-server-releases | 3.5 kB 00:00:00
rhui-REGION-rhel-server-rh-common | 3.8 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package perl-Net-SNMP.noarch 0:6.0.1-7.el7 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================================================
Reinstalling:
perl-Net-SNMP noarch 6.0.1-7.el7 epel 103 k

Transaction Summary
==========================================================================================================================================================================
Reinstall 1 Package

Total download size: 103 k
Installed size: 399 k
Downloading packages:
perl-Net-SNMP-6.0.1-7.el7.noarch.rpm | 103 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : perl-Net-SNMP-6.0.1-7.el7.noarch 1/1
Verifying : perl-Net-SNMP-6.0.1-7.el7.noarch 1/1

Installed:
perl-Net-SNMP.noarch 0:6.0.1-7.el7

Complete!
root@usvanagiospxi3:(08-02 08:37): /usr/local/nagios/libexec
# vim check_ec2.py ^C
root@usvanagiospxi3:(08-02 08:37): /usr/local/nagios/libexec
# systemctl restart snmptt
Job for snmptt.service failed because the control process exited with error code. See "systemctl status snmptt.service" and "journalctl -xe" for details.
root@usvanagiospxi3:(08-02 08:37): /usr/local/nagios/libexec
# systemctl status snmptt
● snmptt.service - SNMP Trap Translator (SNMPTT)
Loaded: loaded (/usr/lib/systemd/system/snmptt.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2018-08-02 12:18:47 EDT; 9s ago
Process: 85170 ExecStart=/usr/sbin/snmptt --daemon (code=exited, status=255)

Aug 02 12:18:47 usvanagiospxi3 systemd[1]: Starting SNMP Trap Translator (SNMPTT)...
Aug 02 12:18:47 usvanagiospxi3 snmptt-sys[85170]: SNMPTT v1.4beta2 started
Aug 02 12:18:47 usvanagiospxi3 snmptt[85170]: Undefined subroutine &SNMP::initMib called at /usr/sbin/snmptt line 437.
Aug 02 12:18:47 usvanagiospxi3 systemd[1]: snmptt.service: control process exited, code=exited status=255
Aug 02 12:18:47 usvanagiospxi3 systemd[1]: Failed to start SNMP Trap Translator (SNMPTT).
Aug 02 12:18:47 usvanagiospxi3 systemd[1]: Unit snmptt.service entered failed state.
Aug 02 12:18:47 usvanagiospxi3 systemd[1]: snmptt.service failed.
root@usvanagiospxi3:(08-02 08:37): /usr/local/nagios/libexec

Re: snmptt wont startx

Posted: Thu Aug 02, 2018 3:51 pm
by scottwilkerson
One more package

Code: Select all

yum install net-snmp-perl -y

Re: snmptt wont startx

Posted: Mon Aug 06, 2018 2:45 pm
by bosecorp
No


# yum install net-snmp-perl -y
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos, versionlock
epel/x86_64/metalink | 19 kB 00:00
nagios-base | 1.5 kB 00:00
nagiosxi-deps | 1.5 kB 00:00
rhui-REGION-client-config-server-7 | 2.9 kB 00:00
rhui-REGION-rhel-server-releases | 3.5 kB 00:00
rhui-REGION-rhel-server-rh-common | 3.8 kB 00:00
No package net-snmp-perl available.
Error: Nothing to do
root@usvanagiospxi3:(08-06 15:44): /root
# systemctl restart snmptt
Job for snmptt.service failed because the control process exited with error code. See "systemctl status snmptt.service" and "journalctl -xe" for details.
root@usvanagiospxi3:(08-06 15:44): /root
#

Re: snmptt wont startx

Posted: Mon Aug 06, 2018 3:04 pm
by scottwilkerson
It doesn't look like you have the option channel installed

run the following

Code: Select all

sudo subscription-manager repos --enable rhel-7-server-extras-rpms
sudo subscription-manager repos --enable rhel-7-server-optional-rpms
then

Code: Select all

yum install net-snmp-perl -y

Re: snmptt wont startx

Posted: Mon Aug 06, 2018 3:23 pm
by bosecorp
even after installing the additional channels.

it did installed the package, though


# yum install net-snmp-perl -y
Loaded plugins: amazon-id, product-id, rhui-lb, search-disabled-repos, subscription-manager, versionlock
rhel-7-server-optional-rpms | 3.5 kB 00:00:00
rhel-7-server-rpms | 3.5 kB 00:00:00
(1/6): rhel-7-server-optional-rpms/7Server/x86_64/group | 30 kB 00:00:00
(2/6): rhel-7-server-optional-rpms/7Server/x86_64/updateinfo | 2.1 MB 00:00:00
(3/6): rhel-7-server-rpms/7Server/x86_64/group | 855 kB 00:00:00
(4/6): rhel-7-server-optional-rpms/7Server/x86_64/primary_db | 7.2 MB 00:00:00
(5/6): rhel-7-server-rpms/7Server/x86_64/updateinfo | 2.9 MB 00:00:00
(6/6): rhel-7-server-rpms/7Server/x86_64/primary_db | 54 MB 00:00:01
Resolving Dependencies
--> Running transaction check
---> Package net-snmp-perl.x86_64 1:5.7.2-33.el7_5.2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================
Installing:
net-snmp-perl x86_64 1:5.7.2-33.el7_5.2 rhel-7-server-optional-rpms 337 k

Transaction Summary
============================================================================================================================================================================================
Install 1 Package

Total download size: 337 k
Installed size: 1.1 M
Downloading packages:
net-snmp-perl-5.7.2-33.el7_5.2.x86_64.rpm | 337 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:net-snmp-perl-5.7.2-33.el7_5.2.x86_64 1/1
rhel-7-server-optional-rpms/7Server/x86_64/productid | 2.1 kB 00:00:00
rhel-7-server-rpms/7Server/x86_64/productid | 2.1 kB 00:00:00
Verifying : 1:net-snmp-perl-5.7.2-33.el7_5.2.x86_64 1/1

Installed:
net-snmp-perl.x86_64 1:5.7.2-33.el7_5.2

Complete!
root@usvanagiospxi3:(08-06 15:44): /root
# systemctl restart snmptt
Job for snmptt.service failed because the control process exited with error code. See "systemctl status snmptt.service" and "journalctl -xe" for details.
root@usvanagiospxi3:(08-06 15:44): /root
# systemctl status snmptt
● snmptt.service - SNMP Trap Translator (SNMPTT)
Loaded: loaded (/usr/lib/systemd/system/snmptt.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2018-08-06 16:21:44 EDT; 8s ago
Process: 20236 ExecStart=/usr/sbin/snmptt --daemon (code=exited, status=255)

Aug 06 16:21:44 usvanagiospxi3 systemd[1]: Starting SNMP Trap Translator (SNMPTT)...
Aug 06 16:21:44 usvanagiospxi3 snmptt-sys[20236]: SNMPTT v1.4beta2 started
Aug 06 16:21:44 usvanagiospxi3 snmptt[20236]: Undefined subroutine &SNMP::initMib called at /usr/sbin/snmptt line 437.
Aug 06 16:21:44 usvanagiospxi3 systemd[1]: snmptt.service: control process exited, code=exited status=255
Aug 06 16:21:44 usvanagiospxi3 systemd[1]: Failed to start SNMP Trap Translator (SNMPTT).
Aug 06 16:21:44 usvanagiospxi3 systemd[1]: Unit snmptt.service entered failed state.
Aug 06 16:21:44 usvanagiospxi3 systemd[1]: snmptt.service failed.
root@usvanagiospxi3:(08-06 15:44): /root
# ^C
root@usvanagiospxi3:(08-06 15:44): /root

Re: snmptt wont startx

Posted: Mon Aug 06, 2018 4:02 pm
by scottwilkerson
Weird.

Being it isn't used anyways edit /etc/snmp/snmptt.ini

and set

Code: Select all

net_snmp_perl_enable = 0
then restart again

Code: Select all

systemctl restart snmptt

Re: snmptt wont startx

Posted: Mon Aug 06, 2018 4:09 pm
by bosecorp
Right...

but then we go back to the original problem I had

I get this error when I run a test from GUI


Failed Stage 4/9 (Received Trap Verification)! SNMPTT was not able to run the NXTI trap handling script, and received traps are not being added to the database

Re: snmptt wont startx

Posted: Mon Aug 06, 2018 4:46 pm
by scottwilkerson
Can you verify the trap tables exist in your database

Code: Select all

echo "\d"|psql nagiosxi nagiosxi|grep trap
Or if it is a newer system without postgresql

Code: Select all

echo "show tables;"|mysql -pnagiosxi nagiosxi|grep trap