GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

where do I get check_mysql?

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • where do I get check_mysql?

    As part of checking replication on a slave, our consultants are using a check_mysql file. I'm setting up a slave for backup purposes and wanted to run the same checks against the new slave. I copied the check_mysql file from our current slave to the new slave but it doesn't run, I get this error:


    -bash: ./check_mysql: cannot execute binary file


    The file probably needs to be compiled from source? or maybe something else?

    Where do I get this file? I thought it was part of maatkit but its not?

    Thanks

  • #2
    I think I figured this out to be the nagios check_mysql plugin. I installed the plugins and copied the file and it seems to be working correctly.

    Comment


    • #3
      this my simple script for nagios monitor plugin,you can modfiy to suit you environment

      #!/bin/baship=$(/sbin/ifconfig eth1 |sed -n 2p |sed 's/^.*addr://g'|sed 's/Bcast.*//g')mysql -uuser -ppasswd -hhost -e"show slave status \G" >/tmp/$$.statusstatus=$(grep Seconds_Behind_Master: /tmp/$$.status)s1=${status##*:}if [[ $s1 == "NULL" ]];then echo "CRITICAL - REPLICATION IS STOP - $ip" exit 2fiif [[ $s1 -lt 200 ]]then echo "OK - $s1 s - $ip " exit 0else echo "WARINING - Slave Behind Master $s1 S - $ip" exit 1firm -rf /tmp/$$.status"

      Comment

      Working...
      X