Ad Widget

Collapse

Zabbix receives some alerts but not others.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jackiebaron
    Junior Member
    • Oct 2014
    • 17

    #1

    Zabbix receives some alerts but not others.

    I recently built a CentOS box, installed the Zabbix agent, got the Zabbix server to recognise it and add it to the hosts inventory. I issued some templates to that node, Template_app_ntp, Template_app_http, sendmail, Template_OS_Linux and one or two others.

    When I halt the http services on the node (apachectl stop), an alert shows up in the Zabbix dashboard confirming indeed that "Service HTTP is down on node <mynode>"
    I didn't do any modifying or anything on these templates, just issued them as they are.

    When I halt the ntp service (service ntpd stop) or the sendmail service (service sendmail stop) on the node, nothing shows up in the Zabbix management server at all. I've waited a minute, 5 minutes, 10 minutes and nothing so it's clear they are not working like http reporting.

    What have I overlooked or what could possibly be wrong with something like this that I'm sure is very simple?

    Thanks for any help
  • evertonco
    Member
    • Aug 2014
    • 75

    #2
    You must check the items created on your host after link it to templates. In the NTP Template, the trigger check if ntp service is up. Not ntpd.

    Comment

    • jackiebaron
      Junior Member
      • Oct 2014
      • 17

      #3
      Originally posted by evertonco
      You must check the items created on your host after link it to templates. In the NTP Template, the trigger check if ntp service is up. Not ntpd.
      I'm sorry but I don't understand. I mean what is the point of the ntp template if it can't do the simplest check of whether ntp is up or down?

      If I execute the following command:
      zabbix_get -s <mynode> -k proc.num[ntpd]

      it returns a "1"

      If I execute:
      zabbix_get -s <mynode. -k proc.num[ntp]

      it returns a "0"

      So It recognises that there is 1 ntpd process running.
      So what...ALL I want is for when I kill that ntpd process that it shows up in the Zabbix GUI that it's gone down, like http.

      Do you understand?

      Comment

      • evertonco
        Member
        • Aug 2014
        • 75

        #4
        Sorry, my mistake. My previous answer was incomplete. On the NTP template (The official templates), the item key used is net.tcp.service[ntp].

        But, ntp service (at least ntpd) not run over TCP (protocol definition). Therefore, zabbix cannot check if ntp is up or down using this item key.

        With item key proc.num[ntpd,,run] (Zabbix agent item keys), you can check if ntpd process is running and can create a trigger based on this item like {hostroc.num[ntpd,,run].last()=0}.

        Comment

        • jackiebaron
          Junior Member
          • Oct 2014
          • 17

          #5
          Originally posted by evertonco
          Sorry, my mistake. My previous answer was incomplete. On the NTP template (The official templates), the item key used is net.tcp.service[ntp].

          But, ntp service (at least ntpd) not run over TCP (protocol definition). Therefore, zabbix cannot check if ntp is up or down using this item key.

          With item key proc.num[ntpd,,run] (Zabbix agent item keys), you can check if ntpd process is running and can create a trigger based on this item like {hostroc.num[ntpd,,run].last()=0}.
          Hi evertonco,

          Thank you. When I execute:

          zabbix_get -s <myhost> -k proc.num[ntpd]

          it returns a 1 showing that ntpd is running....BUT

          When I execute:

          zabbix_get -s <myhost> -k proc.num[ntpd,,run]

          it returns a 0

          ???

          Comment

          • evertonco
            Member
            • Aug 2014
            • 75

            #6
            Use without run, then. (proc.num[ntpd])

            The ntpd process not remais in the running state all the time.

            Comment

            Working...