check_log is not collecting queried string

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
kn00567386
Posts: 28
Joined: Tue May 07, 2019 12:17 am

Re: check_log is not collecting queried string

Post by kn00567386 »

benjaminsmith wrote:Hi @kn00567386,

A couple of items we noticed. One is that when running the plugin locally you are logged in as root, try logging in as the nagios user account, su - nagios, it's possible that this user cannot write an output file /usr/lib64/nagios/plugins/500_log.txt. Also, try using another file just to clear this out and start fresh.

Next, when running the check command from the XI server, enclose the query in double quotes and the whole argument in single quotes. For example:

Code: Select all

-a '-F /var/log/neutron/server.log -O /usr/lib64/nagios/plugins/500_log.txt -q "AMQP server on 127.0.0.1:5671 is unreachable"'
Let us know if that resolves the error.
Thanks,
Benjamin

Configures it and kept under observation, will come back with observation
kn00567386
Posts: 28
Joined: Tue May 07, 2019 12:17 am

Re: check_log is not collecting queried string

Post by kn00567386 »

kn00567386 wrote:
benjaminsmith wrote:Hi @kn00567386,

A couple of items we noticed. One is that when running the plugin locally you are logged in as root, try logging in as the nagios user account, su - nagios, it's possible that this user cannot write an output file /usr/lib64/nagios/plugins/500_log.txt. Also, try using another file just to clear this out and start fresh.

Next, when running the check command from the XI server, enclose the query in double quotes and the whole argument in single quotes. For example:

Code: Select all

-a '-F /var/log/neutron/server.log -O /usr/lib64/nagios/plugins/500_log.txt -q "AMQP server on 127.0.0.1:5671 is unreachable"'
Let us know if that resolves the error.
Thanks,
Benjamin

Configures it and kept under observation, will come back with observation
After adding string inside double quote, we have not found change in state of service. looks like its working as expected and issue is resolved. Thanks for you support.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_log is not collecting queried string

Post by scottwilkerson »

kn00567386 wrote:
kn00567386 wrote:
benjaminsmith wrote:Hi @kn00567386,

A couple of items we noticed. One is that when running the plugin locally you are logged in as root, try logging in as the nagios user account, su - nagios, it's possible that this user cannot write an output file /usr/lib64/nagios/plugins/500_log.txt. Also, try using another file just to clear this out and start fresh.

Next, when running the check command from the XI server, enclose the query in double quotes and the whole argument in single quotes. For example:

Code: Select all

-a '-F /var/log/neutron/server.log -O /usr/lib64/nagios/plugins/500_log.txt -q "AMQP server on 127.0.0.1:5671 is unreachable"'
Let us know if that resolves the error.
Thanks,
Benjamin
Locking thread
Configures it and kept under observation, will come back with observation
After adding string inside double quote, we have not found change in state of service. looks like its working as expected and issue is resolved. Thanks for you support.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked