Page 2 of 2

Re: check_log is not collecting queried string

Posted: Fri May 21, 2021 12:04 pm
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

Re: check_log is not collecting queried string

Posted: Mon May 24, 2021 7:13 am
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.

Re: check_log is not collecting queried string

Posted: Mon May 24, 2021 8:57 am
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.