Problems creating service to monitor ftp service

Mark Andrews mandrews at dkp.com
Thu Jun 23 17:00:15 CEST 2005


I've installed Nagios 2.0b3 on a Suse Enterprise 9 (SLES9) server system 
and am trying to configure it to monitor
the ftp service on an ftp server located on the LAN.

I'm using the 'check_ftp' plugin to monitor the service:

    check_ftp -H ftp.example.com -j

but any problems with the ftp server on the SLES9 system
are being reported as "HOST down" messages instead of "Service down" 
messages. I'm receiving email similar
to the following:

    From: nagios at example.com
    To: nagios-admin at example.com
    Subject: Host DOWN alert for ftp.example.com!

   ***** Nagios  *****

   Notification Type: PROBLEM
   Host: ftp.example.com
   State: DOWN
   Address: 10.0.0.216
   Info: Connection refused

   Date/Time: Thu Jun 23 10:22:56 EDT 2005


Nagios is configured to use two configuration files, nagios.cfg and 
minimal.cfg. The appropriate sections of minimal.cfg
are included at the end of this mesage. How do I modify my nagios 
configuration to recognize a down service instead of
a down host?

Thanks

My configuration is below:

define host{
        use                     generic-host            ; Name of host 
template to use
        host_name               ftp.example.com
        alias                   ftp
        address                 IP-address-of-ftp.example.com
        check_command           check-ftpx
        max_check_attempts      10
        notification_interval   120
        notification_period     24x7
        notification_options    d,r
        contact_groups  admins
        }

define service{
        use                             generic-service         ; Name 
of service template to use
        host_name                       ftp.example.com
        service_description             ftp login
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              4
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  admins
        notification_interval           960
        notification_period             24x7
        notification_options            w,u,c,r,f
        notifications_enabled           1
        active_checks_enabled           1
        passive_checks_enabled          1
        check_command                   check-ftpx
        }

define command{
        command_name    notify-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios  
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: 
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: 
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional 
Info:\n\n$OUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - 
$HOSTALIAS$/$SERVICEDESC$ is$SERVICESTATE$ **" $CONTACTEMAIL$
        }

define command{
        command_name    host-notify-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios  
*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: 
$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: 
$LONGDATETIME$\n" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for 
$HOSTNAME$!" $CONTACTEMAIL$
        }


define command{
        command_name    check-ftpx
        command_line    $USER1$/check_ftp -H $HOSTADDRESS$ -j
        }

define contactgroup{
        contactgroup_name       admins
        alias                   Nagios Administrators
        members                 nagios-admin
        }

define contact{
        contact_name                    nagios-admin
        alias                           Nagios Admin
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,r
        service_notification_commands   notify-by-email
        host_notification_commands      host-notify-by-email
        email                           nagios-admin at example.com
        }





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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