You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
When trying to use pmp-check-mysql-replication-delay on the slave to check the delay I have trouble reading those values:
# /usr/lib64/nagios/plugins/pmp-check-mysql-replication-delay -H mysql-slave -l root -p bar -T heartbeat.heartbeat
/usr/lib64/nagios/plugins/pmp-check-mysql-replication-delay: 71: [: unexpected operator
Warning: Using a password on the command line interface can be insecure.
CRIT 4286 seconds of replication delay | replication_delay=4286;300;600;0;
The value I get is correct, but the error message confuses me.
Snippet from pmp-check-mysql-replication-delay:
64 # Get replication delay from a heartbeat table or from SHOW SLAVE STATUS.
65 if [ "${OPT_TABLE}" ]; then
66 if [ -z "${OPT_UTC}" ]; then
67 NOW_FUNC='UNIX_TIMESTAMP()'
68 else
69 NOW_FUNC='UNIX_TIMESTAMP(UTC_TIMESTAMP)'
70 fi
71 if [ "${OPT_SRVID}" == "MASTER" ]; then
Only specifying the table does not work either:
# /usr/lib64/nagios/plugins/pmp-check-mysql-replication-delay -H mysql-slave -l root -p bar -T heartbeat
/usr/lib64/nagios/plugins/pmp-check-mysql-replication-delay: 71: [: unexpected operator
Warning: Using a password on the command line interface can be insecure.
ERROR 1046 (3D000) at line 1: No database selected
UNK could not determine replication delay
I found that when I run "pmp-check-mysql-replication-delay" with "bash" instead of "sh" (like the shebang defines) everything works just fine:
# /bin/bash /usr/lib64/nagios/plugins/pmp-check-mysql-replication-delay -H mysql-slave -l root -p bar -T heartbeat.heartbeat
Warning: Using a password on the command line interface can be insecure.
CRIT 2371 seconds of replication delay | replication_delay=2371;300;600;0;
With pt-heartbeat I am writing entries to the table "heartbeat" in the database "heartbeat" on our master server:
When trying to use pmp-check-mysql-replication-delay on the slave to check the delay I have trouble reading those values:
The value I get is correct, but the error message confuses me.
Snippet from pmp-check-mysql-replication-delay:
Only specifying the table does not work either:
I'm using the latest version:
The text was updated successfully, but these errors were encountered: