Page 1 of 1
NRPE Remote host debug logging
Posted: Tue Apr 30, 2019 3:36 pm
by awilson
Which log file does nrpe write to?
Code: Select all
How to go about debugging other problems...
When debugging problems it may be useful to edit the NRPE configuration file and change the debug=0
entry to debug=1. Once you do that, restart the NRPE daemon if it is running as a standalone daemon.
After you try using the check_nrpe plugin again, you should be able to see some debugging information in
the log files of the remote host. Check your logs carefully – they should be able to help provide clues as to
where the problem lies...
Re: NRPE Remote host debug logging
Posted: Tue Apr 30, 2019 4:04 pm
by npolovenko
@awilson, Should be in the syslog facility. Usually, /var/log/messages or /var/log/syslog depending on the OS.
Re: NRPE Remote host debug logging
Posted: Tue Apr 30, 2019 4:42 pm
by awilson
Thanks. I was hoping that I could configure logging to a local file that could be limited to a small size so that there would be a record of the last few minutes before the agent hangs or dies. We get failed service checks on servers that were previously fine. Trying to identify what is causing this intermittent behavior.
Since it is using syslog, I can't guarantee that it won't chew up space.
Any ideas on another path get an agent to tell us why it is under duress and operate normally otherwise?
Thanks.
Re: NRPE Remote host debug logging
Posted: Tue Apr 30, 2019 5:00 pm
by npolovenko
@awilson, Got it. I don't think nrpe debug log particularly eats up too much space, it's not nearly as space consuming as the nagos debug log.
But to answer your question, NPRE doesn't have the option to write logs to a custom file. The only way around this is to create a custom filter in the rsyslog configuration that will forward nrpe logs to a different file.
You said nrpe agent is dying? Usually, if you run:
systemctl nrpe status
It'll show that it stopped and the reason for it. But otherwise, syslog would be the only place to check.
Re: NRPE Remote host debug logging
Posted: Tue Apr 30, 2019 6:30 pm
by awilson
Thanks!
You can close this. I'll look into it.
Re: NRPE Remote host debug logging
Posted: Wed May 01, 2019 7:07 am
by scottwilkerson
awilson wrote:Thanks!
You can close this. I'll look into it.
great!
Locking