Ad Widget

Collapse

Diffrent answers..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Buc
    Junior Member
    • Dec 2007
    • 2

    #1

    Diffrent answers..

    Hello,

    I've setuped custom check into zabbix_agentd.conf, before it i have checked in into console:
    Code:
    [root@host ~]# PID=`/etc/init.d/psa status | sed -e "s/\([^0-9]\)//g"`; if [[ -z $PID ]]; then echo 0; else echo 1; fi
    1
    [root@host ~]# /etc/init.d/psa status
    httpsd (pid 29856 20394 20231 7822) is running...
    [root@host ~]# PID=`/etc/init.d/drwebd status | sed -e "s/\([^0-9]\)//g"`; if [[ -z $PID ]]; then echo 0; else echo 1; fi
    1
    [root@host ~]# /etc/init.d/drwebd status
    drwebd (pid 20411) is running...
    Looks ok. Lets see to zabbix_agentd.log:

    Code:
      1949:20080919:204435 Run remote command [PID=`/etc/init.d/psa status | sed -e "s/\([^0-9]\)//g"`; if [[ -z $PID ]]; then echo 0; else echo 1; fi] Result [1] [1]...
      1949:20080919:204435 Sending back [1]
    .............
      1949:20080919:204436 Run remote command [PID=`/etc/init.d/drwebd status | sed -e "s/\([^0-9]\)//g"`; if [[ -z $PID ]]; then echo 0; else echo 1; fi] Result [1] [0]...
      1949:20080919:204436 Sending back [0]
    Could somebody helps me to find the reason of diffrent?

    CentOS5.2
    zabbix-agent-1.4.5-2.el5

    Best regards
  • Buc
    Junior Member
    • Dec 2007
    • 2

    #2
    Permissions

    Looks like permissions problem:

    Code:
    # su zabbix
    $ PID=`/etc/init.d/psa status 2>/dev/null | sed -e "s/\([^0-9]\)//g"`; if [[ -z $PID ]]; then echo 0; else echo 1; fi
    1
    $ PID=`/etc/init.d/drwebd status | sed -e "s/\([^0-9]\)//g"`; if [[ -z $PID ]]; then echo 0; else echo 1; fi
    0
    $ /etc/init.d/drwebd status
    drwebd dead but subsys locked
    # /etc/init.d/drwebd status
    drwebd (pid 20411) is running...
    suppose that is security feature...

    Comment

    Working...