check_nrpe Checkfile syntax question
Posted: Sat Aug 05, 2017 6:22 am
Hi I have the check below which checks a certain folder for an absence of a particular file in a timeframe ( to report when we aren't receiving sales orders from our website )
-H $HOSTADDRESS$ -c CheckFiles -a path='C:\\VendaIntegration\\Download\\Processed' pattern=*UK-SalesOrders* 'filter=written > -20m' 'master-syntax={%total% Files Found}' MinCrit=0
The problem is that for example it found a file called UK-SalesOrders-20170805121700.psv created in the last 20 mins it would report ok but we also have files that are slightly different in that they have R1/R2/R3 at the end of them so basically
UK-SalesOrders-timestamp.psv is ok to be included in check
but
UK-SalesOrders-timestampR1.psv not to be included
Can I do a regex or something to exclude from the check.
-H $HOSTADDRESS$ -c CheckFiles -a path='C:\\VendaIntegration\\Download\\Processed' pattern=*UK-SalesOrders* 'filter=written > -20m' 'master-syntax={%total% Files Found}' MinCrit=0
The problem is that for example it found a file called UK-SalesOrders-20170805121700.psv created in the last 20 mins it would report ok but we also have files that are slightly different in that they have R1/R2/R3 at the end of them so basically
UK-SalesOrders-timestamp.psv is ok to be included in check
but
UK-SalesOrders-timestampR1.psv not to be included
Can I do a regex or something to exclude from the check.