Page 1 of 1

Network switch and router monitoring

Posted: Mon Jul 06, 2020 7:47 am
by RIDS_I2MP
Hello Team,

We want to monitor a switch using Nagios XI "Network Switch/Router" Wizard. Below are the details:

IP: 10.1.210.248
name: AE-HO1-DMVPN-GW
SNMP string :mrtg#429monitor

While configuring, it is not showing any ports there and giving an error message like:

If you keep experiencing problems with the switch wizard scan, login to the Nagios XI server as the root user and execute the following command:
/usr/bin/cfgmaker --show-op-down --noreversedns --zero-speed '100000000' 'mrtg#[email protected]:161::::2'


When we executed this command, we got the below output:

[root@HO1-NAGIOSXI ~]# /usr/bin/cfgmaker --show-op-down --noreversedns --zero-speed '100000000' 'mrtg#[email protected]:161::::2'
Can't locate MRTG_lib.pm in @INC (you may need to install the MRTG_lib module) (@INC contains: /usr/bin/../lib/mrtg2 /usr/bin /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/bin/cfgmaker line 49.
BEGIN failed--compilation aborted at /usr/bin/cfgmaker line 49.
[root@HO1-NAGIOSXI ~]#

Nagios Xi version: 5.7.1

Could you please check and help us on the same.


Thanks in advance!!

Re: Network switch and router monitoring

Posted: Mon Jul 06, 2020 3:43 pm
by tgriep
What OS and release are you running cfgmaker comand on?

Re: Network switch and router monitoring

Posted: Tue Jul 07, 2020 12:26 am
by RIDS_I2MP
Hello,

Below is the version and release of Nagios XI server:

[root@HO1-NAGIOSXI ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

[root@HO1-NAGIOSXI ~]#
[root@HO1-NAGIOSXI ~]#
[root@HO1-NAGIOSXI ~]# cat /proc/version
Linux version 4.18.0-147.8.1.el8_1.x86_64 ([email protected]) (gcc version 8.3.1 20190507 (Red Hat 8.3.1-4) (GCC)) #1 SMP Thu Apr 9 13:49:54 UTC 2020
[root@HO1-NAGIOSXI ~]#

Re: Network switch and router monitoring

Posted: Tue Jul 07, 2020 8:51 am
by RIDS_I2MP
Hello,

The previous issue was resolved. I just installed mrtg in Nagios. Now, the ports are visible. But I am getting below error for monitoring the bandwidth.

/var/lib/mrtg/10.1.210.248_1.rrd does not exist.

10.1.210.248 is the IP address of the switch. PFA the screenshot for the same.

Looking forward for your help.

Re: Network switch and router monitoring

Posted: Tue Jul 07, 2020 9:06 am
by tgriep
It could be a permission issue with the /var/lib/mrtg files and folders and to update them, run the following as root.

Code: Select all

chown apache:nagios /var/lib/mrtg -R
chmod 775 /var/lib/mrtg -R
Wait for 20 minutes to see if the files are created and update with data.

If not, Can you run the following commands as root and post the the /tmp/mrtg.txt file?

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg -debug=cfg,base,log &> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg &>> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok --user=nagios --group=nagios &>> /tmp/mrtg.txt
{ time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg 2>1 ; } 2>> /tmp/mrtg.txt
Thanks

Re: Network switch and router monitoring

Posted: Wed Jul 08, 2020 8:00 am
by RIDS_I2MP
Hello,

It was a permission issue, its resolved now.

Thanks!!

Re: Network switch and router monitoring

Posted: Wed Jul 08, 2020 9:06 am
by scottwilkerson
RIDS_I2MP wrote:Hello,

It was a permission issue, its resolved now.

Thanks!!
Great!

Locking thread