[collectd] tail plguin re-reading the file?
Gerardo Herzig
gherzig at fmed.uba.ar
Mon Feb 17 20:50:40 CET 2014
Hi all. I have a "simple" usage of the tail plugin, something like:
<File "/var/log/postgres/5432/postgresql" >
Instance "pg-average-response"
<Match>
Regex "\- some_database \- .*duration: ([0-9][0-9]*\.[0-9]\{3\})"
DSType "CounterAdd"
Type "gauge"
Instance "some_database"
</Match>
</File>
To catch the total queries served on that "some_database". After 2 or 3 "collectd restart" at, say 3 pm, 4 pm and 5pm im watching souspicious CPU spikes at that moments, and the counters also raise a lot at that point. Im thinking that maybe the tail plugin is reading the hole file again, which would explain the CPU and counter behaviour.
Of course, that is not the desired way to behave. If i am correct, there is a way to the 'tailf' thing without the re-reading stuff?
Thanks!
Gerardo
More information about the collectd
mailing list