SOLVED - Add Cisco routers to Icinga check_nwc_health CentOS 7x

[root@localhost /]# cat /etc/os-release
NAME=“CentOS Linux”
VERSION=“7 (Core)”
ID=“centos”
ID_LIKE=“rhel fedora”
VERSION_ID=“7”
PRETTY_NAME=“CentOS Linux 7 (Core)”
ANSI_COLOR=“0;31”

And using the SElinux

On CentOS you need to install the package net-snmp-perl.

Also try using code formatting tags when posting command lines or console output
:
Three backticks for code in front and after the code : ```

I think the module is not needed to display the help output. Assuming the option -H is non-existent at the plugin (at least I don’t know/use it)

2 Likes

UNKNOWN - check_nwc_health timed out after 15 seconds
Installed perl & net-snmp , still the issues remains. Do any additional settings required pls ( System rebooted also )
[root@localhost /]# snmpd --version
NET-SNMP version: 5.7.2

[root@localhost /]# perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 39 registered patches, see perl -V for more detail)
Copyright 1987-2012, Larry Wall …

50

Hope still storing the temporary files…pls help

Please show the output of the “Inspect” link from the web interface.
This should give you the exact command line that icinga 2 is calling.

Also check_nwc_health is not a suitable plugin for the host availability check. Use check_icmp instead.
With check_nwc_health you check stuff like interfaces, hardware-status, cpu-load, memory-usage and many more.

1 Like

Yes. Use check_icmp as a host check if the host is pingable at all and then add services with e.g. check_nwc_health.

1 Like

Hi Thomas , Log1c , Michael & Johannes

Thank you for your kind support. I just followed few steps here to workout net-snmp. All good now…

1 Like

For the book of wisdom: How to install check_nwc_health on CentOS 7 - Quick’n’Dirty Guide

cd /tmp
wget https://labs.consol.de/assets/downloads/nagios/check_nwc_health-7.10.0.1.tar.gz
tar -xvzf check_nwc_health-7.10.0.1.tar.gz
cd check_nwc_health-7.10.0.1
yum install -y perl-Net-SNMP perl-Data-Dumper perl-Module-Load
./configure --libexecdir=/usr/lib64/nagios/plugins/contrib --with-nagios-user=icinga --with-nagios-group=icinga
mkdir -pv /usr/lib64/nagios/plugins/contrib
make
make install
ls -la /usr/lib64/nagios/plugins/contrib/check_nwc_health
sudo -u icinga /usr/lib64/nagios/plugins/contrib/check_nwc_health -H localhost --servertype linuxlocal --mode interface-health

Disclaimer: This guide is designed to work under CentOS 7 with /usr/lib64/nagios/contrib folder existing. Please adapt to your system circumstances and contribute it to this thread if useful.

Current release can be found here: https://labs.consol.de/nagios/check_nwc_health/index.html#Download

1 Like