R: [Nagiosplug-help] Check_snmp and Could not open pipe: error VERSION 2
Pietro Bandera
pietrob at lansystems.it
Wed Jun 11 07:42:13 CEST 2003
This issue is not related to the problem you are having. It was about
the
check_netsaint/check_nagios plugins.
run the check_snmp command in verbose mode
run the check_snmp command under strace
post the output of the two..
--
-sg
--------------------------------
Here they are:
Verbose mode:
[root at dns plugins]# /root/ftplan/nagios-plugins-1.3.0/plugins/check_snmp
10.11.58.44 -C public -o
enterprises.ibm.ibmProd.ibmServeRaid.ibmServeRaidMIB.ibmServeRaidMibObje
cts.ibmServeRaidInfo.ibmServeRaidPhysDeviceTable.ibmServeRaidPhysDeviceE
ntry.ibmServeRaidPhysDeviceStatus.\"113\" -l Disco -s "online(2)"
--verbose /usr/bin/snmpget -m ALL -v 1 -c public 10.11.58.44:161
enterprises.ibm.ibmProd.ibmServeRaid.ibmServeRaidMIB.ibmServeRaidMibObje
cts.ibmServeRaidInfo.ibmServeRaidPhysDeviceTable.ibmServeRaidPhysDeviceE
ntry.ibmServeRaidPhysDeviceStatus."113"
Could not open pipe: /usr/bin/snmpget -m ALL -v 1 -c public
10.11.58.44:161
enterprises.ibm.ibmProd.ibmServeRaid.ibmServeRaidMIB.ibmServeRaidMibObje
cts.ibmServeRaidInfo.ibmServeRaidPhysDeviceTable.ibmServeRaidPhysDeviceE
ntry.ibmServeRaidPhysDeviceStatus."113"
Strace:
[root at dns plugins]# strace
/root/ftplan/nagios-plugins-1.3.0/plugins/check_snmp --verbose
10.11.58.44 -C public -o
enterprises.ibm.ibmProd.ibmServeRaid.ibmServeRaidMIB.ibmServeRaidMibObje
cts.ibmServeRaidInfo.ibmServeRaidPhysDeviceTable.ibmServeRaidPhysDeviceE
ntry.ibmServeRaidPhysDeviceStatus.\"113\" -l Disco -s "online(2)"
execve("/root/ftplan/nagios-plugins-1.3.0/plugins/check_snmp",
["/root/ftplan/nagios-plugins-1.3.0/plugins/check_snmp", "--verbose",
"10.11.58.44", "-C", "public", "-o",
"enterprises.ibm.ibmProd.ibmServeRaid.ibmServeRaidMIB.ibmServeRaidMibObj
ects.ibmServeRaidInfo.ibmServeRaidPhysDeviceTable.ibmServeRaidPhysDevice
Entry.ibmServeRaidPhysDeviceStatus.\"113\"", "-l", "Disco", "-s",
"online(2)"], [/* 18 vars */]) = 0 uname({sys="Linux",
node="dns.lansystems.it", ...}) = 0
brk(0) = 0x804f7b0
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=24707, ...}) = 0
old_mmap(NULL, 24707, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3) = 0
open("/lib/libutil.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\16\0\000"...,
1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=11174, ...}) = 0
old_mmap(NULL, 11080, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x4001b000
mprotect(0x4001d000, 2888, PROT_NONE) = 0
old_mmap(0x4001d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x1000) = 0x4001d000
close(3) = 0
open("/lib/i686/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0Pv\1B4\0"...,
1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=1402035, ...}) =
0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x4001e000 old_mmap(0x42000000, 1264960, PROT_READ|PROT_EXEC,
MAP_PRIVATE, 3, 0) = 0x42000000 mprotect(0x4212c000, 36160, PROT_NONE)
= 0 old_mmap(0x4212c000, 20480, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x12c000) = 0x4212c000 old_mmap(0x42131000,
15680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0)
= 0x42131000
close(3) = 0
munmap(0x40014000, 24707) = 0
brk(0) = 0x804f7b0
brk(0x804f7e0) = 0x804f7e0
brk(0x8050000) = 0x8050000
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40014000 write(1, "/usr/bin/snmpget -m ALL -v 1 -c "...,
240/usr/bin/snmpget -m ALL -v 1 -c public 10.11.58.44:161
enterprises.ibm.ibmProd.ibmServeRaid.ibmServeRaidMIB.ibmServeRaidMibObje
cts.ibmServeRaidInfo.ibmServeRaidPhysDeviceTable.ibmServeRaidPhysDeviceE
ntry.ibmServeRaidPhysDeviceStatus."113"
) = 240
getrlimit(0x4, 0xbfffdfe0) = 0
setrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=RLIM_INFINITY}) = 0
write(1, "Could not open pipe: /usr/bin/sn"..., 261Could not open pipe:
/usr/bin/snmpget -m ALL -v 1 -c public 10.11.58.44:161
enterprises.ibm.ibmProd.ibmServeRaid.ibmServeRaidMIB.ibmServeRaidMibObje
cts.ibmServeRaidInfo.ibmServeRaidPhysDeviceTable.ibmServeRaidPhysDeviceE
ntry.ibmServeRaidPhysDeviceStatus."113"
) = 261
munmap(0x40014000, 4096) = 0
_exit(3) = ?
[root at dns plugins]#
As we can see it executes the right command
/usr/bin/snmpget -m ALL -v 1 -c public 10.11.58.44:161
enterprises.ibm.ibmProd.ibmServeRaid.ibmServeRaidMIB.ibmServeRaidMibObje
cts.ibmServeRaidInfo.ibmServeRaidPhysDeviceTable.ibmServeRaidPhysDeviceE
ntry.ibmServeRaidPhysDeviceStatus."113"
But i dunno why there is a cuould not open a pipe error at the begining
of that command :?
More information about the Help
mailing list