Page 1 of 1
log_passive_checks and log_external_commands?
Posted: Tue Jun 11, 2019 3:13 pm
by santec
Hi,
Is it possible to not log lines like PASSIVE SERVICE CHECK: * and EXTERNAL COMMAND: * in the file nagios.log?
I probably misthought that this was possible with the configuration file variables log_passive_checks and log_external_commands which by default are set with a "0" value.
Greetings,
Jorge.
Re: log_passive_checks and log_external_commands?
Posted: Tue Jun 11, 2019 3:34 pm
by npolovenko
Hello,
@santec. What version of NagiosXI are you using? You're talking about the nagios.log file, right? Can you show me an example of what gets logged so I could reproduce it in the lab?
Thanks.
Re: log_passive_checks and log_external_commands?
Posted: Wed Jun 12, 2019 1:03 am
by santec
You can close this thread. The configuration variables work for those lines beggining with: PASSIVE SERVICE CHECK: * and EXTERNAL COMMAND: *.
I would like not to log lines beggining with:
External command error: Command failed
Warning: Passive check result was received for service *
Error: External command failed *
Greetings,
Jorge.
Re: log_passive_checks and log_external_commands?
Posted: Wed Jun 12, 2019 3:37 pm
by npolovenko
@santec, This logic seems to be embedded in the Core source code.
Code: Select all
if (external_command_ret != CMD_ERROR_OK) {
logit(NSLOG_EXTERNAL_COMMAND | NSLOG_RUNTIME_WARNING, TRUE, "Error: External command failed -> %s;%s\n", command_id, args);
}
You can submit a new feature request on the Core github to be able to stop error logging from the main config file.
https://github.com/NagiosEnterprises/na ... issues/new
Or I can submit this FR on your behalf if you'd like.