MMM Community Blog Multi-Master Replication Manager for MySQL

28Oct/0916

MMM Nagios plugin

There is a nagios plugin available on the MMM's google-code page, but if you didn't find it yet, here it is:

http://code.google.com/p/check-mysql-all/wiki/check_mmm

You can call this plugin over nrpe. I'm already working on to fork a version which more useful with passive checks.

This plugin was developed by Ryan Lowe (Percona).

About istvan_podor

working on to build a better,opesource and HA word..
Comments (16) Trackbacks (0)
  1. Hey Istvan,

    I’m working on one for zabbix. I was thinking of launchpad, maybe we can add it to mmm itself on launchpad?

  2. not a bad idea I think. I’m also writing a munin plugin (I know it’s wierd but everybody love drawing graphs right? :) ) )

  3. Istvan, no need to fork. Ping me on IRC & I’ll give you commit rights:)

  4. Istvan, Hi, I am really eager to get nagios monitoring my mmm deployment, but am running into a few snags. I have nrpe working properly and I can call check_mmm, but it always returns status ok no matter what. Any ideas?

  5. No matter what at all? Even when your MMM stopped?

    did you tried to set up the warning and critical levels?

    MMM plugin is designed to return OK(0) if its doesn’t find any problem.
    You can also try running with verbose option to see whats wrong.

    You are using mmm1 or mmm2?

  6. I have the same problem, we are running mmm2. When i run the check locally i get the following;

    [root@mmmmonitordev01 check-mysql-all]# /usr/lib64/nagios/plugins/check-mysql-all/check_mmm
    CRITICAL: db1(10.68.246.71) master/HARD_OFFLINE. Roles:

    Then when i run it via nrpe i get;

    [root@monitor01 ~]# /usr/local/nagios/libexec/check_nrpe -u -n -H 10.68.246.70 -c check_mmm
    OK

    Any ideas? Running in verbose mode does not show anything unusual.

  7. The issue for me was that the nrpe daemon, running as the nrpe user, did not have read access to the files in /etc/mysql-mmm/ . We chgrp’d them and now it works :)

    When the nrpe daemon runs the command and it can’t access the files config files it returns an ‘OK’. Maybe the code needs to be altered to not show OK if it can’t read the files??

    [root@mmmmonitordev01 ~]# cd /etc/mysql-mmm/
    [root@mmmmonitordev01 mysql-mmm]# ls -la
    total 36
    drwxr-xr-x 2 root root 4096 Jan 4 15:38 .
    drwxr-xr-x 84 root root 12288 Jan 7 14:37 ..
    -rw-r—– 1 root nrpe 33 Dec 21 15:13 mmm_agent.conf
    -rw-r—– 1 root nrpe 941 Jan 4 15:38 mmm_common.conf
    -rw-r—– 1 root nrpe 325 Jan 4 15:14 mmm_mon.conf
    -rw-r—– 1 root nrpe 1293 Dec 21 15:13 mmm_tools.conf

    These are the modifications we made to check_mmm

    #v1 ERROR Monitor message changed
    if ($mmm_output =~ /DAEMON IS NOT RUNNING/) {
    my $msg = “CRITICAL: MMM Daemon is not running”;
    report_error($msg, $ERRORS{‘CRITICAL’});
    }
    #v2 ERROR Monitor message changed
    if ($mmm_output =~ /ERROR: Can’t connect to monitor daemon/) {
    my $msg = “CRITICAL: MMM Monitor Daemon is not running”;
    report_error($msg, $ERRORS{‘CRITICAL’});
    }

    #mmm2 extend
    if ($mmm_output =~ m/passive/i) {
    my $msg = “CRITICAL: MMM Monitor Daemon is in passive mode”;
    report_error($msg, $ERRORS{‘WARNING’});
    }

    if ($mmm_output =~ m/agent/i) {
    my $msg = “CRITICAL: MMM Agent Daemon is NOT running on ALL DB’s in the cluster”;
    report_error($msg, $ERRORS{‘CRITICAL’});
    }

  8. I want to say that a professional media essay service can be a good assistant on the way of research essay creating. So, all students can use it anytime they need buy essay.

  9. That is cool that people are able to receive the business loans moreover, that opens up completely new chances.

  10. Informative write up, saved the blog for hopes to see more information!

  11. @Josh

    Sorry for ignoring your comment so long. I have added the changes you made and committed the code.

    Thanks a lot. If you have any other patches, let us know!

    Istvan

  12. Dear Fellows,
    Please do help us in our study. It is very important for us to have feedback from you (who is using Nagios). I bet I would not take you more than 5 minutes, all questions are multiple choice and on a single page. We will be highly thankful to all the participants.
    Please click on following link to answer this survey.
    http://www.kwiksurveys.com/online-survey.php?surveyID=KBIOLF_a8c769c3

    Regards
    Muhammad Adnan

  13. Stick for your method which generally involves sitting straight and concentrating on inhaling deeply and evenly. Do not be discouraged if the thoughts are racing. Just bring your consideration back to the breath or the stage of concentration.

  14. Informative blog, bookmarked your site with interest to read more!

  15. Helpful blog, saved the blog with hopes to see more information!

  16. Informative write up, saved the website with hopes to see more!


Leave a comment


No trackbacks yet.

Pages

Categories

Blogroll

Archive

Meta

Recent Comments