Page 1 of 1

ups device adding in Nagios

Posted: Sat May 28, 2011 9:51 pm
by sathish
vi mgeups.cfg
#### HOST ####
define host{
use generic-host
host_name mge-ups
alias mge-ups
address 10.1.1.232
}

###############################################################################
###############################################################################
#
# HOST GROUP DEFINITION
#
###############################################################################
###############################################################################

# Define an optional hostgroup for UPS

define hostgroup{
hostgroup_name UPS ; The name of the hostgroup
alias mge-ups; Long name of the group
members mge-ups ; Comma separated list of hosts that belong to this group
}



###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################


# Define a service to "ping" the mge-ups

define service{
use generic-service ; Name of service template to use
host_name mge-ups
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}

and template entry is
# UPS service definition template - This is NOT a real service, just a template!

define service{
name mgeups ; The name of this service template
use generic-service ; Inherit default values from the generic-service definition
# max_check_attempts 0 ; Re-check the service up to 4 times in order to determine its final (hard) state
normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until a hard state can be determined
# register 1 ; DONT REGISTER

and i have given the path in nagios.cfg
when i check the config /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

it showing error with /usr/local/nagios/etc/objects
max_check_attempts and cannot register.