MYSQL Questions

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

MYSQL Questions

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MYSQL Questions

Post by abrist »

What version of XI and the wizard are you running?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
nagiosadmin42
Posts: 96
Joined: Sat Feb 11, 2012 2:16 pm

Re: MYSQL Questions

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MYSQL Questions

Post by abrist »

How is the index usage reported? Is it the used value, or free value?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
nagiosadmin42
Posts: 96
Joined: Sat Feb 11, 2012 2:16 pm

Re: MYSQL Questions

Post 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.
nagiosadmin42
Posts: 96
Joined: Sat Feb 11, 2012 2:16 pm

Re: MYSQL Questions

Post 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
nagiosadmin42
Posts: 96
Joined: Sat Feb 11, 2012 2:16 pm

Re: MYSQL Questions

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: MYSQL Questions

Post by lmiltchev »

@benningtonr
Is your issue resolved? Is it safe to lock the topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked