Ad Widget

Collapse

proc.num and multiple Apache instances

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rbarrero
    Junior Member
    • Mar 2007
    • 21

    #1

    proc.num and multiple Apache instances

    Hi all;

    Having a problem using proc.num according to the documetation v1.1. I have a server running multiple instances of apache (httpd)... we have many sites running on one machine using different configuration files and docroots.

    My setup:
    - RHEL ES 4.4
    - zabbix 1.1.4
    - debug level is set to 4
    - sudo is configured properly for user 'zabbix' (tested thoroughly)
    - EnableRemoteCommands=1

    On the remote system (running zabbix_agentd):
    'ps -f -C httpd | grep root'

    Gives the following:
    "/usr/sbin/httpd -f /cluster/funkyweb/httpd/conf/httpd.conf -k start"

    with PID of 17830.

    Still on remote system:

    "cat /proc/17830/cmdline"

    Gives:
    "/usr/sbin/httpd-f/cluster/arincd3phweb/httpd/conf/httpd.conf-kstart"

    ...............

    On zabbix server system:

    "./bin/zabbix_get -s www.site.com -p 10050 -k proc.num[httpd,root,,funky]"

    Reports: 0

    "./bin/zabbix_get -s www.site.com -p 10050 -k proc.num[httpd,root,,httpd]"

    Reports: 7

    From what I can gather... I can use the proc.num() 'cmdline' argument only up to the first space of the actual command line in the ps outout ("-f")... which is why I get 7 instances returned. However, trying to use anything after the initial command doesn't work ("funky").

    Alexei, any ideas?

    Thank you!
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    The problem with parsing of cmdline was fixed in the latest ZABBIX 1.1.6 agents.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • rbarrero
      Junior Member
      • Mar 2007
      • 21

      #3
      still doesn't work

      Hi;

      I've updated all clients and servers to the latest release 1.1.6 and I still have the get the same result. Not only for multiple instances of Apache, but also for some daemons... examples below.

      Help?

      ##BEGIN##
      Command:
      "ps -f -C cg_connector_gnd"

      Result:
      "root 24085 1 0 Feb28 ? 00:00:00 /cluster/cg/connector/bin/cg_connector_gnd"

      "cat /proc/24085/cmdline"
      Result:
      "/cluster/cg/connector/bin/cg_connector_gnd"

      Zabbix Command:
      "./zabbix_get -s cg.site.com -p 10050 -k proc.num[cg_connector_gnd,,,]"

      Result:
      "0"

      Zabbix Command:
      "./zabbix_get -s cg.site.com -p 10050 -k proc.num[cg_connector_gnd]"

      Result:
      "0"
      ##EOF##

      Any help is appreciated, thank you.

      Comment

      • StanZoid
        Member
        • Oct 2005
        • 47

        #4
        I have a similar problem with a new install of 1.4 on MySQL. Here is the reproduction:

        ps -ef returns (among other lines):
        apps 6254 1 0 05:26 ? 00:00:00 /usr/apps/common/debit wp
        apps 6255 1 0 05:26 ? 00:00:00 /usr/apps/common/debit wp


        zabbix_get -s bourne -p 10050 -k proc.num[debit,,,]
        45

        zabbix_get -s bourne -p 10050 -k proc.num[debit,,,wp]
        0 (Should be 2)

        StanZoid
        Last edited by StanZoid; 05-06-2007, 02:21.

        Comment

        • Alexei
          Founder, CEO
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2004
          • 5654

          #5
          Look at http://www.zabbix.com/forum/showthread.php?t=6334 for a fix.
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          Working...