Ad Widget

Collapse

Zabbix for monitoring cluster with aggregates values and a host is down

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nicolasgoudard
    Junior Member
    • Mar 2021
    • 27

    #1

    Zabbix for monitoring cluster with aggregates values and a host is down


    Hello,
    I have multiple hosts in a cluster group
    If the host is not available (down), the aggregated calculated time returns an absurd value, because for zabbix the "last" means the last time the value was checked by zabbix. But normally for a given timestamp; if the value has not been checked, it should return 0.

    grpsum ["cluster", system.cpu.num, "last", 0]
    for example here if a host in the "cluster" group has not been online since 8:00 am, the cpu count returned at 11:00 am should be zero and not 32 which was the valid CPU count before 8:00 am but the problem is that i get 32, because the last value checked by zabbix was 32 at 7:59 am.

    Can I achieve it this in zabbix or do I have to do an external script: ssh loop on all machines in the cluster, then sum the processors then send it with zabbix_sender then fetch this value with zabbix_trapper))?

    Thx in advance
    Best regards
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    You might be about to use ping, it will become 0 when the host is down, create an item "available cpu's" as system.cpu.num * ping, then sum those.

    Comment

    • splitek
      Senior Member
      • Dec 2018
      • 101

      #3
      Or:
      Check for not supported value Check if there was an error in retrieving item value. Normally that would lead to the item turning unsupported, but you may modify that behavior by specifying the Custom on fail error-handling options: to discard the value, to set a specified value (in this case the item will stay supported and the value can be used in triggers) or set a specified error message. Note that for this preprocessing step, the Custom on fail checkbox is grayed out and always marked.
      This step is always executed as the first preprocessing step and is placed above all others after saving changes to the item. It can be used only once.
      Supported since 5.2.0.
      So for "number of CPUs" set 0 if can not check.

      Comment

      Working...