Define new parameters nagios_monitoring_[network|interface]
There are used to configure Nagios hosts
Depends-On: Ie40902c6f39e9b7bec3d242410a57c8d69f2cc14
Change-Id: Id194d2da7e5ca9037cdf4de833e2d5dad48839ab
diff --git a/README.rst b/README.rst
index 539b6d2..1f1c8f4 100644
--- a/README.rst
+++ b/README.rst
@@ -78,3 +78,19 @@
# Enabling 7 VFs on eth4 PF
echo 7 > /sys/class/net/eth4/device/sriov_numvfs; sleep 2; ip link set eth4 up
exit 0
+
+
+Nagios Monitoring
+=================
+
+Configure Hosts dynamically
+---------------------------
+
+The nagios formula looks up grains.items throught Salt mines to discover hosts.
+There are two different parameters that tell the nagios formula how to determine
+the hosts' IP address:
+
+- nagios_monitoring_network: IP subnet(s) in CIDR notation (can be a list)
+- nagios_monitoring_interface: interface name(s). Default ['eth0', 'ens3'].
+
+'nagios_monitoring_network' parameter takes precedence over 'nagios_monitoring_interface' list.
diff --git a/nagios/server/init.yml b/nagios/server/init.yml
index e495915..24dea22 100644
--- a/nagios/server/init.yml
+++ b/nagios/server/init.yml
@@ -3,6 +3,10 @@
nagios_notification_email: root@localhost
nagios_host_dimension_key: nagios_host
nagios_default_host_alarm_clusters: 00-clusters
+ nagios_monitoring_network: []
+ nagios_monitoring_interface:
+ - eth0
+ - ens3
nagios :
server:
enabled: true
@@ -63,10 +67,8 @@
- target: 'G@services:openssh'
contact_groups: Operator
use: generic_host_tpl
- interface:
- - eth0
- - ens3
- - p4p1.602
+ interface: ${_param:nagios_monitoring_interface}
+ network: ${_param:nagios_monitoring_network}
services:
- target: 'G@roles:openssh.server'
name: SSH