disk warning messages
Jeremiah Jester
jeremiahjester at gmail.com
Thu Jun 4 23:01:01 CEST 2009
Hello,
I'm trying to configure nagios to include the disk full percentage in the
subject line of the email notification. For example. Subject: [Nagios]
CRITICAL 99% Full on Server1
My commands currently look something like this for checking disk space.
Anyone have any suggestions for me?
-JJ
=================================================================
Check Disk Commands:
define command{
command_name check_local_disk
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}
define command{
command_name check_remote_disk
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c
check_remote_disk
}
Email Commands:
# 'host-notify-by-email' command definition
define command{
command_name host-notify-by-email
command_line /usr/bin/printf "Subject: [Nagios] $SERVICESTATE$:
$SERVICEDESC$ $HOSTNAME$\nFrom: nagios@$HOSTNAME$.mascorp.com\n\n *****
Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost:
$HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/sbin/exim "Host
$HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
Service:
define service{
use local-service ; Name of
service template to use
use generic-service ; Name of
service template
hostgroup_name servers
service_description DISK SPACE
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups admins
notification_interval 1440
notification_period 24x7
notification_options w,u,c,r
check_command check_nrpe!check_remote_disk!4%!2%!
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090604/68a7ba82/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
-------------- next part --------------
_______________________________________________
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