I'm having issues getting proc.num to return anything other than 0 for certain services. Main one is Apache. Monitoring an open port isn't good enough, so I want to check the process is alive.
See below for info:
Am I being really thick? What am I missing?
See below for info:
Code:
[root@servername ~]# ps aux | grep httpd root 991 0.0 0.1 259792 9328 ? Ss Apr06 0:41 /usr/sbin/httpd -DFOREGROUND apache 182560 0.0 0.0 258616 4180 ? S Apr17 0:00 /usr/sbin/httpd -DFOREGROUND apache 182561 0.0 0.0 259792 3912 ? S Apr17 0:02 /usr/sbin/httpd -DFOREGROUND apache 182562 0.0 0.1 612156 7252 ? Sl Apr17 1:04 /usr/sbin/httpd -DFOREGROUND apache 182571 0.0 0.1 1070908 8048 ? Sl Apr17 1:03 /usr/sbin/httpd -DFOREGROUND apache 182596 0.0 0.1 1333052 8332 ? Sl Apr17 1:02 /usr/sbin/httpd -DFOREGROUND apache 187496 0.0 0.1 1857340 8044 ? Sl Apr17 0:55 /usr/sbin/httpd -DFOREGROUND root 265436 0.0 0.0 112648 956 pts/0 S+ 12:06 0:00 grep --color=auto httpd [root@servername ~]# zabbix_get -s 127.0.0.1 -k 'proc.num[,apache,,"/usr/sbin/httpd -DFOREGROUND"]' 0 [root@servername ~]# zabbix_get -s 127.0.0.1 -k 'proc.num[,,,httpd]' 0 [root@servername ~]# zabbix_get -s 127.0.0.1 -k 'proc.num[httpd]' 0 [root@servername ~]# zabbix_get -s 127.0.0.1 -k 'proc.num[,apache]' 0 [root@sid-plesk-01 ~]# zabbix_get -s 127.0.0.1 -k 'proc.num[zabbix_agentd]' 6 [[root@servername ~]# sestatus SELinux status: disabled [[root@servername ~]# cat /etc/sysconfig/selinux # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=permissive # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted
Comment