summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/Makefile.am1
-rw-r--r--config/gluster-commands.cfg13
-rw-r--r--config/gluster-contacts.cfg15
-rw-r--r--config/gluster-templates.cfg52
4 files changed, 63 insertions, 18 deletions
diff --git a/config/Makefile.am b/config/Makefile.am
index 7c3c8be..7e19136 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -4,6 +4,7 @@ glusternagiosconf_DATA = \
gluster-host-groups.cfg \
gluster-host-services.cfg \
gluster-templates.cfg \
+ gluster-contacts.cfg \
$(NULL)
glusternagiosdefaultconfdir = $(sysconfdir)/nagios/gluster/default
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$
+
}
diff --git a/config/gluster-contacts.cfg b/config/gluster-contacts.cfg
new file mode 100644
index 0000000..758a102
--- /dev/null
+++ b/config/gluster-contacts.cfg
@@ -0,0 +1,15 @@
+define contact {
+ contact_name ovirt
+ alias Ovirt Engine
+ email admin@ovirt.com
+ service_notification_period 24x7
+ service_notification_options w,u,c,r
+ service_notification_commands notify-service-to-ovirt
+ host_notification_period 24x7
+ host_notification_options d,u,r
+ host_notification_commands notify-host-to-ovirt
+ can_submit_commands 1
+ _ovirt_rest_api http://ovirt.com:8080/ovirt-engine/api
+ _ovirt_user admin@internal
+}
+
diff --git a/config/gluster-templates.cfg b/config/gluster-templates.cfg
index 3ee66d4..ce7e307 100644
--- a/config/gluster-templates.cfg
+++ b/config/gluster-templates.cfg
@@ -1,32 +1,50 @@
+define host{
+ name gluster-generic-host
+ use linux-server
+ register 0
+ contacts +ovirt
+}
+
define host {
- name gluster-host
- use linux-server
- check_command check_remote_host
- register 0
+ name gluster-host
+ use gluster-generic-host
+ check_command check_remote_host
+ register 0
+ _gluster_entity Host
}
define host {
- name gluster-cluster
- use linux-server
- register 0
+ name gluster-cluster
+ use gluster-generic-host
+ register 0
+ _gluster_entity Cluster
}
define host{
- name gluster-volume
- use linux-server
- register 0
+ name gluster-volume
+ use gluster-generic-host
+ register 0
+ _gluster_entity Volume
+}
+
+define service {
+ name gluster-service
+ use generic-service
+ register 0
+ contacts +ovirt
+ _gluster_entity Service
}
define service {
- name gluster-service-with-graph
- use generic-service
- action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
- register 0
+ name gluster-service-with-graph
+ use gluster-service
+ action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
+ register 0
}
define service {
- name gluster-service-without-graph
- use generic-service
- register 0
+ name gluster-service-without-graph
+ use gluster-service
+ register 0
}