naemon / naemon-livestatus

Naemon - Livestatus Eventbroker Module
GNU General Public License v2.0
26 stars 30 forks source link

Logcache performance #122

Closed sni closed 6 months ago

sni commented 7 months ago

logcache: avoid reading files outside of requested timerange

logfile now reads the last timestamp of a logfile as well and uses this to select the required logfiles for a given query.

previously, getting logs for one day might have opened and parsed 3 logfiles. One before the selected day, the day itself and one day afterwards. With this patch only one file is parsed, making the logs query 3x as fast.