Ad Widget

Collapse

How can I make zabbix monitor of the agent is still running.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hans dmacron0
    Junior Member
    • Aug 2010
    • 10

    #1

    How can I make zabbix monitor of the agent is still running.

    Hi,

    I am searching for a way to make zabbix monitor if the zabbix agent is running on a host. I need to know because I want to make al agent triggers dependend on the fact that the agent is running. If the agent is down I just want to get one message about it. All the other test should not report any failures.

    I could only find a test that test the zabbix agent version.

    Any help would be nice.

    Thanks

    Hans de Groot
  • MrKen
    Senior Member
    • Oct 2008
    • 652

    #2
    On the Template_Linux there is an item called "Number of running processes zabbix_agentd"
    with a key = proc.num[zabbix_agentd]

    It has a trigger of {MyServer: proc.num[zabbix_agentd].last(0)}<1

    This will alert you if there are zero instances of zabbix agent running.

    MrKen
    Last edited by MrKen; 14-08-2010, 09:09. Reason: remove smiley between ': proc'
    Disclaimer: All of the above is pure speculation.

    Comment

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

      #3
      Originally posted by MrKen
      On the Template_Linux there is an item called "Number of running processes zabbix_agentd"
      with a key = proc.num[zabbix_agentd]

      It has a trigger of {MyServer: proc.num[zabbix_agentd].last(0)}<1

      This will alert you if there are zero instances of zabbix agent running.

      MrKen

      There is a small chicken and egg problem here. How can you know how many agents are running when there is no agent running? Perhaps we should leave that question for some Buddhist monks. ;-)

      Another way would be to use the nodata() function. Use that function against the most frequently checked item on the host, or an important metric like network or cpu. Thus if you check CPU once a minute you should set you nodata trigger to 120 (2 minutes), this means if the CPU hasn't been updated in 2 minutes assume the host is down. If you update the CPU every 30 seconds then you might be able to consider 60 or 90 seconds for nodata. Either way it should be a multiple of how often the item is checked at at least double. This will allow you to account for a network or server glitch which may skip one data point.

      Hope that helps.
      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

      • ravi.bharat
        Junior Member
        • Jan 2014
        • 1

        #4
        issue intrigger configuration for Zabbix agent

        Hi all,

        I have created the trigger as mentioned below but when i am stopping the Zabbix agent proicess in linux machine it showing blank (no data or value) and event is not creating in Zabbix.

        Trigger configured :

        {Template zabbix agent process linuxroc.num[zabbix_agentd].last(0)}<1

        Please help me to monitor the zabbix agent as a process.

        Comment

        • syndeysider
          Senior Member
          • Oct 2013
          • 115

          #5
          Hi

          So to answer your question :

          {Template App Zabbix Agent:agent.ping.nodata(5m)}=1

          Instead of monitoring the process, you can used agent.ping.nodata. You might have the process running but stuck? IN your case you might wish to use the .nodata to check that no data is being returned.

          Also, I found this not useful to identify if a host is actually down and out so I use :

          ({Template App Zabbix Agent:zabbix[host,agent,available].last(0)}#1)&({Template App Zabbix Agent:icmppingloss[,3,,,300].avg(240)}=100)

          Comment

          Working...