Ad Widget

Collapse

Opening Latest data is very slow

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dakol
    Member
    • Jan 2008
    • 50

    #16
    Originally posted by steveboyson
    Might be an useful approach but you have then time gaps between the zabbix and your external database.

    I do it that way (pseudo code):
    - I have a translation map which gives the tablename to a tableindex
    - select itemid,value_type from items where key_ (or name) like <string>
    - find correct history table for value_type from translation map
    - select value,clock from <history_table> where itemid=<itemid> order by value desc limit 1

    This gives me the "last value" for the required item, but requires two SQL statements. I can live with that but it complicates things as written before when I want to filter by "last value".
    Furthermore, IIRC, "value" has no index in the history_* tables so searching requires a full table scan in that case.
    There a patch which that, history2.patch

    Comment

    • steveboyson
      Senior Member
      • Jul 2013
      • 582

      #17
      Thanks, but I prefer not to mess around with self compiling.

      I hope this gets included in 2.2.3.

      So far our 2.2(.2) installation is quite small and the main site is on 2.0.11. We will stay on that until it is fixed since we do not need the new features (vSphere et al).
      Nevertheless I migrated all scripts to the new 2.2.x DB structure and they are running fine both on 2.0.11 and 2.2.2.

      Comment

      • dakol
        Member
        • Jan 2008
        • 50

        #18
        Originally posted by steveboyson
        Thanks, but I prefer not to mess around with self compiling.

        I hope this gets included in 2.2.3.

        So far our 2.2(.2) installation is quite small and the main site is on 2.0.11. We will stay on that until it is fixed since we do not need the new features (vSphere et al).
        Nevertheless I migrated all scripts to the new 2.2.x DB structure and they are running fine both on 2.0.11 and 2.2.2.
        look at it, nothing to compile, it only patchs the web/api interface

        Comment

        • steveboyson
          Senior Member
          • Jul 2013
          • 582

          #19
          Yes, thank you. It looks not that complicated. Nevertheless, we still have no probs with "latest data" as we have only ~30 hosts in the new 2.2.2 installation.

          But I will keep an eye on that.

          Comment

          • mdresden
            Junior Member
            • Jan 2014
            • 16

            #20
            What is the target timeframe for fixing this

            Apparently once you collects a few weeks of detailed data on 580 host, latest data never comes up.

            If any zabbix business owner or devs read this, When is this going to be fixed?

            Any large organization is experiencing this issue. Accessing latest data is pretty critical????

            Comment

            • Jason
              Senior Member
              • Nov 2007
              • 430

              #21
              We have same issue and with ~200 hosts the latest data is a pain...

              Also find if you use the nodata triggers then if there has been no data within the date that you keep data for then the trigger errors and shows up as a false positive.

              If you enable slow query logging on zabbix and database then can see all these queries that tale ages to resolve.

              There must be a better workaround. I can see that changing the database structure makes sense, but you need fast access to the lastvalue or it renders the gui a right pain to use.

              Comment

              • gavind
                Member
                • Mar 2013
                • 59

                #22
                How about when you check the logs, does it give you clues on what's going on?

                Comment

                • Jason
                  Senior Member
                  • Nov 2007
                  • 430

                  #23
                  Originally posted by gavind
                  How about when you check the logs, does it give you clues on what's going on?
                  Nothing in the zabbix logs. Plenty in the slow query log in postgres... Will post excerpts later.

                  Comment

                  • Jason
                    Senior Member
                    • Nov 2007
                    • 430

                    #24
                    There is this popping up in the postgres log for slow queries..

                    LOG: duration: 26747.924 ms statement: select clock,ns,value from history_uint where itemid=32988 and clock<=1398583225 and clock>1397978425 order by clock desc,ns desc

                    However, when I'm normally browsing latest data there is nothing obvious appearing... It just takes 20-30 seconds to load.

                    Comment

                    • Jason
                      Senior Member
                      • Nov 2007
                      • 430

                      #25
                      Anyone else experiencing this? I can't believe we're the only ones finding the latest data opening slowly with a postgres backend...

                      Comment

                      • Jason
                        Senior Member
                        • Nov 2007
                        • 430

                        #26
                        For completeness it seems it was fixed in https://support.zabbix.com/browse/ZBX-7373 and will be a part of 2.2.4

                        Comment

                        • pc99096
                          Senior Member
                          • Oct 2011
                          • 193

                          #27
                          just installed 2.2.4 and don't see any performance improvement

                          Comment

                          • pc99096
                            Senior Member
                            • Oct 2011
                            • 193

                            #28
                            anyone tried 2.4? any performance improvement?

                            Comment

                            • bpc-ruslan
                              Member
                              • Jul 2014
                              • 32

                              #29
                              same problem in 2.4.4

                              Comment

                              • steveboyson
                                Senior Member
                                • Jul 2013
                                • 582

                                #30
                                A workaround is to display a random graph from one agent. Then this agent gets "preselected" in "latest data" and shows up immediately.
                                Then you can choose your preferred "latest data" filter.

                                Comment

                                Working...