summaryrefslogtreecommitdiffstats
path: root/config/gluster-commands.cfg
diff options
context:
space:
mode:
authorRamesh Nachimuthu <rnachimu@redhat.com>2014-03-13 19:26:00 +0530
committerBala.FA <barumuga@redhat.com>2014-04-29 10:21:36 +0530
commit998e1f9ef43f8fd6e2a7a3722bfd4f3f734c450d (patch)
treeb67379b12887cf4a0fa143ab03c10a80fb1c46a7 /config/gluster-commands.cfg
parent7f950eef214193ed6738f445995e058bcf66d3ca (diff)
Notification: Notification handler for ovirt notification
Added a new notification handler to notify nagios events to ovirt. A new contact ovirt is added with the handler which can sent events/alerts to ovirt engine using Rest API. By default all gluster related configuration entities like host, volume, gluster, bricks will have this contact. By default contact ovirt will have some default values for ovirt engie rest api and user fields. User has to fill the right values in ovirt contact defined in gluster-contacts.cfg file. Ovirt password has to be configured as a user variable $USER3$ in file /etc/nagios/private/resource.cfg. User variable $USER3$ used in command to pass the password to the handler. Change-Id: I19074af6ae1ee4a8c16d8821b10a1c3a345f321a Signed-off-by: Ramesh Nachimuthu <rnachimu@redhat.com> Reviewed-on: https://cuckoo.blr.redhat.com:8443/8 Reviewed-by: Timothy Asir <tim.gluster@gmail.com> Reviewed-by: Sahina Bose <sabose@redhat.com>
Diffstat (limited to 'config/gluster-commands.cfg')
-rw-r--r--config/gluster-commands.cfg13
1 files changed, 12 insertions, 1 deletions
diff --git a/config/gluster-commands.cfg b/config/gluster-commands.cfg
index 5c335c7..ccf2998 100644
--- a/config/gluster-commands.cfg
+++ b/config/gluster-commands.cfg
@@ -31,5 +31,16 @@ define command {
define command {
command_name host_service_handler
- command_line $USER1$/gluster_host_service_handler.py -s $SERVICESTATE$ -t $SERVICESTATETYPE$ -a $SERVICEATTEMPT$ -l $HOSTADDRESS$ -n $SERVICEDESC$
+ command_line $USER1$/gluster_host_service_handler.py -s $SERVICESTATE$ -t $SERVICESTATETYPE$ -a $SERVICEATTEMPT$ -l $HOSTADDRESS$ -n "$SERVICEDESC$"
+}
+
+define command {
+ command_name notify-host-to-ovirt
+ command_line $USER1$/gluster/notify_ovirt_engine_handler.py -c $HOSTGROUPNAME$ -H $HOSTNAME$ -g $_HOSTGLUSTER_ENTITY$ -t $HOSTSTATE$ -o $_CONTACTOVIRT_REST_API$ -u $_CONTACTOVIRT_USER$ -p $USER3$
+}
+
+define command {
+ command_name notify-service-to-ovirt
+ command_line $USER1$/gluster/notify_ovirt_engine_handler.py -c $HOSTGROUPNAME$ -H $HOSTNAME$ -g $_SERVICEGLUSTER_ENTITY$ -s "$SERVICEDESC$" -t $SERVICESTATE$ -o $_CONTACTOVIRT_REST_API$ -u $_CONTACTOVIRT_USER$ -p $USER3$
+
}