how to monitor mysql and ssh in local localhost ?

J. Bakshi joydeep at infoservices.in
Wed Aug 27 07:56:57 CEST 2008


J. Bakshi wrote:
> Dear list,
>
> I am new to nagios and installed it yesterday.
> Woeking with nagios is a great pleasure. I am using nagios 2.12.
>
> I like to monitor mysql, ssh, openldap, smtp and pop in my localhost
> with nagios.
>
> To check mysql and ssh I have added the following at localhost.cfg
> ========================================================
> # Define a service to check MYSQL
>
> define service{
>       use                            local-service      ; Name of
> service template to use
>         host_name                      localhost
>        service_description            MYSQL
>         check_command                  check_mysql!root!admin
>         }
>
>
> # Define a service to check SSH
>
> define service{
>    use                                 local-service     ; Name of
> service template to use
>    host_name                           localhost
>    service_description                 SSH
>   check_command                       check_ssh!22!192.168.1.1
>    }
> =====================================================================
>
> When I restart nagios it reports configuration error.
>
> What have I done wrong ? Please suggest.
> Thanks
>
>   

A little success. This time I have no "configuration error"

I have added the following in commands.cfg file

===========================================
define command{
        command_name    check_ssh
        command_line    $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
   }
==========================================

The "define service" entry for SSH  in localhost.cfg is

=========================================
define service{
   use                              local-service     ; Name of service
template to use
   host_name                 localhost
   service_description   SSH
   check_command      check_ssh!-t 5 -p 22
   }
=========================================

And the web interface is  showing SSH OK :-)

I like to monitor remote server also to check the services there.
What should I do to monitor "Remote Linux Server"  ?
Please give me some hints.
many thanks

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Joydeep Bakshi, Linux System Admin
Kolkatainfoservices Pvt Ltd,
23A Royd Street, Kolkata 700016, India
Work Phone 91 033 40014784
http://infoservices.in/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list