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.cfg5
-rw-r--r--config/gluster-host.cfg.template34
3 files changed, 40 insertions, 0 deletions
diff --git a/config/Makefile.am b/config/Makefile.am
index 7ee5a11..0f7f73a 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -11,6 +11,7 @@ glusternagiosconf_DATA = \
glusternagiosdefaultconfdir = $(sysconfdir)/nagios/gluster/default
glusternagiosdefaultconf_DATA = \
glustercluster.cfg.sample \
+ gluster-host.cfg.template \
node1.cfg \
$(NULL)
diff --git a/config/gluster-commands.cfg b/config/gluster-commands.cfg
index c2d70a7..41aa99b 100644
--- a/config/gluster-commands.cfg
+++ b/config/gluster-commands.cfg
@@ -62,6 +62,11 @@ define command{
}
define command{
+ command_name gluster_auto_discovery
+ command_line $USER1$/gluster/discovery.py -H $ARG1$ -c $ARG2$
+}
+
+define command{
command_name check_dummy
command_line $USER1$/check_dummy 0
}
diff --git a/config/gluster-host.cfg.template b/config/gluster-host.cfg.template
new file mode 100644
index 0000000..bd1b2af
--- /dev/null
+++ b/config/gluster-host.cfg.template
@@ -0,0 +1,34 @@
+###@GENERATED@###
+# AUTO-GENERATED FILE. DO NOT MODIFY.
+#
+# This confinguration file was automatically generated by the
+# Gluster Auto Discovery tool. It should not be modified by hand.
+#
+
+{% if host['use'] == 'gluster-cluster' -%}
+define hostgroup{
+hostgroup_name {{host['host_name']}}
+alias {{host['alias']}}
+}
+{%- endif %}
+
+define host{
+use {{host['use']}}
+host_name {{host['host_name']}}
+alias {{host['alias']}}
+address {{host['address']}}
+{% if host['check_command'] != "" -%}
+check_command {{host['check_command']}}
+{% endif -%}
+{% if host['hostgroups'] != "" -%}
+hostgroups {{host['hostgroups']}}
+{% endif -%}
+}
+
+{% for service in host['host_services'] %}
+define service{
+{%- for key, value in service.iteritems() %}
+{{ key.ljust(20) }} {{ value }}
+{%- endfor %}
+}
+{% endfor %}