log_passive_checks and log_external_commands?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
santec
Posts: 10
Joined: Tue Jul 18, 2017 11:55 am

log_passive_checks and log_external_commands?

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: log_passive_checks and log_external_commands?

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
santec
Posts: 10
Joined: Tue Jul 18, 2017 11:55 am

Re: log_passive_checks and log_external_commands?

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: log_passive_checks and log_external_commands?

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked