LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-27-2011, 06:13 AM   #1
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 168

Rep: Reputation: 1
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
 
Old 05-28-2011, 03:00 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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.
Old 05-30-2011, 10:52 AM   #3
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 168

Original Poster
Rep: Reputation: 1
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.
 
Old 05-30-2011, 11:08 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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.
Old 06-06-2011, 05:50 AM   #5
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 168

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by acid_kewpie View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios Monitoring sachingarg18@yahoo.com Linux - Newbie 3 04-12-2011 04:50 AM
Nagios monitoring call_krushna Linux - Networking 1 01-12-2011 08:51 AM
nagios monitoring 124vikas.dange@gmail.com Linux - Server 1 10-04-2010 12:55 AM
[SOLVED] nagios h/w monitoring divyashree Linux - Hardware 9 09-21-2010 06:47 AM
network monitoring:unable to launch nagios network monitoring system oladapo1980 Linux - Newbie 0 07-21-2009 01:45 PM


All times are GMT -5. The time now is 04:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration