Hello,
I want to connect on a remote mysql server and check in a specific table the value of register, any one can indicate a plugin to do it?
example:
I will connect from nagios server in other mysql server using the plugin and it will check by query the value of register in the table and will return the result.
Tks!
sorry for the english.
MONITORING REMOTE MYSQL SERVER
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MONITORING REMOTE MYSQL SERVER
It's fine, I think we have the jist of what you want to do, however your example sounds the same as what you are asking for. I would highly suggest taking a look at the exchange and searching for a plugin which will run queries for you:
http://exchange.nagios.org/
http://exchange.nagios.org/index.php?op ... ql%20query
Something like this perhaps:
http://exchange.nagios.org/directory/Pl ... 29/details
http://exchange.nagios.org/
http://exchange.nagios.org/index.php?op ... ql%20query
Something like this perhaps:
http://exchange.nagios.org/directory/Pl ... 29/details
Re: MONITORING REMOTE MYSQL SERVER
Thanks slansing , i will take a look at the links that you sended..
thanks..
thanks..
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MONITORING REMOTE MYSQL SERVER
Great, let me know if you need help.
Re: MONITORING REMOTE MYSQL SERVER
Hi slansing,
I am using the plugin check_mysqlhealth, i did the conifguration to check mysql connection time and its working fine, but i have a dubt at the how can i make a query using this plugin...
i have a remoe my sql server, and i watn to verify a database called teste, and the table name is test too and when the value of table is 1 is returns ok if the value is diferent its returns warnning.
in the site of plugin i have the fallow exemple :
nagios$ echo 'select 111 from dual' |
check_mysql_health --mode encode
select%20111%20from%20dual
nagios$ check_mysql_health --mode sql
--name select%20111%20from%20dual
CRITICAL - select 111 from dual: 111 | 'select 111 from dual'=111;1;5
and the exlain of this function of plugin :
sql Result of any SQL-Statement that returns a number. The statement itself is passed over with the parameter –name. A Label for the performance data output can be passed over with the parameter –name2. The parameter –units can add units to the output (%, c, s, MB, GB,..). If the SQL-Statement includeds special characters or spaces, it can first be encoded with the mode encode.
i hope that i was clear about my doubt...
tks
I am using the plugin check_mysqlhealth, i did the conifguration to check mysql connection time and its working fine, but i have a dubt at the how can i make a query using this plugin...
i have a remoe my sql server, and i watn to verify a database called teste, and the table name is test too and when the value of table is 1 is returns ok if the value is diferent its returns warnning.
in the site of plugin i have the fallow exemple :
nagios$ echo 'select 111 from dual' |
check_mysql_health --mode encode
select%20111%20from%20dual
nagios$ check_mysql_health --mode sql
--name select%20111%20from%20dual
CRITICAL - select 111 from dual: 111 | 'select 111 from dual'=111;1;5
and the exlain of this function of plugin :
sql Result of any SQL-Statement that returns a number. The statement itself is passed over with the parameter –name. A Label for the performance data output can be passed over with the parameter –name2. The parameter –units can add units to the output (%, c, s, MB, GB,..). If the SQL-Statement includeds special characters or spaces, it can first be encoded with the mode encode.
i hope that i was clear about my doubt...
tks
- Nagios Support
- Posts: 36
- Joined: Thu Sep 04, 2014 12:16 pm
Re: MONITORING REMOTE MYSQL SERVER
We will do some digging on the issue and will get back to you within the next 24 hours.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: MONITORING REMOTE MYSQL SERVER
The correct syntax would be "SELECT COUNT(*) FROM sometable", for example:
Code: Select all
[root@testbox libexec]# /usr/local/nagios/libexec/check_mysql_health --hostname=localhost --port=3306 --username=root --password="nagiosxi" --database=nagios --mode sql --name=SELECT%20COUNT%28%2A%29%20FROM%20nagios_contacts --name2="Test Query" --warning=5 --critical=10
OK - test query: 3 | 'test query'=3;5;10Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: MONITORING REMOTE MYSQL SERVER
thanks guys,
I will try it..
have you seen this plugin: check_mysql_all ?
I will try it..
have you seen this plugin: check_mysql_all ?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MONITORING REMOTE MYSQL SERVER
Are you talking about this out?:
https://code.google.com/p/check-mysql-all/
If you could link the plugin you are talking about that would be a lot easier. Do you have a specific question about it?
https://code.google.com/p/check-mysql-all/
If you could link the plugin you are talking about that would be a lot easier. Do you have a specific question about it?