summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorJulien Dessaux2018-05-04 12:14:25 +0200
committerJulien Dessaux2018-05-04 12:15:06 +0200
commit102da120671f339eefd97048c7f6ce6478b55ce0 (patch)
tree817e0b518a3dd316489083c21732d61aca2fad7f /services
parentAdded fail2ban support for sshd on linux (diff)
downloadmasterfiles-102da120671f339eefd97048c7f6ce6478b55ce0.tar.gz
masterfiles-102da120671f339eefd97048c7f6ce6478b55ce0.tar.bz2
masterfiles-102da120671f339eefd97048c7f6ce6478b55ce0.zip
Bootstrapped inventory system
Diffstat (limited to 'services')
-rw-r--r--services/inventory.cf17
-rw-r--r--services/main.cf8
2 files changed, 22 insertions, 3 deletions
diff --git a/services/inventory.cf b/services/inventory.cf
new file mode 100644
index 0000000..93bd580
--- /dev/null
+++ b/services/inventory.cf
@@ -0,0 +1,17 @@
+bundle agent inventory
+{
+ files:
+ any::
+ "$(sys.workdir)/inventory/."
+ create => "true",
+ perms => system_owned("700"),
+ classes => if_repaired("inventory_folder_repaired");
+ "$(sys.workdir)/inventory/host_info_report"
+ create => "true",
+ perms => system_owned("400"),
+ edit_template => "$(sys.inputdir)/templates/inventory/host_info_report.mustache",
+ template_method => "mustache";
+ reports:
+ any::
+ "$(this.bundle): $(sys.workdir)/inventory folder repaired" ifvarclass => "inventory_folder_repaired";
+}
diff --git a/services/main.cf b/services/main.cf
index 6a688d4..1305be0 100644
--- a/services/main.cf
+++ b/services/main.cf
@@ -3,6 +3,7 @@ body file control
inputs => {
"services/common.cf",
"services/applications.cf",
+ "services/inventory.cf",
"services/os.cf",
"services/julien.cf",
};
@@ -13,12 +14,13 @@ bundle common classify
vars:
any::
"bundles" slist => {
- "common",
- "os",
- "julien",
"bareos_fd",
"check_mk",
+ "common",
+ "inventory",
+ "julien",
"nrpe",
+ "os",
"sshd",
};
classes: