Hello
have you tried using Regular Expression ? most centreon check use them to filter things
How to play with Regex - Part I | Community (centreon.com)
How to play with Regex - Part II | Community (centreon.com)
(specifically the 2nd part, “data exclusion”)
that being said, I don’t use this plugin so I don’t know if it will work, sorry.
Hi,
Same issue, I just want to filter folders or files
We would like to know what the --file mode is for and how it is used or if it is adapted to this need
This mode is developed by the centreon teams for this plugin but there is no relevant documentation explaining how to use it.
Exclusion of a file or folder is a basic requirement
Hello @christophe.niel-ACT,
Thank you for your help, i did tried the Regex without success in the “FILE” field and after the command via extra option :
After checking the plugin file centreon_protocol_sftp.pl, i notice the following line :
=item B<--filter-file>
Filter files (can be a regexp. Directory in the name).
but i can’t make it work for now, i tried :
/usr/lib/centreon/plugins//centreon_protocol_sftp.pl --plugin=apps::protocols::sftp::plugin --mode=files-date --hostname='XX.XX.XX.XX' --ssh-username='User' --ssh-password='pwd' --file='' --directory='PATH' --warning-mtime-last='' --critical-mtime-last='60' --filter-file='^(?!test$)'
I get the following :
Unknown option: filter-file at /usr/lib/centreon/plugins//centreon_protocol_sftp.pl line 1317.
From my understanding, i should get all the files older than 60sec in the path i gave except the test one.