Page 1 of 1

Stop Nagios logs to be logged at /var/log/messages

Posted: Wed Oct 12, 2022 9:10 am
by s.diwakar1
Hi All,

Hope you are doing well !!!

I have configured below parameter in nagios.cfg to stop the logs to be logged in messages file at /var/log/messages location. But still logs are being logged there. Please suggest.

Code: Select all

use_syslog=0
Thanks in advance !!!

Re: Stop Nagios logs to be logged at /var/log/messages

Posted: Wed Oct 12, 2022 4:28 pm
by gormank
Did you restart nagios?
Maybe it's check_nrpe or ncpa that's logging now and not nagios?

Re: Stop Nagios logs to be logged at /var/log/messages

Posted: Thu Oct 13, 2022 11:51 am
by s.diwakar1
Hi @gormank,

Thanks for your reply.

Yes, I restarted the nagios after making the changes in nagios.cfg file.

If they are of check_nrpe or something else, then how to check and stop them to be logged at /var/log/messages. Also let me know if they are important to have for any troubleshooting. Because the weekly log file is consuming 20GB of space.

Re: Stop Nagios logs to be logged at /var/log/messages

Posted: Thu Oct 13, 2022 4:49 pm
by gormank
You may want to paste examples of the log messages you want disabled, as well as let us know which agent you're using.

Re: Stop Nagios logs to be logged at /var/log/messages

Posted: Tue Oct 18, 2022 12:23 pm
by s.diwakar1
There are tons of logs generated as below:
check_nrpe: Remote x.x.x.x does not support Version 3 Packets
I am using NRPE and NSClient++. Also FYI, on Nagios server, NRPE version 3.2.1 is installed and target servers have below versions installed.

NRPE v2.15
NRPE v3.2.1
NRPE v4.0.2
NRPE v4.0.3
NRPE v4.1.0

So, above error logs are generated because of different versions of NRPE installed on Nagios and target servers?

Re: Stop Nagios logs to be logged at /var/log/messages

Posted: Tue Oct 18, 2022 12:58 pm
by gormank
Try running check_nrpe -h and change the command in nagios to use v2 packets.

Re: Stop Nagios logs to be logged at /var/log/messages

Posted: Tue Oct 18, 2022 1:00 pm
by gormank
Oh, and disable logging in /etc/xinetd.d/nrpe ir nrpe.cfg depending on how you start it.

Re: Stop Nagios logs to be logged at /var/log/messages

Posted: Tue Oct 25, 2022 12:07 pm
by s.diwakar1
Tried below command but still getting the same logs.

Code: Select all

check_nrpe -H $HOSTADDRESS$ -2 -c $ARG1$ -t 20

Re: Stop Nagios logs to be logged at /var/log/messages

Posted: Tue Aug 29, 2023 8:49 am
by MasaNagios
Is this issue resolved? I am facing the same issue. Any help/guidance would be appreciated please.

Kind Regards,

s.diwakar1 wrote: Tue Oct 25, 2022 12:07 pm Tried below command but still getting the same logs.

Code: Select all

check_nrpe -H $HOSTADDRESS$ -2 -c $ARG1$ -t 20

Re: Stop Nagios logs to be logged at /var/log/messages

Posted: Wed Aug 30, 2023 4:23 am
by kg2857
Probably, since nobody has posted about it in a while. Maybe try doing what was suggested.