Page 1 of 1

SNMP process check intermittently reports no process running

Posted: Thu May 30, 2013 1:42 pm
by eclypse
This seems to be specific to syslog, but I have hosts of various flavors of Linux that seem to randomly report no syslogd process is running. However, the check can see that syslogd is in the process list.

Code: Select all

[root@mynagiosxi libexec]# ./check_snmp_process.pl -v -H myhost -C mysnmp --v2c -n 'syslogd'
0 0 0 0
Alarm at 15
Filter : syslogd
OID : 1.3.6.1.2.1.25.4.2.1.2.16, Desc : events/2
OID : 1.3.6.1.2.1.25.4.2.1.2.6410, Desc : crond
OID : 1.3.6.1.2.1.25.4.2.1.2.5809, Desc : auditd
OID : 1.3.6.1.2.1.25.4.2.1.2.98, Desc : kblockd/0
OID : 1.3.6.1.2.1.25.4.2.1.2.636, Desc : scsi_eh_0
OID : 1.3.6.1.2.1.25.4.2.1.2.101, Desc : kblockd/3
OID : 1.3.6.1.2.1.25.4.2.1.2.14, Desc : events/0
OID : 1.3.6.1.2.1.25.4.2.1.2.6126, Desc : ypbind
OID : 1.3.6.1.2.1.25.4.2.1.2.266, Desc : cqueue/3
OID : 1.3.6.1.2.1.25.4.2.1.2.6569, Desc : mingetty
OID : 1.3.6.1.2.1.25.4.2.1.2.264, Desc : cqueue/1
OID : 1.3.6.1.2.1.25.4.2.1.2.8909, Desc : vmmemctl
OID : 1.3.6.1.2.1.25.4.2.1.2.15904, Desc : java
OID : 1.3.6.1.2.1.25.4.2.1.2.12, Desc : ksoftirqd/3
OID : 1.3.6.1.2.1.25.4.2.1.2.6338, Desc : sendmail
OID : 1.3.6.1.2.1.25.4.2.1.2.6284, Desc : xinetd
OID : 1.3.6.1.2.1.25.4.2.1.2.672, Desc : ksnapd
OID : 1.3.6.1.2.1.25.4.2.1.2.18, Desc : khelper
OID : 1.3.6.1.2.1.25.4.2.1.2.4838, Desc : kjournald
OID : 1.3.6.1.2.1.25.4.2.1.2.6267, Desc : sshd
OID : 1.3.6.1.2.1.25.4.2.1.2.269, Desc : khubd
OID : 1.3.6.1.2.1.25.4.2.1.2.10, Desc : watchdog/2
OID : 1.3.6.1.2.1.25.4.2.1.2.6018, Desc : dbus-daemon
OID : 1.3.6.1.2.1.25.4.2.1.2.6563, Desc : mingetty
OID : 1.3.6.1.2.1.25.4.2.1.2.6520, Desc : hald-addon-acpi
OID : 1.3.6.1.2.1.25.4.2.1.2.642, Desc : ata/0
OID : 1.3.6.1.2.1.25.4.2.1.2.6215, Desc : snmpd
OID : 1.3.6.1.2.1.25.4.2.1.2.11, Desc : migration/3
OID : 1.3.6.1.2.1.25.4.2.1.2.690, Desc : kjournald
OID : 1.3.6.1.2.1.25.4.2.1.2.8, Desc : migration/2
OID : 1.3.6.1.2.1.25.4.2.1.2.6562, Desc : mingetty
OID : 1.3.6.1.2.1.25.4.2.1.2.6496, Desc : avahi-daemon
OID : 1.3.6.1.2.1.25.4.2.1.2.6478, Desc : atd
OID : 1.3.6.1.2.1.25.4.2.1.2.5865, Desc : irqbalance
OID : 1.3.6.1.2.1.25.4.2.1.2.265, Desc : cqueue/2
OID : 1.3.6.1.2.1.25.4.2.1.2.6565, Desc : mingetty
OID : 1.3.6.1.2.1.25.4.2.1.2.6447, Desc : xfs
OID : 1.3.6.1.2.1.25.4.2.1.2.15, Desc : events/1
OID : 1.3.6.1.2.1.25.4.2.1.2.6152, Desc : nscd
OID : 1.3.6.1.2.1.25.4.2.1.2.365, Desc : aio/0
OID : 1.3.6.1.2.1.25.4.2.1.2.364, Desc : kswapd0
OID : 1.3.6.1.2.1.25.4.2.1.2.573, Desc : kpsmoused
OID : 1.3.6.1.2.1.25.4.2.1.2.17, Desc : events/3
OID : 1.3.6.1.2.1.25.4.2.1.2.363, Desc : pdflush
OID : 1.3.6.1.2.1.25.4.2.1.2.646, Desc : ata_aux
OID : 1.3.6.1.2.1.25.4.2.1.2.644, Desc : ata/2
OID : 1.3.6.1.2.1.25.4.2.1.2.4796, Desc : kmpathd/3
OID : 1.3.6.1.2.1.25.4.2.1.2.4793, Desc : kmpathd/0
OID : 1.3.6.1.2.1.25.4.2.1.2.643, Desc : ata/1
OID : 1.3.6.1.2.1.25.4.2.1.2.7, Desc : watchdog/1
OID : 1.3.6.1.2.1.25.4.2.1.2.4794, Desc : kmpathd/1
OID : 1.3.6.1.2.1.25.4.2.1.2.271, Desc : kseriod
OID : 1.3.6.1.2.1.25.4.2.1.2.6535, Desc : hald-addon-stor
OID : 1.3.6.1.2.1.25.4.2.1.2.5989, Desc : rpc.idmapd
OID : 1.3.6.1.2.1.25.4.2.1.2.6512, Desc : hald
OID : 1.3.6.1.2.1.25.4.2.1.2.645, Desc : ata/3
OID : 1.3.6.1.2.1.25.4.2.1.2.752, Desc : udevd
OID : 1.3.6.1.2.1.25.4.2.1.2.362, Desc : pdflush
OID : 1.3.6.1.2.1.25.4.2.1.2.6184, Desc : hpiod
OID : 1.3.6.1.2.1.25.4.2.1.2.2, Desc : migration/0
OID : 1.3.6.1.2.1.25.4.2.1.2.6303, Desc : ntpd
OID : 1.3.6.1.2.1.25.4.2.1.2.5, Desc : migration/1
OID : 1.3.6.1.2.1.25.4.2.1.2.4841, Desc : kjournald
OID : 1.3.6.1.2.1.25.4.2.1.2.6196, Desc : python
OID : 1.3.6.1.2.1.25.4.2.1.2.6526, Desc : hald-addon-keyb
OID : 1.3.6.1.2.1.25.4.2.1.2.718, Desc : kauditd
OID : 1.3.6.1.2.1.25.4.2.1.2.3, Desc : ksoftirqd/0
OID : 1.3.6.1.2.1.25.4.2.1.2.9, Desc : ksoftirqd/2
OID : 1.3.6.1.2.1.25.4.2.1.2.5901, Desc : portmap
OID : 1.3.6.1.2.1.25.4.2.1.2.18717, Desc : haproxy
OID : 1.3.6.1.2.1.25.4.2.1.2.6564, Desc : mingetty
OID : 1.3.6.1.2.1.25.4.2.1.2.6, Desc : ksoftirqd/1
OID : 1.3.6.1.2.1.25.4.2.1.2.102, Desc : kacpid
OID : 1.3.6.1.2.1.25.4.2.1.2.6105, Desc : hidd
OID : 1.3.6.1.2.1.25.4.2.1.2.25480, Desc : acpid
OID : 1.3.6.1.2.1.25.4.2.1.2.1, Desc : init
OID : 1.3.6.1.2.1.25.4.2.1.2.20280, Desc : klogd
OID : 1.3.6.1.2.1.25.4.2.1.2.13, Desc : watchdog/3
OID : 1.3.6.1.2.1.25.4.2.1.2.100, Desc : kblockd/2
OID : 1.3.6.1.2.1.25.4.2.1.2.366, Desc : aio/1
OID : 1.3.6.1.2.1.25.4.2.1.2.91, Desc : kthread
OID : 1.3.6.1.2.1.25.4.2.1.2.4795, Desc : kmpathd/2
OID : 1.3.6.1.2.1.25.4.2.1.2.20277, Desc : syslogd
1.3.6.1.2.1.25.4.2.1.7.20277
OID : 1.3.6.1.2.1.25.4.2.1.2.367, Desc : aio/2
OID : 1.3.6.1.2.1.25.4.2.1.2.6495, Desc : avahi-daemon
OID : 1.3.6.1.2.1.25.4.2.1.2.5811, Desc : audispd
OID : 1.3.6.1.2.1.25.4.2.1.2.9123, Desc : vmtoolsd
OID : 1.3.6.1.2.1.25.4.2.1.2.6513, Desc : hald-runner
OID : 1.3.6.1.2.1.25.4.2.1.2.4, Desc : watchdog/0
OID : 1.3.6.1.2.1.25.4.2.1.2.99, Desc : kblockd/1
OID : 1.3.6.1.2.1.25.4.2.1.2.6066, Desc : pcscd
OID : 1.3.6.1.2.1.25.4.2.1.2.6355, Desc : gpm
OID : 1.3.6.1.2.1.25.4.2.1.2.5940, Desc : rpc.statd
OID : 1.3.6.1.2.1.25.4.2.1.2.368, Desc : aio/3
OID : 1.3.6.1.2.1.25.4.2.1.2.6330, Desc : sendmail
OID : 1.3.6.1.2.1.25.4.2.1.2.263, Desc : cqueue/0
OID : 1.3.6.1.2.1.25.4.2.1.2.6567, Desc : mingetty
Process 20277 in state 3 using 700, and 9621 CPU
0 process matching syslogd (<= 0 : CRITICAL)
Other times, the check passes without issue. In both cases, you can see that syslogd shows up in the list of processes.

Code: Select all

[root@mynagiosxi libexec]# ./check_snmp_process_wizard.pl -v -H myhost -C mysnmp --v2c -n 'syslogd'
0 0 0 0
Alarm at 15
Filter : syslogd
OID : 1.3.6.1.2.1.25.4.2.1.2.16, Desc : events/2
OID : 1.3.6.1.2.1.25.4.2.1.2.6410, Desc : crond
OID : 1.3.6.1.2.1.25.4.2.1.2.5809, Desc : auditd
OID : 1.3.6.1.2.1.25.4.2.1.2.98, Desc : kblockd/0
OID : 1.3.6.1.2.1.25.4.2.1.2.636, Desc : scsi_eh_0
OID : 1.3.6.1.2.1.25.4.2.1.2.101, Desc : kblockd/3
OID : 1.3.6.1.2.1.25.4.2.1.2.14, Desc : events/0
OID : 1.3.6.1.2.1.25.4.2.1.2.6126, Desc : ypbind
OID : 1.3.6.1.2.1.25.4.2.1.2.266, Desc : cqueue/3
OID : 1.3.6.1.2.1.25.4.2.1.2.6569, Desc : mingetty
OID : 1.3.6.1.2.1.25.4.2.1.2.264, Desc : cqueue/1
OID : 1.3.6.1.2.1.25.4.2.1.2.8909, Desc : vmmemctl
OID : 1.3.6.1.2.1.25.4.2.1.2.15904, Desc : java
OID : 1.3.6.1.2.1.25.4.2.1.2.12, Desc : ksoftirqd/3
OID : 1.3.6.1.2.1.25.4.2.1.2.6338, Desc : sendmail
OID : 1.3.6.1.2.1.25.4.2.1.2.6284, Desc : xinetd
OID : 1.3.6.1.2.1.25.4.2.1.2.672, Desc : ksnapd
OID : 1.3.6.1.2.1.25.4.2.1.2.18, Desc : khelper
OID : 1.3.6.1.2.1.25.4.2.1.2.4838, Desc : kjournald
OID : 1.3.6.1.2.1.25.4.2.1.2.6267, Desc : sshd
OID : 1.3.6.1.2.1.25.4.2.1.2.269, Desc : khubd
OID : 1.3.6.1.2.1.25.4.2.1.2.10, Desc : watchdog/2
OID : 1.3.6.1.2.1.25.4.2.1.2.6018, Desc : dbus-daemon
OID : 1.3.6.1.2.1.25.4.2.1.2.6563, Desc : mingetty
OID : 1.3.6.1.2.1.25.4.2.1.2.6520, Desc : hald-addon-acpi
OID : 1.3.6.1.2.1.25.4.2.1.2.642, Desc : ata/0
OID : 1.3.6.1.2.1.25.4.2.1.2.6215, Desc : snmpd
OID : 1.3.6.1.2.1.25.4.2.1.2.11, Desc : migration/3
OID : 1.3.6.1.2.1.25.4.2.1.2.690, Desc : kjournald
OID : 1.3.6.1.2.1.25.4.2.1.2.8, Desc : migration/2
OID : 1.3.6.1.2.1.25.4.2.1.2.6562, Desc : mingetty
OID : 1.3.6.1.2.1.25.4.2.1.2.6496, Desc : avahi-daemon
OID : 1.3.6.1.2.1.25.4.2.1.2.6478, Desc : atd
OID : 1.3.6.1.2.1.25.4.2.1.2.5865, Desc : irqbalance
OID : 1.3.6.1.2.1.25.4.2.1.2.265, Desc : cqueue/2
OID : 1.3.6.1.2.1.25.4.2.1.2.6565, Desc : mingetty
OID : 1.3.6.1.2.1.25.4.2.1.2.6447, Desc : xfs
OID : 1.3.6.1.2.1.25.4.2.1.2.15, Desc : events/1
OID : 1.3.6.1.2.1.25.4.2.1.2.6152, Desc : nscd
OID : 1.3.6.1.2.1.25.4.2.1.2.365, Desc : aio/0
OID : 1.3.6.1.2.1.25.4.2.1.2.364, Desc : kswapd0
OID : 1.3.6.1.2.1.25.4.2.1.2.573, Desc : kpsmoused
OID : 1.3.6.1.2.1.25.4.2.1.2.17, Desc : events/3
OID : 1.3.6.1.2.1.25.4.2.1.2.363, Desc : pdflush
OID : 1.3.6.1.2.1.25.4.2.1.2.646, Desc : ata_aux
OID : 1.3.6.1.2.1.25.4.2.1.2.644, Desc : ata/2
OID : 1.3.6.1.2.1.25.4.2.1.2.4796, Desc : kmpathd/3
OID : 1.3.6.1.2.1.25.4.2.1.2.4793, Desc : kmpathd/0
OID : 1.3.6.1.2.1.25.4.2.1.2.643, Desc : ata/1
OID : 1.3.6.1.2.1.25.4.2.1.2.7, Desc : watchdog/1
OID : 1.3.6.1.2.1.25.4.2.1.2.4794, Desc : kmpathd/1
OID : 1.3.6.1.2.1.25.4.2.1.2.271, Desc : kseriod
OID : 1.3.6.1.2.1.25.4.2.1.2.6535, Desc : hald-addon-stor
OID : 1.3.6.1.2.1.25.4.2.1.2.5989, Desc : rpc.idmapd
OID : 1.3.6.1.2.1.25.4.2.1.2.6512, Desc : hald
OID : 1.3.6.1.2.1.25.4.2.1.2.645, Desc : ata/3
OID : 1.3.6.1.2.1.25.4.2.1.2.752, Desc : udevd
OID : 1.3.6.1.2.1.25.4.2.1.2.362, Desc : pdflush
OID : 1.3.6.1.2.1.25.4.2.1.2.6184, Desc : hpiod
OID : 1.3.6.1.2.1.25.4.2.1.2.2, Desc : migration/0
OID : 1.3.6.1.2.1.25.4.2.1.2.6303, Desc : ntpd
OID : 1.3.6.1.2.1.25.4.2.1.2.5, Desc : migration/1
OID : 1.3.6.1.2.1.25.4.2.1.2.4841, Desc : kjournald
OID : 1.3.6.1.2.1.25.4.2.1.2.6196, Desc : python
OID : 1.3.6.1.2.1.25.4.2.1.2.6526, Desc : hald-addon-keyb
OID : 1.3.6.1.2.1.25.4.2.1.2.718, Desc : kauditd
OID : 1.3.6.1.2.1.25.4.2.1.2.3, Desc : ksoftirqd/0
OID : 1.3.6.1.2.1.25.4.2.1.2.9, Desc : ksoftirqd/2
OID : 1.3.6.1.2.1.25.4.2.1.2.5901, Desc : portmap
OID : 1.3.6.1.2.1.25.4.2.1.2.18717, Desc : haproxy
OID : 1.3.6.1.2.1.25.4.2.1.2.6564, Desc : mingetty
OID : 1.3.6.1.2.1.25.4.2.1.2.6, Desc : ksoftirqd/1
OID : 1.3.6.1.2.1.25.4.2.1.2.102, Desc : kacpid
OID : 1.3.6.1.2.1.25.4.2.1.2.6105, Desc : hidd
OID : 1.3.6.1.2.1.25.4.2.1.2.25480, Desc : acpid
OID : 1.3.6.1.2.1.25.4.2.1.2.1, Desc : init
OID : 1.3.6.1.2.1.25.4.2.1.2.20280, Desc : klogd
OID : 1.3.6.1.2.1.25.4.2.1.2.13, Desc : watchdog/3
OID : 1.3.6.1.2.1.25.4.2.1.2.100, Desc : kblockd/2
OID : 1.3.6.1.2.1.25.4.2.1.2.366, Desc : aio/1
OID : 1.3.6.1.2.1.25.4.2.1.2.91, Desc : kthread
OID : 1.3.6.1.2.1.25.4.2.1.2.4795, Desc : kmpathd/2
OID : 1.3.6.1.2.1.25.4.2.1.2.20277, Desc : syslogd
1.3.6.1.2.1.25.4.2.1.7.20277
OID : 1.3.6.1.2.1.25.4.2.1.2.367, Desc : aio/2
OID : 1.3.6.1.2.1.25.4.2.1.2.6495, Desc : avahi-daemon
OID : 1.3.6.1.2.1.25.4.2.1.2.5811, Desc : audispd
OID : 1.3.6.1.2.1.25.4.2.1.2.9123, Desc : vmtoolsd
OID : 1.3.6.1.2.1.25.4.2.1.2.6513, Desc : hald-runner
OID : 1.3.6.1.2.1.25.4.2.1.2.4, Desc : watchdog/0
OID : 1.3.6.1.2.1.25.4.2.1.2.99, Desc : kblockd/1
OID : 1.3.6.1.2.1.25.4.2.1.2.6066, Desc : pcscd
OID : 1.3.6.1.2.1.25.4.2.1.2.6355, Desc : gpm
OID : 1.3.6.1.2.1.25.4.2.1.2.5940, Desc : rpc.statd
OID : 1.3.6.1.2.1.25.4.2.1.2.368, Desc : aio/3
OID : 1.3.6.1.2.1.25.4.2.1.2.6330, Desc : sendmail
OID : 1.3.6.1.2.1.25.4.2.1.2.263, Desc : cqueue/0
OID : 1.3.6.1.2.1.25.4.2.1.2.6567, Desc : mingetty
Process 20277 in state 2 using 700, and 9719 CPU
1 process matching syslogd (> 0)
Any ideas why this is failing?

Re: SNMP process check intermittently reports no process run

Posted: Thu May 30, 2013 2:39 pm
by abrist
hmmm. This is interesting. There is almost no difference between the checks. Is the system under heavy load when the check fails?

Re: SNMP process check intermittently reports no process run

Posted: Thu May 30, 2013 3:17 pm
by eclypse
I don't think it's load related, but I just spotted a difference in the output that I didn't catch before. When the check passes, it reports "Process 20277 in state 2", when it fails, it reports "Process 20277 in state 3".

Re: SNMP process check intermittently reports no process run

Posted: Thu May 30, 2013 4:32 pm
by abrist
Checking the OID/object 1.3.6.1.2.1.25.4.2.1.7/hrSWRunStatus:
http://tools.cisco.com/Support/SNMP/do/ ... 25.4.2.1.7
Values
1 : running
2 : runnable
3 : notRunnable
4 : invalid
MIB HOST-RESOURCES-MIB ;
Description
"The status of this running piece of software.
Setting this value to invalid(4) shall cause this
software to stop running and to be unloaded. Sets to
other values are not valid."

Re: SNMP process check intermittently reports no process run

Posted: Fri May 31, 2013 12:41 pm
by eclypse
Here is the section of the code which is resulting in the count of syslogd processes to report 0. It says that unless the state is equal to 1 or 2, do not increment the total count of processes. So, we either need to modify the plugin to accept this "3 - notRunnable" aka uninterruptible sleep state as valid, or investigate further as to why the syslogd service is being put into this state in the first place, and whether or not that is a sign of a problem or not.

Code: Select all

#Check if process are in running or runnable state
for (my $i=0; $i< $num_int; $i++) {
   my $state=$result_cons{$proc_run_state . "." . $tindex[$i]};
   my $tmpmem=$result_cons{$proc_mem_table . "." . $tindex[$i]};
   my $tmpcpu=$result_cons{$proc_cpu_table . "." . $tindex[$i]};
   verb ("Process $tindex[$i] in state $state using $tmpmem, and $tmpcpu CPU");
   if (!isnotnum($state)) { # check argument is numeric (can be NoSuchInstance)
     $num_int_ok++ if (($state == 1) || ($state ==2));
   }
}

Re: SNMP process check intermittently reports no process run

Posted: Mon Jun 03, 2013 8:24 pm
by scottwilkerson
Not sure why your syslogd on this server is being marked notRunnable, might have to do more digging on this scenerio