chrck_nrpe eventlog

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
amitw
Posts: 28
Joined: Tue Jun 28, 2016 8:07 am

chrck_nrpe eventlog

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: chrck_nrpe eventlog

Post 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$'"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
amitw
Posts: 28
Joined: Tue Jun 28, 2016 8:07 am

Re: chrck_nrpe eventlog

Post by amitw »

Hi,
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

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
amitw
Posts: 28
Joined: Tue Jun 28, 2016 8:07 am

Re: chrck_nrpe eventlog

Post by amitw »

Thanks alot
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: chrck_nrpe eventlog

Post by scottwilkerson »

no problem, I'm going to close the thread don't hesitate to open another if you have any issues
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked