| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-27-2011, 06:13 AM
|
#1
|
|
Member
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 148
Rep:
|
monitoring EC2 RDS in nagios
Hi,
I want to monitor RDS (mysql database of EC2) using Nagios. In command line ( I am able to do it but I dont know how to feed it in nagios .
On nagios server if I execute the following command , I am able to fetch the information of database (RDS)
Nagios_server #/usr/local/nagios/libexec/check_mysqld.pl -p<password> -f -u <username> -A uptime,threads_connected,slow_queries,open_tables -H <hostname> -q 'SHOW STATUS'
output :- MYSQL 5.1.50 OK | uptime=344783 threads_connected=672 slow_queries=0 open_tables=64
Please let me know, to feed the same output in nagios .
Note :- Here the host name is public dns name (x.y.z.amazon.com) .We cant ping to this host.With mysql command , we can log in and work on databases.
Any help will be highly apreciated.
Krushna
|
|
|
|
05-28-2011, 03:00 PM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,711
|
so you just need to define that command as a nagios command in it's config, and then associate that command with a service, and that service with a node. standard docs are your friends... http://homepage.mac.com/duling/halfd...-Howto-p1.html
|
|
|
0 members found this post helpful.
|
05-30-2011, 10:52 AM
|
#3
|
|
Member
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 148
Original Poster
Rep:
|
Thanks for reply.Adding as a command and as service , i have done already.How to add the service with a node or host ,since here we can not ping to the node(host). Only mysql command will work.In command.cfg, i have added following
define command{
command_name check_mysqld
command_line $USER1$/check_mysqld.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -a uptime,threads_connected,questions,slow_queries,open_tables -w ",,,," -c ",,,,"
}
and in services , I have added
define host{
use rds ; Name of RDS
host_name <RDS name>
alias <RDS name>
address <rds_fqdn_name>
}
#################################################################################################### ##
define service{
use local-service ; Name of service template to use
host_name <RDS_name>
service_description Mysql_health_check
check_command check_mysqld!<username>!<password>
}
In nagios ,it is showing as down. Anything I need to change on this.
|
|
|
|
05-30-2011, 11:08 AM
|
#4
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,711
|
well run the check command manually yourself from a command line. What does it say? What does the service status page actually say other than the overall status? can you actually telnet to port 1433 on the box from the nagios server?
|
|
|
1 members found this post helpful.
|
06-06-2011, 05:50 AM
|
#5
|
|
Member
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 148
Original Poster
Rep:
|
Quote:
Originally Posted by acid_kewpie
well run the check command manually yourself from a command line. What does it say? What does the service status page actually say other than the overall status? can you actually telnet to port 1433 on the box from the nagios server?
|
Hi Chris ,
Thanks for info . It worked for me in the same way . Only change I hade to made was adding hostname .Below is the details .
define service{
use local-service ; Name of service template to use
host_name <any hostname not the Rds name> ;
service_description Mysql_health_check
check_command check_mysqld!<username>!<password>
}
#The rds status will be shown in the defined host name.
Thanks a lot.
Krushna
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:34 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|