Pls Help
Chandresh Suthar
chandresh.suthar at gmail.com
Sun Mar 26 12:39:30 CEST 2006
Dear All,
I am able to send mails to my persoanl email id by "mail" command.
But notification is not going. I have configured sendmail. I am not
even receiving mails on local system at nagios at localhost( I tried).
I am even not getting any error messages in logs of nagios.
I am using solaris 8. Pls also suggest how we can specify subject as in
solaris i did n't find option of specifying subject.
contacts.cfg
define contact{
contact_name nagios
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email sap-ops.mumbai at ril.com
}
hostgroups.cfg
define hostgroup{
hostgroup_name solaris-boxes
alias Solaris Servers
contact_groups solaris-admins
members Blaze
}
contactgroups.cfg
define contactgroup{
contactgroup_name solaris-admins
alias Solaris Administrators
members nagios
}
define host{
name generic-host ; The name of this
host template - referenced in other host definition
s, used for template recursion/resolution
notifications_enabled 1 ; Host notifications are
enabled
event_handler_enabled 1 ; Host event handler is
enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information
across program restarts
retain_nonstatus_information 1 ; Retain non-status
information across program restarts
register 0 ; DONT REGISTER THIS
DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
hosts.cfg
# 'Solaris' host definition
define host{
use generic-host ; Name of host
template to use
host_name Blaze
alias Solaris Server
address 10.8.217.251
check_command check-host-alive
max_check_attempts 10
notification_interval 480
notification_period 24x7
notification_options d,u,r
}
services.cfg
define service{
name generic-service ; The 'name' of this
service template, referenced in other service def
initions
active_checks_enabled 1 ; Active service checks are
enabled
passive_checks_enabled 1 ; Passive service checks are
enabled/accepted
parallelize_check 1 ; Active service checks
should be parallelized (disabling this can lead to maj
or performance problems)
obsess_over_service 1 ; We should obsess over this
service (if necessary)
check_freshness 0 ; Default is to NOT check
service 'freshness'
notifications_enabled 1 ; Service notifications are
enabled
event_handler_enabled 1 ; Service event handler is
enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information
across program restarts
retain_nonstatus_information 1 ; Retain non-status
information across program restarts
register 0 ; DONT REGISTER THIS
DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
# Service definition
define service{
use generic-service ; Name of
service template to use
host_name Blaze
service_description PING
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups solaris-admins
notification_interval 240
notification_period 24x7
notification_options c,r
check_command check_ping!100.0,20%!500.0,60%
}
misccommands.cfg
# 'notify-by-email' command definition
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: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" |
/usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is
$SERVICESTATE$ **" $CONTACTEMAIL$
}
# 'host-notify-by-email' command definition
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: $OUTPUT$\n\nDate/Time:
$DATETIME$\n" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!"
$CONTACTEMAIL$
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060326/9f042d16/attachment.html>
More information about the Users
mailing list