Browse Source

icinga2: Add check for burp backup

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 8 months ago
parent
commit
1970422ecf
1 changed files with 21 additions and 0 deletions
  1. 21 0
      icinga2/services/burp.conf

+ 21 - 0
icinga2/services/burp.conf

@@ -0,0 +1,21 @@
+#
+# Check burp backup
+#
+
+{%- set burp_server = salt['pillar.get']('burp:server:fqdn') %}
+
+
+apply Service "burp_backup" {
+        import "generic-service"
+
+	check_interval = 1h
+
+	check_command = "file_age"
+	vars.file_age_warning_time  = 100800	# 28h
+	vars.file_age_critical_time = 115200	# 32h
+	vars.file_age_file = "/srv/burp/" + host.name + "/current"
+
+	command_endpoint = "{{ burp_server }}"
+
+	assign where host.address && host.vars.os == "Linux" && "backup" in host.vars.tags
+}