Page 1 of 1

chrck_nrpe eventlog

Posted: Mon Mar 05, 2018 7:22 am
by amitw
Hi guys,
im trying to check the event log using NRPE and it's working good.
but, i dont know how i can run 2 filters on 1 check command.

this is the command im using:
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_eventlog -a file="$ARG1$" "warning=count = $ARG2$" "critical=count = $ARG3$" "filter=source like '$ARG4$' AND id = '$ARG5$'" unique truncate-message=300 'top-syntax=The status is: ${status}: with ${count} entries matching the ID the last 24h Log message:"${list}"'

i would like to filter the error level besides the Source.

Appreciate your help.
Amit

Re: chrck_nrpe eventlog

Posted: Mon Mar 05, 2018 10:47 am
by scottwilkerson
Actually you are already using 2 filters, you can just join them with an AND like you are

Code: Select all

"filter=source like '$ARG4$' AND id = '$ARG5$'"

Re: chrck_nrpe eventlog

Posted: Tue Mar 06, 2018 12:43 am
by amitw
Hi,
So yes, i already using 2 filters but not the error level.
Is it possible to add it?

Re: chrck_nrpe eventlog

Posted: Tue Mar 06, 2018 10:19 am
by scottwilkerson
amitw wrote:Hi,
So yes, i already using 2 filters but not the error level.
Is it possible to add it?
Sure something like this

Code: Select all

"filter=source like '$ARG4$' AND id = '$ARG5$' AND level = 'error' "
Here is info about the level options
https://docs.nsclient.org/reference/win ... levelerror

Re: chrck_nrpe eventlog

Posted: Wed Mar 07, 2018 12:44 am
by amitw
Thanks alot

Re: chrck_nrpe eventlog

Posted: Wed Mar 07, 2018 10:00 am
by scottwilkerson
no problem, I'm going to close the thread don't hesitate to open another if you have any issues