The plugin seems to be working fine. we now get a message saying "CRITICAL : Unable to get replication info" for all slave parameters - Slave I/O, Slave Lag, Slave SQL
I have chked with my DB admin and they say that the user has access to the replication info.
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'USERID'@'%' IDENTIFIED BY PASSWORD 'somepassword' |
Also, Can you please let me know what kind of privilages are required for the user to monitor MySQL DB's in general (all the parameters from the wizard).
Monitoring MySQL Servers
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Monitoring MySQL Servers
To use all of the modes available in the check_mysql_health plugin the defined user must have access to these abilities:
The privilege definition will differ from what is defined above, but they will be fairly similar, you could crack open a privilege listing and compare the names.
Code: Select all
connection-time (Time to connect to the server)
uptime (Time the server is running)
threads-connected (Number of currently open connections)
threadcache-hitrate (Hit rate of the thread-cache)
slave-lag (Seconds behind master)
slave-io-running (Slave io running: Yes)
slave-sql-running (Slave sql running: Yes)
qcache-hitrate (Query cache hitrate)
qcache-lowmem-prunes (Query cache entries pruned because of low memory)
keycache-hitrate (MyISAM key cache hitrate)
bufferpool-hitrate (InnoDB buffer pool hitrate)
bufferpool-wait-free (InnoDB buffer pool waits for clean page available)
log-waits (InnoDB log waits because of a too small log buffer)
tablecache-hitrate (Table cache hitrate)
table-lock-contention (Table lock contention)
index-usage (Usage of indices)
tmp-disk-tables (Percent of temp tables created on disk)
slow-queries (Slow queries)
long-running-procs (long running processes)
cluster-ndbd-running (ndnd nodes are up and running)
sql (any sql command returning a single number)-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitoring MySQL Servers
The plugin creator also has this to say in the README
Not totally helpful, but it looks like they are expecting user to have all permissions
Code: Select all
How to prepare the database for monitoring
--------------------------------------
GRANT USAGE ON *.* TO 'nagios'@'nagiosserver' IDENTIFIED BY 'nagiospassword';Re: Monitoring MySQL Servers
I have observed (and also reported in my earlier threads) that the slow-queries service is not getting created though we tick the checkbox against the slow queries parameter while configuring MySQL parameters via Wizard. I guess this is an issue with the wizard.
we are using Nagios XI 2012R1.8
we are using Nagios XI 2012R1.8
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Monitoring MySQL Servers
I have confirmed this as a bug, and I am going to talk to the developer about it, can you also file a bug report at:
http://tracker.nagios.com/ on this? That would help us greatly! Thanks!
http://tracker.nagios.com/ on this? That would help us greatly! Thanks!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitoring MySQL Servers
No need to file the tracker, it has been fixed.
Install attached wizard through Admin -> Manage Wizards
Install attached wizard through Admin -> Manage Wizards
You do not have the required permissions to view the files attached to this post.
Re: Monitoring MySQL Servers
I was getting the error below even with version 1.2 of this wizard. This would happen to me when there was a legitimate issue with slave replication (aside from the slave just being behind).
Can't locate object method "errstr" via package "DBD::MySQL::Server::Connection::Dbi" at ./check_mysql_health line 368.
To fix it, I changed all instances of errstr() to {errstr} in check_mysql_health:
I found the information for this fix here:
http://labs.consol.de/vanilla/index.php ... mment_1660
Can't locate object method "errstr" via package "DBD::MySQL::Server::Connection::Dbi" at ./check_mysql_health line 368.
To fix it, I changed all instances of errstr() to {errstr} in check_mysql_health:
Code: Select all
diff check_mysql_health.bak check_mysql_health
366c366
< "unable to get slave lag, because io thead is not running");
---
> "unable to get slave lag, because io thread is not running");
369c369
< $self->{handle}->errstr() ? $self->{handle}->errstr() : "");
---
> $self->{handle}->{errstr} ? $self->{handle}->{errstr} : "");
380c380
< $self->{handle}->errstr() ? $self->{handle}->errstr() : "");
---
> $self->{handle}->{errstr} ? $self->{handle}->{errstr} : "");
391c391
< $self->{handle}->errstr() ? $self->{handle}->errstr() : "");
---
> $self->{handle}->{errstr} ? $self->{handle}->{errstr} : "");
http://labs.consol.de/vanilla/index.php ... mment_1660
Re: Monitoring MySQL Servers
Thank you for the post!
This topic is quite old so I will be locking it now.
This topic is quite old so I will be locking it now.
Former Nagios employee