Page 1 of 2
Ports down in Nagios whereas Up on network switch end
Posted: Fri Feb 04, 2022 1:30 am
by QPUSER
Hi All,
I have observed abnormal behavior for network port monitoring in Nagios. Port are up and connected on switch side however it's showing as down in Nagios tool. Refer the attached file and below quotes from network end.
#show interfaces status | in connected
Gi1/0/1 user connected 15 a-full a-1000 10/100/1000Ba seTX
Gi1/0/3 LB-NAS01 Synology connected 25 a-full a-1000 10/100/1000Ba seTX
Gi1/0/4 LB-NAS01 Synology connected 25 a-full a-1000 10/100/1000Ba seTX
Gi1/0/5 LB-NAS01 Synology connected 25 a-full a-1000 10/100/1000Ba seTX
Gi1/0/6 LB-NAS01 Synology connected 25 a-full a-1000 10/100/1000Ba seTX
Gi1/0/12 ATA-Device connected 20 a-full a-100 10/100/1000Ba seTX
Gi1/0/16 BRIVA SECURITY connected 50 a-full a-100 10/100/1000Ba seTX
Gi1/0/17 BRIVA SECURITY connected 50 a-full a-1000 10/100/1000Ba seTX
Gi1/0/28 firewall outside connected 215 a-full a-1000 10/100/1000Ba seTX
Gi1/0/47 user connected 15 a-full a-1000 10/100/1000Ba seTX
Gi1/0/48 TRUNK-TO-MX connected trunk a-full a-1000 10/100/1000Ba seTX
Gi1/1/1 MDF-CEILING connected trunk full 1000 1000BaseSX SF P
Gi1/1/2 TRUNK-IDF connected trunk full 1000 1000BaseSX SFP
Gi1/1/3 connected trunk full 1000 1000BaseSX SFP
Gi1/1/4 connected trunk full 1000 1000BaseSX SFP
Po1 connected 25 a-full a-1000
#
FYI, we are using NagiosXI 5.8.7.
Kindly assists us to fix it.
Thanks
QPUser
Re: Ports down in Nagios whereas Up on network switch end
Posted: Fri Feb 04, 2022 3:16 pm
by kfanselow
Hi QPUser,
What do you get when you execute the "Run check command" for the port ?
Configure (top) -> Core Config Manager -> Services (left under Monitoring) -> find the port service check and click on the wrench ( right side ). -> Click on the "Run Check Command" button and its follow up prompt. You should see something like this:
Code: Select all
[nagios@kf-centos-79 ~]$ /usr/local/nagios/libexec/check_ifoperstatus -H 192.168.5.90 -C REDACTED -k 24 -v 2 -p 161
CRITICAL: Interface 24 (index 24) is down.
Please be sure to redact the community string as in the example above ( the -C argument ).
Thanks and Best Regards,
Keith
Re: Ports down in Nagios whereas Up on network switch end
Posted: Mon Feb 07, 2022 1:40 am
by QPUSER
Hi Keith,
As suggested, I have executed the command and got below result.
OK: Interface GigabitEthernet1/0/17 (index 24) is up.
But somehow in NagiosXI GUI, this port is showing as down though it's showing as up as per CLI.
Thanks,
QP
Re: Ports down in Nagios whereas Up on network switch end
Posted: Mon Feb 07, 2022 5:05 pm
by kfanselow
Hi QP,
Thank you - did you run the check as a nagios or as root ? Also could you generate a system profile and send it to me via PM so we can take a quick look ? This may have to be something we address through a ticket depending upon what we see.
To Generate a profile:
Login to the Nagios XI GUI using a web browser.
Click the "Admin" (Top) -> "System Profile" Menu (Left)
Click the "Download Profile" button
Thanks and Best Regards,
Keith
Re: Ports down in Nagios whereas Up on network switch end
Posted: Tue Feb 08, 2022 4:17 am
by QPUSER
Hi Keith,
I have run the same command with root as well as nagios user getting same response.
OK: Interface GigabitEthernet1/1/2 (index 57) is up.
Please refer the attached system profile.
Thanks
QP
Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.
Re: Ports down in Nagios whereas Up on network switch end
Posted: Wed Feb 09, 2022 7:24 am
by QPUSER
Hi Keith,
Awaiting for your feedback in this.
Thanks
QP
Re: Ports down in Nagios whereas Up on network switch end
Posted: Wed Feb 09, 2022 11:28 am
by ssax
If you login to the backend Nagios Core interface on your server with your XI credentials and go view the service in that interface, does it show properly there?
I'm seeing this as well:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib64/php/modules/pdo_pgsql (/usr/lib64/php/modules/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/pdo_pgsql.so (/usr/pgsql-9.6/lib/libpq.so.5: undefined symbol: simple_string_list_member)) in Unknown on line 0
Please send the output of these commands:
Code: Select all
strings /usr/local/nagios/bin/ndo.so | grep Copyright
rpm -qa | grep php
grep cfg__db_info__nagiosxi__dbtype /usr/local/nagiosxi/var/xi-sys.cfg
Did you convert from postgresql to mysql on the system? Your
/usr/local/nagiosxi/html/config.inc.php shows it using mysql but those errors in the logs indicate it's being used somewhere so I'm wondering where it's coming from or if maybe you converted to mysql from postgresql and may have missed restarting a service or something.
If you don't have
php-pgsql you likely need to install it:
Code: Select all
yum install php-pgsql
systemctl restart httpd
systemctl restart nagios httpd crond
Then see if that helps.
Re: Ports down in Nagios whereas Up on network switch end
Posted: Mon Feb 14, 2022 1:24 am
by QPUSER
Hi,
http://YOURXISERVER/nagios/ does not show proper status i.e. it shows port is down where as port is up and connected.
Where as below command on NagiosXI server shows proper status
[nagios@kf-centos-79 ~]$ /usr/local/nagios/libexec/check_ifoperstatus -H 192.168.5.90 -C REDACTED -k 24 -v 2 -p 161
OK: Interface GigabitEthernet1/0/17 (index 24) is up.
As requested, refer the below output.
[root@nagiosxi ~]# strings /usr/local/nagios/bin/ndo.so | grep Copyright
NDO 3.0.7 (c) Copyright 2009-2020 Nagios - Nagios Core Development Team
[root@nagiosxi ~]# rpm -qa | grep php
php-cli-7.4.27-1.el7.remi.x86_64
php-mysqlnd-7.4.27-1.el7.remi.x86_64
php-common-7.4.27-1.el7.remi.x86_64
php-mbstring-7.4.27-1.el7.remi.x86_64
php-snmp-7.4.27-1.el7.remi.x86_64
php-json-7.4.27-1.el7.remi.x86_64
php-process-7.4.27-1.el7.remi.x86_64
gd3php-2.3.3-4.el7.remi.x86_64
php-7.4.27-1.el7.remi.x86_64
php-pear-1.10.13-1.el7.remi.noarch
php-odbc-7.4.27-1.el7.remi.x86_64
php-ldap-7.4.27-1.el7.remi.x86_64
php-pdo-7.4.27-1.el7.remi.x86_64
php-devel-7.4.27-1.el7.remi.x86_64
php-pgsql-7.4.27-1.el7.remi.x86_64
php-opcache-7.4.27-1.el7.remi.x86_64
php-pecl-ssh2-1.3.1-1.el7.remi.7.4.x86_64
oniguruma5php-6.9.7.1-1.el7.remi.x86_64
php-gd-7.4.27-1.el7.remi.x86_64
php-imap-7.4.27-1.el7.remi.x86_64
php-xml-7.4.27-1.el7.remi.x86_64
php-sodium-7.4.27-1.el7.remi.x86_64
php-pdo-dblib-7.4.27-1.el7.remi.x86_64
[root@nagiosxi ~]# grep cfg__db_info__nagiosxi__dbtype /usr/local/nagiosxi/var/xi-sys.cfg
[root@nagiosxi ~]#
Did you convert from postgresql to mysql on the system? ---NO
Alrey have php-pgsql. refer above commands output.
I have already performed restated of following component.
systemctl restart httpd
systemctl restart nagios httpd crond
Let me know if anything else i can check to fi it.
Re: Ports down in Nagios whereas Up on network switch end
Posted: Mon Feb 14, 2022 5:03 pm
by ssax
What is the output of this command?
Code: Select all
ls -lh /usr/local/nagios/var/status.dat
Please
PM me this file as well:
Re: Ports down in Nagios whereas Up on network switch end
Posted: Mon Feb 21, 2022 1:10 am
by QPUSER
Hi,
Please refer below for requested information.
[root@nagiosxi ~]# ls -lh /usr/local/nagios/var/status.dat
-rw-rw-r-- 1 nagios nagios 1.2M Feb 21 00:06 /usr/local/nagios/var/status.dat
[root@nagiosxi ~]#
Refer the attached file.