Ad Widget

Collapse

How can i count active host?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • israferna
    Junior Member
    • Dec 2013
    • 1

    #1

    How can i count active host?

    Hi!,
    I´m using zabbix 2.2.2 and i want to know how many davices are up at , for example, 5 p.m. and sent that by e-mail. The e-mail job is just done, but i don´t how to count the devices.
    I was thinking about using the count function in a trigger, but i´m not sure if that would work.
    If someone could help me, it would be great.
    Thank in advance.
  • CarlDafs
    Junior Member
    • Aug 2020
    • 9

    #2
    If you ever figured this out, please share. I'm faced with the same problem with no end in sight. *edit* I'm on version 5.0.2 of the appliance.
    Last edited by CarlDafs; 20-08-2020, 16:36.

    Comment

    • Jonshion
      Junior Member
      • Aug 2020
      • 1

      #3
      If you ever figured this out,

      Comment

      • CarlDafs
        Junior Member
        • Aug 2020
        • 9

        #4
        Originally posted by splitek
        OMG... Still using 2.2.2?

        BTW.
        Look in doc: https://www.zabbix.com/documentation...types/internal
        Especially this: zabbix[host,<type>,available]
        So if I understood this correctly, I created a template called DeviceCount (because I want to be able to apply this to many hosts in a particular host group). Within the DeviceCount template, I created an item called PingItem which is a simple check and uses the key "icmpping[<target>,<packets>,<interval>,<size>,<timeout>]". I left the default of numeric (unsigned) for the type of information. I set the update interval to 30m. I defined a custom interval of 30m, flexible, with a period of 1-4, 07:30-17:30 (because I want this to occur every half an hour during business hours while I am testing it). I'm not interested in keeping history or trend storage.

        Next I have to create a trigger within the DeviceCount template, lets call that StatusReport. I'm leaving the severity as not classified for now. In the expression, this is where I would count the number of hosts that answered PING? So for the expression I am using "grpsum["TargetHostGroup","icmpping"[/,total]",last]".

        And finally, I setup the action which is to email me the result of the StatusReport trigger based on a schedule of my choosing. Am I logically correct in all of this? I appreciate your input and thank you splitek!

        PS: I already have a different action configured to alert me (via email) when a host doesn't answer ping, that is working correctly.

        Comment

        • CarlDafs
          Junior Member
          • Aug 2020
          • 9

          #5
          I forgot to mention that. Before I did any of the steps I mentioned in the previous post, I created a dummy host called PingTrapper and linked the DeviceCount template only to it.

          Comment

          Working...