Check_nrpe & check_files.pl

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
filips
Posts: 6
Joined: Tue Jul 14, 2020 8:02 am

Check_nrpe & check_files.pl

Post by filips »

Hello, I wannt to show 5 last files in directory (backup) on windows and linux server.

First nrpe on windows :

Code: Select all

$USER1$/check_nrpe -n -H $HOSTADDRESS$ -2 -c check_files -a path='E:\kopie\' pattern=*.* 'warn= count < 1' 'crit= count < 1' top-syntax='${status}: ${count} files found ${problem_list}' 'empty-stat
This generally works fine. It show mi files, but I wannt to filter it to show last 5 files. I don't know how to use filter option.

The second one is Linux and check_files.pl

Code: Select all

$USER1$/check_files.pl -D /mnt/backup/tectum/ -F '*.7z' 
This shows only number of files. I wannt to list 5 last names from directory.

When I add -C /mnt/backup/tectum I get error UNKNOWN ERROR - could not execute /mnt/backup/tectum - Permission denied
I add chmod 777. Owner is root:root

Can anyone help me with that ?
Locked