NagiosEnterprises / nrpe

NRPE Agent
GNU General Public License v2.0
259 stars 133 forks source link

Change the way the NRPE Agent and the check_nrpe plugin logs messages to syslog. #193

Closed tgriep closed 4 years ago

tgriep commented 6 years ago

The NRPE agent and the check_nrpe plugin by default, would log errors to syslog. Added the ability to turn off logging to syslog and set the default to be off.

This gives users that do not want the messages to be logged the ability to turn it off.

hedenface commented 6 years ago

@tgriep Thank you for this.

I'm not so sure it should be disabled by default and only enabled when specified. This should be held back for a major or enhancement release in that case - otherwise it will break currently expected functionality.

tgriep commented 6 years ago

OK, thanks. I did it because some customers wanted to stop all of the syslog entries from filling up their files.

tgriep commented 6 years ago

If I changed the setting to have the logging enabled by default, would that get in a release sooner?

jomann09 commented 5 years ago

I don't think check_nrpe actually uses the enable_syslog variable once it is set from looking at this. I do think that making it enabled by default means we could put it into 3.2.2

tgriep commented 5 years ago

The plugin uses the same function called logit that is defined in the utils.c file. That is where the enable_syslog variable is used.

jomann09 commented 5 years ago

So to make this match the nrpe linux agent we will need to reverse a few things, make -D set the enable_syslog to FALSE and then default it to TRUE in the plugin section (along with re-wording it slightly to say disable syslog logging)

tgriep commented 5 years ago

Yes, that would all that would have to be done to set the default to enabled.