Page 1 of 1

Active checks using check_by_ssh not logged

Posted: Fri Aug 14, 2020 4:35 am
by invade
Hi. I am in the process of migrating our monitoring from passive checks (using gearman / mod_gearman) to active checks (using check_by_ssh).

All the checks / alerts / notifications for the passive checks are logged in nagios.log, but nothing is being logged for the active checks.

Should anything be getting logged, and if so, is there something I have to configure to enable this?

The log settings in the main config file are as follows:

Code: Select all

log_file=/var/log/nagios/nagios.log
log_rotation_method=d
log_archive_path=/var/log/nagios/archives
log_notifications=1
log_service_retries=1
log_host_retries=1
log_event_handlers=1
log_initial_states=0
log_current_states=1
log_external_commands=1
log_passive_checks=1
The Nagios server is running CentOS 8 with Nagios installed using the RPM packages from the EPEL repository.

Thanks in advance.

Re: Active checks using check_by_ssh not logged

Posted: Fri Aug 14, 2020 9:38 am
by benjaminsmith
Hi,

It sounds like this is just an issue of logging or are the checks not working? In other words, are you receiving the expected notifications from these active checks?

A few things to verify.

1. Make sure the object definition has active checks enabled. If this was initially set up for passive checks, it might be disabled.

Code: Select all

active_checks_enabled	[0/1]
passive_checks_enabled	[0/1]
2. The main Nagios configuration files, nagios.cfg, contains settings to turn on and off active checks on a program-wide basis. You'll also want to make sure logging is enabled in this file.

Code: Select all

log_external_commands=1
See: https://assets.nagios.com/downloads/nag ... gmain.html

Lastly, check the var/log/messages file on the system, do you see any of the active checks results logged there.

Let us know what you find out.

Benjamin