Ad Widget

Collapse

proc.num sending back 0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hm55
    Junior Member
    • Aug 2015
    • 6

    #1

    proc.num sending back 0

    Hello,

    When i start the ntpd process on my centOS distrib and check if zabbix can monitor him with :
    # zabbix_agent -t proc.num[ntpd]

    proc.num[ntpd] [u|1]
    i have 1 and when i look in log file with debug mode i have 0
    8259:20150803:161543.121 Requested [proc.num[ntpd]]
    8259:20150803:161543.127 Sending back [0]
    Do you know why i can't get the real value ?

    Thanks !
  • akbar415
    Senior Member
    • May 2015
    • 119

    #2
    Originally posted by hm55
    Hello,

    When i start the ntpd process on my centOS distrib and check if zabbix can monitor him with :

    i have 1 and when i look in log file with debug mode i have 0


    Do you know why i can't get the real value ?

    Thanks !
    On Zabbix server. Try this
    Code:
    zabbix_get -s hostname -k"proc.num[ntpd]"
    The result must be "1"

    Comment

    • hm55
      Junior Member
      • Aug 2015
      • 6

      #3
      It's same thing (0) and in log i see the same Sending Back

      Comment

      • akbar415
        Senior Member
        • May 2015
        • 119

        #4
        Originally posted by hm55
        It's same thing (0) and in log i see the same Sending Back
        Code:
        ps -ef |grep ntp |grep -v grep
        ntp       1471     1  0 10:50 ?        00:00:00 [B][COLOR="green"][FONT="Arial Black"]ntpd[/FONT][/COLOR][/B] -u ntp:ntp -p /var/run/ntpd.pid -g
        What's is in green is what you need to parse as argument to zabbix.

        Comment

        • hm55
          Junior Member
          • Aug 2015
          • 6

          #5
          And it's preciselly what i have in ps command but always sending back 0 in zabbix_get and in debug log

          #ps -ef |grep ntp |grep -v grep
          ntp 8160 1 0 Aug03 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g

          Comment

          • hm55
            Junior Member
            • Aug 2015
            • 6

            #6
            Same problem with nginx also

            Comment

            • hm55
              Junior Member
              • Aug 2015
              • 6

              #7
              Up !
              (CentOS 6.5 | Zabbix 2.4.6)

              Comment

              • akbar415
                Senior Member
                • May 2015
                • 119

                #8
                Code:
                zabbix_agent -s hostname -k"system.uptime"
                or
                zabbix_agent -s hostname -k"agent.version"
                To check if the communication between agent and server are ok.

                Comment

                • kloczek
                  Senior Member
                  • Jun 2006
                  • 1771

                  #9
                  Originally posted by hm55
                  And it's preciselly what i have in ps command but always sending back 0 in zabbix_get and in debug log
                  Zabbix agent is not running from root account.
                  Probably you have enabled SELinux and/or you have blocked access to procfs for zabbiix user.
                  http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                  https://kloczek.wordpress.com/
                  zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                  My zabbix templates https://github.com/kloczek/zabbix-templates

                  Comment

                  • hm55
                    Junior Member
                    • Aug 2015
                    • 6

                    #10
                    Originally posted by kloczek
                    Zabbix agent is not running from root account.
                    Probably you have enabled SELinux and/or you have blocked access to procfs for zabbiix user.
                    Ok,
                    So the selinux-policy was in version 3.7.19-231 that have a policy mistake when i update the policy it fix the problem !

                    Thanks !

                    Comment

                    Working...