Since we can't compare strings and numbers the same way I decided to add a new transformation option to the script.
Currently -T could be pct only.
I am going to add -T str to compare strings.
As it is now:
$ ./nagios/bin/pmp-check-mysql-status -x slave_exec_mode -C '==' -c bla
CRIT slave_exec_mode = STRICT | slave_exec_mode=STRICT;;bla;0;
Will be fine when specifying -T str:
$ ./nagios/bin/pmp-check-mysql-status -x slave_exec_mode -T str -C '==' -c bla
OK slave_exec_mode (str) = STRICT | slave_exec_mode=STRICT;;bla;0;
You are right.
Since we can't compare strings and numbers the same way I decided to add a new transformation option to the script.
Currently -T could be pct only.
I am going to add -T str to compare strings.
As it is now: bin/pmp- check-mysql- status -x slave_exec_mode -C '==' -c bla mode=STRICT; ;bla;0;
$ ./nagios/
CRIT slave_exec_mode = STRICT | slave_exec_
Will be fine when specifying -T str: bin/pmp- check-mysql- status -x slave_exec_mode -T str -C '==' -c bla mode=STRICT; ;bla;0;
$ ./nagios/
OK slave_exec_mode (str) = STRICT | slave_exec_