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
chrck_nrpe eventlog
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: chrck_nrpe eventlog
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
Hi,
So yes, i already using 2 filters but not the error level.
Is it possible to add it?
So yes, i already using 2 filters but not the error level.
Is it possible to add it?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: chrck_nrpe eventlog
Sure something like thisamitw wrote:Hi,
So yes, i already using 2 filters but not the error level.
Is it possible to add it?
Code: Select all
"filter=source like '$ARG4$' AND id = '$ARG5$' AND level = 'error' "https://docs.nsclient.org/reference/win ... levelerror
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: chrck_nrpe eventlog
no problem, I'm going to close the thread don't hesitate to open another if you have any issues