Ad Widget

Collapse

Can't monitor process on the server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thelan
    Junior Member
    • May 2009
    • 6

    #1

    Can't monitor process on the server

    Hi everybody,

    After installing Zabbix 1.6.4 on gentoo I can't monitor process running on the server.

    This is realy strange because when I do :
    Shell> zabbix_agentd -t proc.num[apache2]
    proc.num[apache2] [u|11]

    and when I query the serv using zabbix_get it returns 0
    Shell> zabbix_get -s 127.0.0.1 -k proc.num[apache2]
    0

    But I don't have any probleme when I monitor the other hosts.

    Thanks for your help.
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    Are you sure the process is called apache2?

    What happens when you run the following?

    ps -ax | grep apache2 | grep -v apache2 | wc -l

    Some distributions use a different name for apache (apache, apache2, httpd).
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • thelan
      Junior Member
      • May 2009
      • 6

      #3
      grep apache2 | grep -v apache2
      as -v is the option for invert-match :
      Code:
      -v, --invert-match
                    Invert the sense of matching, to select non-matching lines.
      I've run
      Shell> ps ax | grep apache2 | wc -l
      11

      But i show an example with apache but it's the same with mysqld and others process like bash or anything else!

      Comment

      • nerique
        Junior Member
        • Nov 2010
        • 9

        #4
        Hi Thelan,

        did you find any solution to your problem?
        I have exactly the same issue.

        Thanks!

        Comment

        • nelsonab
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2006
          • 1233

          #5
          Did you try the solutions given?
          RHCE, author of zbxapi
          Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
          Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

          Comment

          • nerique
            Junior Member
            • Nov 2010
            • 9

            #6
            Hi Nelsonab,

            which solution are you talking about?

            Comment

            • thelan
              Junior Member
              • May 2009
              • 6

              #7
              The probleme was (for me), that the server was running an GRsec patched kernel

              As Zabbix was running with the zabbix user, it can't see the process form others

              So i've recompiled the agent with the ALLOW_ROOT enable in the source code.

              The other solution is to add zabbix user to an grsecurity exampted group.

              Comment

              • nerique
                Junior Member
                • Nov 2010
                • 9

                #8
                Thanks for your help!

                I enabled ALLOW_ROOT, i'm saved

                GREAT!!!

                Comment

                • thelan
                  Junior Member
                  • May 2009
                  • 6

                  #9
                  You're welcome.

                  But it's discouraged to run Zabbix as root.
                  Consider adding the zabbix user the Grsecurity exampted group.
                  You can find the GID in your kernel configuration

                  Comment

                  Working...