naemon / naemon-core

Networks, Applications and Event Monitor
http://www.naemon.io/
GNU General Public License v2.0
153 stars 63 forks source link

Confusing comment on retention_update_interval #246

Open nook24 opened 6 years ago

nook24 commented 6 years ago

The comment in the default naemon.cfg describes retention_update_interval as:

# RETENTION DATA UPDATE INTERVAL
# This setting determines how often (in minutes) that Naemon
# will automatically save retention data during normal operation.
# If you set this value to 0, Naemon will not save retention
# data at regular interval, but it will still save retention
# data before shutting down or restarting.  If you have disabled
# state retention, this option has no effect.

retention_update_interval=60

But Naemon uses retention_update_interval * interval_length to calculate retention_update_interval itself. So the the value in naemon.cfg for retention_update_interval is not set in minutes. It is value * interval_length. https://github.com/naemon/naemon-core/blob/ba3dc3ecaf9959085d40a391a23a2ec0013fda59/src/naemon/sretention.c#L27 I don't know exactly how to update the text, but the current one is wrong^^

Just in case if you are asking yourself, how Nagios does this: Nagios uses retention_update_interval * 60 (60 is hardcoded), so it is always in minutes, but i prefer the Naemon way. Just the documentation is confusing :)

https://github.com/NagiosEnterprises/nagioscore/blob/345fd4e8257085ce7f3806ee4fb04008919f24e5/base/events.c#L593

jacobbaungard commented 6 years ago

Good find. I guess https://github.com/naemon/naemon-core/blob/master/sample-config/naemon.cfg.in is the file which needs to be updated.