Ad Widget

Collapse

Group Count

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hupp
    Junior Member
    • Feb 2008
    • 23

    #1

    Group Count

    Hi,

    is it possible to do some group count like:
    - total host in group
    - available host in group
    - hosts in maintenance in that group

    greeting
    Hupp
  • taytrho
    Junior Member
    • Apr 2014
    • 3

    #2
    This is an old post... But I've been looking for this as well.

    I need to graph how many hosts are in a group. So far I've had no luck trying to figure it out, or using similar examples i've searched for. I have yet to see anything specific to creating an item that will count hosts in a group.

    Please help!

    Thank you...

    Comment

    • aib
      Senior Member
      • Jan 2014
      • 1615

      #3
      I'm thinking about 12 Aggregate checks and "agent.ping" as "item.key"

      Do you mind to try?
      Sincerely yours,
      Aleksey

      Comment

      • taytrho
        Junior Member
        • Apr 2014
        • 3

        #4
        This seems to have worked! I suppose this way it counts devices that are up, which is better (in my case) than just a count of devices existing in the group.

        In the host template I have
        Type: Calculated
        Key: device.host_alive
        forumula: last("ssh.run[sshcheck,{HOST.CONN}]")

        (Our devices will still ping even if they lock up and SSH become unavailable, so to ensure the device is functioning, we use an SSH check.)

        Then in the aggregated template which calculates all values in a host group,
        grpsum["{$GROUPNAME}","device.host_alive",last,0]


        I tried using grpsum["{$GROUPNAME}","ssh.run[sshcheck,{HOST.CONN}]",last,0], but it didn't like {HOST.CONN}. Macros make things easy, but I suppose not this easy. haha.

        Thank you very much!

        Comment

        • aib
          Senior Member
          • Jan 2014
          • 1615

          #5
          Good to you!
          I'm happy that you found the solution.
          Sincerely yours,
          Aleksey

          Comment

          • CarlDafs
            Junior Member
            • Aug 2020
            • 9

            #6
            Does this solution hold up with version 5.0.2? I'm trying to accomplish something similar but haven't been able to put all of the pieces together yet.

            Comment

            Working...