Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckFiles - unrecognised option 'empty-state=ok' #823

Open
alexoalexo opened this issue Jan 29, 2024 · 1 comment
Open

CheckFiles - unrecognised option 'empty-state=ok' #823

alexoalexo opened this issue Jan 29, 2024 · 1 comment

Comments

@alexoalexo
Copy link

hello,
I've tested 0.5.2.41, 0.5.3.4 and 0.6.0.1 and with all of them I'm not able to use empty-state option.

My goal is to check a single file and if its timestamp is older than 30min to raise an alarm. If it is fresh/recent (less than 30min old) then I need an OK state and not Unknown as returned when no files are found.

When the file is older than 30min, the command returns critical as expected.
But when the files is fresh, the CheckFiles reports no file found and issues Unknown - 3

I want no files found to return OK, thus I try to use 'empty-state=ok' which is not availbale as it seems

CheckFiles  path='C:\alarms.csv' filter=written<-30m  MaxCrit=1  empty-state=ok
L        cli UNKNOWN: Invalid command line: unrecognised option 'empty-state=ok'

Thanks!

@alexoalexo
Copy link
Author

Anyone has any ideas how to achieve this? I need to check single file timestamp, if older than X min then warn/crit. If it is fresh enough I need OK state.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant