Ad Widget

Collapse

Empty graph for historical data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Amiram
    Member
    • Feb 2021
    • 68

    #1

    Empty graph for historical data

    Hey community,

    Few weeks back I has a database incident on my Zabbix-Server.
    That lead me to reinstall the server are revert the database to an older dump I had. The dump file contain only the Zabbix tables setup and configuration (not including historical data tables content).

    Sine then I'm suffering from a weird behavior where I cant see that historical data collected since why I'm executing more the 4days of history in one query.

    Please refer to the attach picture.
    When querying "last 4days" you can see that I have the graph full of data and when querying "last 7days" the graph appear to be empty.
    Same happening when querying "last 30days" but you can see when I zooming in to 20-23 days (in the last 30) the data is there.
    The same occurs when using a plugins for the grafafa - for example

    Setup notes:
    * I have added the HouseKeeping configuration (attached pic)
    * My database is MySQL version 8.0.44 - partitioned
    * Zabbix server version - 7.4.5


    Please help.
    Attached Files
  • Viktors Fomics
    Member
    • Oct 2025
    • 52

    #2
    Hello

    When attempting to display a graph for a short period the data might be pulled from history, for a longer period data is taken from trends, therefore it seems that the trends table is not enough populated for this item, which could be because of the partitioning settings related to this table.

    So the first thing to check here would be what is inside the trends table for this itemID:

    SELECT itemid, FROM_UNIXTIME(clock), value_min, value_max, value_avg
    FROM trends
    WHERE itemid = <item_id>
    AND clock >= UNIX_TIMESTAMP(NOW() - INTERVAL 30 DAY)
    ORDER BY clock;

    Comment

    • Amiram
      Member
      • Feb 2021
      • 68

      #3
      It seems that the trend tables are empty.
      But why for 7days the zabbix try to query the trend table instead of the history one?

      How can I solve that?
      Changing the house keeping? partitioning?
      Or just wait for 3month too pass until the trends tables will be fill with the current config?

      Comment

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

        #4
        using history vs trends, it depends on the amount of data it has to present. Full data for 30 days will never fit your screen, so it is drawn from trends.. if you zoom in to 1-2 days, your graph is redrawn fro history data.
        If your trends are missing, then no waiting will cure it.. You need to find a reason, why it is not writing trends (it is done actually during history saving, not after X days). It is hard to say right now, what can be wrong here, some DB triggers missing or table permissions etc...Start from DB and server logs, maybe there are some hints...

        Comment

        • Amiram
          Member
          • Feb 2021
          • 68

          #5
          show can i check for the DB triggers and table permissions?
          Can i recover the database configuration without loosing the data?

          Comment

          • Amiram
            Member
            • Feb 2021
            • 68

            #6
            My issue look very related to : https://support.zabbix.com/browse/ZBX-27229

            Comment

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

              #7
              Originally posted by Amiram
              My issue look very related to : https://support.zabbix.com/browse/ZBX-27229
              There is said, fixed in 7.4.6rc1... 7.4.6 final came out on 18th of Jan. I would upgrade first and see if it resolves issue.
              Release notes say
              ZBX-27229 Fixed trends not being saved

              Comment

              Working...