Ad Widget

Collapse

Pie Chart

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thexiscoming
    Junior Member
    • Oct 2013
    • 5

    #1

    Pie Chart

    Hi

    Please can someone help me...

    Is it possible to create a Pie Chart in Zabbix, that shows number of Hosts that is online and offline...see attached(quickly did something in powerpoint) for example...all my hosts is in various groups.


    Thanks
    Attached Files
  • Pada
    Senior Member
    • Apr 2012
    • 236

    #2
    You can easily draw pie charts in Zabbix, however Zabbix does not have internal checks that exposes the amount of "online" or "offline" hosts.

    Zabbix server does have the following internal checks:
    zabbix[items] - Number of items in Zabbix database
    zabbix[items_unsupported] - Number of unsupported items in Zabbix database

    The problem with the "offline" status is that there are a whole bunch of ways that a host can appear to be "offline". Like you have different triggers for checking whether a host is offline when it is using an Active Zabbix Agent vs a Passive Zabbix Agent.

    If all your hosts are being monitored by Passive Zabbix Agents, then you can probably do a grpsum[<group name>, agent.ping, count, 0] and grpsum[<group name>, agent.ping, sum, 0] to get the total amount of hosts in that group and the amount of alive hosts in that group.

    If you have different kinds of hosts, then you'll have to script stuff / create fancy calculated items / write custom SQL queries.

    If you want to calculate SLA/uptime stuff, then make use of the IT Services.

    Could you perhaps tell us why you'd want this?

    Comment

    • stanito
      Junior Member
      • Mar 2016
      • 3

      #3
      I did the calculation of available hosts with this way:
      1. In Template for a group of hosts created a Item that will always return "1" value
      Name: Always true
      Type: Calculated
      Key: always.true
      Formula: 1
      ...
      2. Add this template for all hosts, you want to monitor
      3. On the host, that will be used as a "monitoring" create 2 Items: Zabbix_agregate_hosts_total and Zabbix_aggregate_hosts_available

      Zabbix_agregate_hosts_total:
      Type: Zabbix aggregate
      Key: grpsum[my_host_group,always.true,last,0]

      Zabbix_aggregate_hosts_available:
      Type: Zabbix aggregate
      Key: grpsum[my_host_group,agent.ping,last,0]
      4. Create a graph based on this two items:
      Calculated Item
      Formula: last("grpsum[my_host_group,always.true,last,0]")-last("grpsum[my_host_group,icmpping,last,0]")
      Last edited by stanito; 21-03-2016, 17:27.

      Comment

      Working...