Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

checking exit codes #5

Open
ghost opened this issue May 31, 2019 · 0 comments
Open

checking exit codes #5

ghost opened this issue May 31, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented May 31, 2019

If I write an exit code in a file to be checked the scritp returns OK either the file contains "0" or "10".
example:

cat /tmp/btrbk_exit_code
10

check_file_content.pl -f /tmp/btrbk_exit_code -i "0"
OK for /tmp/btrbk_exit_code (1 found)

check_file_content.pl -f /tmp/btrbk_exit_code -i "10"
OK for /tmp/btrbk_exit_code (1 found)

But

check_file_content.pl -f /tmp/btrbk_exit_code -i "^0$"
FAILED on /tmp/btrbk_exit_code

which makes things difficult while passing a regexp as a Nagios/Icinga parameter.

Thanks

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

No branches or pull requests

0 participants