clues
clues copied to clipboard
Latest monitoring data does not retrieve latest data
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.