Ad Widget

Collapse

How to sum values from discovery items?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gumis_148
    Member
    • Jan 2019
    • 52

    #1

    How to sum values from discovery items?

    I have discovery item with key:
    Code:
    backup.userdatabasefull.mssql.status[{#SQLINSTANCENAME},{#DBNAME},{$UDBFTIME1},{$UDBFTI ME2},{$UDBFTIME3}]
    I would like to have a sum of all discovery items.

    I tried with Zabbix aggregate:
    Code:
    grpsum[SQL,"backup.userdatabasefull.mssql.status[{#SQLINSTANCENAME},{#DBNAME},{$UDBFTIME1},{$UDBFTIME2},{$UDBFTIME3}]",last]
    but I get:
    Code:
    No items for key "backup.userdatabasefull.mssql.status[MSSQLSERVER,MyDB,24,48,72]" in group(s) "SQL".
    Host is in SQL's group.
    Last edited by gumis_148; 18-06-2021, 15:06.
  • gumis_148
    Member
    • Jan 2019
    • 52

    #2
    Originally posted by cyber
    how do you plan to sum values like "MSSQLSERVER,MyDB" ?
    I have 50 databases. I don't want to receive 50 alerts about problems with backup. If there is no backup of 50 databases, there is probably a problem with the database server, inaccessibility, etc. Therefore, it is a good idea to send one alert, such as over 30 databases, without making a backup.
    The value from the above template with a backup older than 24h is 7, so you can sum all (50 * 7) or values and then send one alert (e.g. trigger:> 350).
    Last edited by gumis_148; 21-06-2021, 12:20.

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #3
      how do you plan to sum values like "MSSQLSERVER,MyDB" ?
      grpsum summarizes values of similar keys in hostgroup.... and you do not have such keys. You should try aggregate items for things that can be summarized...

      Comment

      Working...