Page 1 of 1

MYSQL Questions

Posted: Thu Sep 11, 2014 9:13 am
by benningtonr
I just started testing the mysql server wizard.
I have it monitoring a test Centos box with nothing hitting it, just a standalone clean install box.
After setting up the mysql wizard all checks are good except for three.

Host Name Service Duration Status Information
192.168.99.166 MySQL Index Usage 55m 59s CRITICAL - index usage 1.30%
192.168.99.166 MySQL Thread Cache Hit Rate 57m 6s CRITICAL - thread cache hitrate 1.30%
192.168.99.166 MySQL MyISAM Key Cache Hit Rate 57m 8s CRITICAL - myisam keycache hitrate at 50.00%

This box has NOTHING on it so why are these critical?
all settings were left at the default

ANOTHER QUESTION:
On the production server there are 5 db's do we have to set this up for each or will they all be monitored under a single entry.

Re: MYSQL Questions

Posted: Thu Sep 11, 2014 3:17 pm
by abrist
What version of XI and the wizard are you running?

Re: MYSQL Questions

Posted: Wed Sep 17, 2014 4:46 pm
by nagiosadmin42
We're on Nagios XI 2012R1.1 with MySQL Server wizard version 1.3.

I found that it creates the "MySQL Index Usage" service configuration with the arguments:

Code: Select all

--hostname=localhost --port=3306 --username=root --password="yourpassword" --database=information_schema --mode index-usage --warning 90: --critical 80:
Note the colon in the warning and critical values. This is causing incorrect interpretation of the values which generates alerts unnecessarily.

Remove the colons, as follows:

Code: Select all

--hostname=localhost --port=3306 --username=root --password="yourpassword" --database=information_schema --mode index-usage --warning 90 --critical 80
Now the "index_usage" datasource graph will display the "Warning on 90" and "Critical on 80" legend entries... however why they default to 90/80 is a separate question... adjust them as appropriate for your needs.

Re: MYSQL Questions

Posted: Wed Sep 17, 2014 4:53 pm
by abrist
How is the index usage reported? Is it the used value, or free value?

Re: MYSQL Questions

Posted: Wed Sep 17, 2014 4:55 pm
by nagiosadmin42
I had the same question, so I took a look at the service plugin script check_mysql_health, and saw a comment which refers to this blog post: http://johnjacobm.wordpress.com/2007/06/

See the section Percentage of full table scans, which describes the calculations involved for the "Index Usage" service, which is confusing... the service would be better named as Percent of Full Table Scans.

Re: MYSQL Questions

Posted: Wed Sep 17, 2014 5:29 pm
by nagiosadmin42
After reviewing the other services generated by the MySQL Server wizard, the following entries also have the problem with colons being in the warning/critical values:
  • MySQL InnoDB Buffer Pool Hit Rate
    MySQL MyISAM Key Cache Hit Rate
    MySQL Query Cache Hit Rate
    MySQL Table Cache Hit Rate
    MySQL Thread Cache Hit Rate
    MySQL Uptime

Re: MYSQL Questions

Posted: Wed Sep 17, 2014 6:18 pm
by nagiosadmin42
Ok, I've spent way too much time on this today...

I found this page which provides examples for the types of ranges that are supported by Nagios plugins: https://nagios-plugins.org/doc/guidelin ... MPLERANGES

It turns out that the range "95:" means to alert if the value is below 95. And that explains the default ranges used for the services, e.g.

Code: Select all

--hostname=localhost --port=3306 --username=root --password="yourpassword" --database=information_schema --mode index-usage --warning 90: --critical 80:
Which means to generate a warning alert if the index-usage value (for this example) falls below 90%, and a critical alert if the usage falls below 80%.

And I guess the graphing module (PNP4Nagios) doesn't generate a legend or threshold line when using these infinity ranges.

So I guess everything is working as designed/expected.

The only issue I have is the service name MySQL Index Usage, which I've gone ahead and renamed as MySQL Percent of Full Table Scans and set the thresholds to be w=20, c=25.

Re: MYSQL Questions

Posted: Thu Sep 18, 2014 11:26 am
by lmiltchev
@benningtonr
Is your issue resolved? Is it safe to lock the topic?