Add '!=' comparison operator to pmp-check-mysql-status

Bug #1048627 reported by Roman Vynar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Monitoring Plugins
Fix Released
Low
Unassigned
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

pmp-check-mysql-status supports operators with the -C option, which accepts the arithmetic comparison operators ==, >, >=, <, and <=. But there is no inequality operator '!=' that also might be useful.

For example, to ensure that PXC node is ok you need to verify that the MySQL variable "wsrep_local_state" equals 4 and no other. BTW, it could equal to from 0 to 6 (http://www.codership.com/wiki/doku.php?id=galera_node_fsm). Without the inequality operator it is difficult to achieve this.

When I modify the script slightly I could achieve the necessary result. For example:

[root@centos6 ~]# /opt/percona-nagios-plugins/pmp-check-mysql-status -x wsrep_local_state -C '!=' -w 4
OK wsrep_local_state = 4

[root@centos6 ~]# /opt/percona-nagios-plugins/pmp-check-mysql-status -x wsrep_local_state -C '!=' -w 4
WARN wsrep_local_state = 0

[root@centos6 ~]# /opt/percona-nagios-plugins/pmp-check-mysql-status -x wsrep_local_state -C '!=' -c 4
CRIT wsrep_local_state = 0

Please add '!=' as the comparison operator. It may be useful for other strict-value-variable checks.

Related branches

Changed in percona-monitoring-plugins:
status: New → Confirmed
Changed in percona-monitoring-plugins:
importance: Undecided → Low
Revision history for this message
Fabio Marconi (fabiomarconi) wrote :

close ubuntu tag
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in ubuntu:
status: New → Invalid
Changed in percona-monitoring-plugins:
status: Confirmed → In Progress
Changed in percona-monitoring-plugins:
milestone: none → 1.0.2
Changed in percona-monitoring-plugins:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.