We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e96d86 commit ddec392Copy full SHA for ddec392
ansible/playbooks/nagios/roles/Nagios_Server/scripts/nagios_host_group_add.sh
@@ -0,0 +1,16 @@
1
+#!/bin/bash
2
+
3
+echo "enter the hostgroup name"
4
+read hostgroup_name
5
6
+echo "enter the hostgroup alias"
7
+read hostgroup_alias
8
9
+echo "enter enter the hostgroup members"
10
+read hostgroup_members
11
12
+echo "define hostgroup{" >> /usr/local/nagios/etc/objects/hostgroups.cfg
13
+echo " hostgroup_name $hostgroup_name" >> /usr/local/nagios/etc/objects/hostgroups.cfg
14
+echo " alias $hostgroup_alias" >> /usr/local/nagios/etc/objects/hostgroups.cfg
15
+echo " members $hostgroup_members" >> /usr/local/nagios/etc/objects/hostgroups.cfg
16
+echo " }" >> /usr/local/nagios/etc/objects/hostgroups.cfg
0 commit comments