clues icon indicating copy to clipboard operation
clues copied to clipboard

Latest monitoring data does not retrieve latest data

Open tkald opened this issue 7 years ago • 1 comments

In clueslib/cluesd.py line 112 select query does not return latest data in mysql:

SELECT MAX(TIMESTAMP), m.*, d.enabled FROM host_monitoring AS m LEFT JOIN hostdata AS d ON m.name=d.name GROUP BY m.name

Only latest value is max(timestamp), all other columns show values of first rows of every node.

Also this query is very inefficient. No indexes over timestamp or host_monitoring.name colums. Left join isn't really necessary in my opinion.

tkald avatar Oct 31 '16 18:10 tkald