I want to check for example the WAN-IP of My Router. Its an Lancom 1781AW
I have configured the Switch.cfg File as follows:
Code: Select all
define service{
use generic-service ; Inherit values from a template
host_name GM-PS
service_description WAN IP
check_command check_snmp!-C public -o .1.3.6.1.4.1.2356.11.1.4.13.1.1.3 -m all
}
The MIB File is located : /usr/share/snmp/mibs
the nagios web interface service shows:
CRITICAL - Plugin timed out while executing system call
I have check_snmp Plugin in /usr/local/nagioslibexec
The SNMP Service is enabled in the Router . The Community names public
I have checked SNMP manually and I get response and Lots of Oids are shown:
Command: snmpwalk -v2c 192.168.172.1 -c public
Part of what Snmpwalk shows:
Code: Select all
iso.3.6.1.2.1.1.1.0 = STRING: "LANCOM 1781AW 10.12.0084 / 19.10.2017 4002851518100372"
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.2356.11.8.607
iso.3.6.1.2.1.1.3.0 = Timeticks: (32504991) 3 days, 18:17:29.91
iso.3.6.1.2.1.1.4.0 = ""
iso.3.6.1.2.1.1.5.0 = STRING: "GM-PS"
iso.3.6.1.2.1.1.6.0 = ""
iso.3.6.1.2.1.1.7.0 = INTEGER: 14
iso.3.6.1.2.1.1.8.0 = Timeticks: (0) 0:00:00.00
I get an Timeout
CRITICAL - Plugin timed out while executing system call
Part of my MIB file:
Code: Select all
-- {ROW} 1.3.6.1.4.1.2356.11.1.4.13.1.1
lcsStatusWanIpAddressesIpv4Entry OBJECT-TYPE
SYNTAX LcsStatusWanIpAddressesIpv4Entry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
""
INDEX {
lcsStatusWanIpAddressesIpv4EntryPeer
}
::= { lcsStatusWanIpAddressesIpv4Table 1 }
LcsStatusWanIpAddressesIpv4Entry ::= SEQUENCE {
lcsStatusWanIpAddressesIpv4EntryPeer DisplayString,
lcsStatusWanIpAddressesIpv4EntryType INTEGER,
lcsStatusWanIpAddressesIpv4EntryIpAddress IpAddress,
lcsStatusWanIpAddressesIpv4EntryIpNetmask IpAddress,
lcsStatusWanIpAddressesIpv4EntryGateway IpAddress,
lcsStatusWanIpAddressesIpv4EntryDnsDefault IpAddress,
lcsStatusWanIpAddressesIpv4EntryDnsBackup IpAddress,
lcsStatusWanIpAddressesIpv4EntryNbnsDefault IpAddress,
lcsStatusWanIpAddressesIpv4EntryNbnsBackup IpAddress,
lcsStatusWanIpAddressesIpv4EntryDomain DisplayString
}
-- {COLUMN} 1.3.6.1.4.1.2356.11.1.4.13.1.1.1
lcsStatusWanIpAddressesIpv4EntryPeer OBJECT-TYPE
SYNTAX DisplayString (SIZE(0..16))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"-- empty --"
::= { lcsStatusWanIpAddressesIpv4Entry 1 }
-- {COLUMN} 1.3.6.1.4.1.2356.11.1.4.13.1.1.2
lcsStatusWanIpAddressesIpv4EntryType OBJECT-TYPE
SYNTAX INTEGER {
eStatic (1),
eDhcp (2),
ePpp (3),
eAutoconfig (4)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"-- empty --"
::= { lcsStatusWanIpAddressesIpv4Entry 2 }
-- {COLUMN} 1.3.6.1.4.1.2356.11.1.4.13.1.1.3
lcsStatusWanIpAddressesIpv4EntryIpAddress OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"-- empty --"
::= { lcsStatusWanIpAddressesIpv4Entry 3 }
-- {COLUMN} 1.3.6.1.4.1.2356.11.1.4.13.1.1.4
lcsStatusWanIpAddressesIpv4EntryIpNetmask OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"-- empty --"
::= { lcsStatusWanIpAddressesIpv4Entry 4 }
-- {COLUMN} 1.3.6.1.4.1.2356.11.1.4.13.1.1.5
lcsStatusWanIpAddressesIpv4EntryGateway OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"-- empty --"
::= { lcsStatusWanIpAddressesIpv4Entry 5 }
-----------------------------------------------------------------------------------------------------------------------------------------------
Code: Select all
[1517695043] HOST ALERT: GM-PS;DOWN;SOFT;1;CRITICAL - Network Unreachable (192.168.172.1)
[1517739798] Warning: A system time change of 44732 seconds (0d 12h 25m 32s forwards in time) has been detected. Compensating...
[1517739839] HOST ALERT: GM-PS;UP;SOFT;2;PING OK - Packet loss = 0%, RTA = 1.21 ms
[1517739842] SERVICE NOTIFICATION: nagiosadmin;GM-PS;HostName;CRITICAL;notify-service-by-email;CRITICAL - Plugin timed out while executing system call
[1517739842] wproc: NOTIFY job 0 from worker Core Worker 650 is a non-check helper but exited with return code 127
[1517739842] wproc: host=GM-PS; service=HostName; contact=nagiosadmin
[1517739842] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
[1517739842] wproc: stderr line 01: /bin/sh: 1: /bin/mail: not found
[1517739842] wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe
[1517739898] SERVICE NOTIFICATION: nagiosadmin;GM-PS;Name;CRITICAL;notify-service-by-email;CRITICAL - Plugin timed out while executing system call
[1517739898] wproc: NOTIFY job 1 from worker Core Worker 651 is a non-check helper but exited with return code 127
[1517739898] wproc: host=GM-PS; service=Name; contact=nagiosadmin
[1517739898] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
[1517739898] wproc: stderr line 01: /bin/sh: 1: /bin/mail: not found
[1517739898] wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe
[1517739999] SERVICE NOTIFICATION: nagiosadmin;GM-PS;Port 1 Bandwidth Usage;UNKNOWN;notify-service-by-email;check_mrtgtraf: Unable to open MRTG log file
[1517739999] wproc: NOTIFY job 2 from worker Core Worker 650 is a non-check helper but exited with return code 127
[1517739999] wproc: host=GM-PS; service=Port 1 Bandwidth Usage; contact=nagiosadmin
[1517739999] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
[1517739999] wproc: stderr line 01: /bin/sh: 1: /bin/mail: not found
[1517739999] wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe
[1517740122] SERVICE NOTIFICATION: nagiosadmin;GM-PS;Uptime;CRITICAL;notify-service-by-email;CRITICAL - Plugin timed out while executing system call
[1517740122] wproc: NOTIFY job 3 from worker Core Worker 651 is a non-check helper but exited with return code 127
[1517740122] wproc: host=GM-PS; service=Uptime; contact=nagiosadmin
[1517740122] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
[1517740122] wproc: stderr line 01: /bin/sh: 1: /bin/mail: not found
[1517740122] wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe
[1517740178] SERVICE NOTIFICATION: nagiosadmin;GM-PS;WAN IP;CRITICAL;notify-service-by-email;CRITICAL - Plugin timed out while executing system call
[1517740178] wproc: NOTIFY job 4 from worker Core Worker 654 is a non-check helper but exited with return code 127
[1517740178] wproc: host=GM-PS; service=WAN IP; contact=nagiosadmin
[1517740178] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
[1517740178] wproc: stderr line 01: /bin/sh: 1: /bin/mail: not found
[1517740178] wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe