Monitoring different file extensions

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
G_Deshpande
Posts: 19
Joined: Tue Mar 17, 2020 1:50 pm

Monitoring different file extensions

Post by G_Deshpande »

I would like to monitor different file extensions in log file or stale file monitoring.
Right now we can monitor only one file extension like *.txt but if if i wish to monitor 2 file extension like *.txt & *.csv at same path/location, then there is no provision to achieve that.
Example-
check_files! -a path='C:\temp\Stale\' pattern=*.txt max-depth=1 'critical=count>0' 'empty-state=OK' 'filter=written < -5m' top-syntax='${count} File/s Found'
Any suggestion?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitoring different file extensions

Post by scottwilkerson »

I'm not completely familiar with this but can't you change the following

Code: Select all

pattern=*.txt
to

Code: Select all

pattern=*.*
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked