Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing comment on retention_update_interval #246

Open
nook24 opened this issue Jul 12, 2018 · 1 comment
Open

Confusing comment on retention_update_interval #246

nook24 opened this issue Jul 12, 2018 · 1 comment

Comments

@nook24
Copy link
Member

nook24 commented Jul 12, 2018

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.

schedule_event(retention_update_interval * interval_length, save_state_information_eventhandler, evprop->user_data);

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants