aboutsummaryrefslogtreecommitdiff
path: root/modules/pkgs/icinga2/check_mysql_slave.patch
blob: 0658a8a398995944781e54d69713fc006e9450dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Index: icinga2-2.4.1/itl/command-plugins.conf
===================================================================
--- icinga2-2.4.1.orig/itl/command-plugins.conf
+++ icinga2-2.4.1/itl/command-plugins.conf
@@ -1775,6 +1775,36 @@ object CheckCommand "mysql" {
 	vars.mysql_hostname = "$check_address$"
 }
 
+object CheckCommand "mysql_slave" {
+	import "plugin-check-command"
+	import "ipv4-or-ipv6"
+
+	command = [ PluginDir + "/check_mysql_slave" ]
+
+	arguments = {
+		"-H" = "$mysql_hostname$"
+		"-P" = "$mysql_port$"
+		"-s" = "$mysql_socket$"
+		"-f" = "$mysql_file$"
+		"-g" = "$mysql_group$"
+		"-u" = "$mysql_username$"
+		"-p" = "$mysql_password$"
+		"-N" = "$mysql_connection_name$"
+		"-w" = "$mysql_warning$"
+		"-c" = "$mysql_critical$"
+		"-l" = {
+			set_if = "$mysql_ssl$"
+		}
+		"-C" = "$mysql_cacert$"
+		"-a" = "$mysql_cert$"
+		"-k" = "$mysql_key$"
+		"-D" = "$mysql_cadir$"
+		"-L" = "$mysql_ciphers$"
+	}
+
+	vars.mysql_hostname = "$check_address$"
+}
+
 object CheckCommand "negate" {
 	import "plugin-check-command"