Check_eventlog - Want to always return okay but still get performance data


#1

Hello,

I have a check to that looks at the number of errors in the application logs for the last 24 hours. I want to get the number of errors so I have a graph of the errors over a 24 hour period and be able to see when a server starts having more than normal. The command I created always returns okay which I want but it then fails to record the performance data (it’s always zero). I don’t want the command to ever be anything other than ‘ok’ since there’s always errors in the application log from something but I want the performance data (number of errors) recorded. Is there a way I can make this happen? Here’s the command I currently have which works but just doesn’t record the performance data…

./check_nrpe3 -H 192.168.0.1 -C /etc/ssl/NRPEv3/NRPEv3.crt -K /etc/ssl/NRPEv3/NRPEv3.key -A /etc/ssl/NRPEv3/cacert.pem -S TLSv1.2 -c check_eventlog -a “file=application” “unique” “scan-range=-1d” “top-syntax=Total:%(count) Event(s):%(list)” “detail-syntax=%(id)” “crit=none” “filter=level = ‘error’”


#2

Try -

“perf-config=count”


#3

hi, maybe the output is more than 1024 bytes, and the performance is not inserted, and you do not see the graph, try to reduce the output, for example like this

./check_nrpe3 -H 192.168.0.1 -C /etc/ssl/NRPEv3/NRPEv3.crt -K /etc/ssl/NRPEv3/NRPEv3.key -A /etc/ssl/NRPEv3/cacert.pem -S TLSv1.2 -c check_eventlog -a “file=application” “unique” “scan-range=-1d” “top-syntax=%(status): %(count) message(s)” “crit=none” “filter=level = ‘error’”