diff options
Diffstat (limited to 'modules/private/monitoring/objects_common.nix')
-rw-r--r-- | modules/private/monitoring/objects_common.nix | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/modules/private/monitoring/objects_common.nix b/modules/private/monitoring/objects_common.nix index 10cc149..7c9f642 100644 --- a/modules/private/monitoring/objects_common.nix +++ b/modules/private/monitoring/objects_common.nix | |||
@@ -10,9 +10,9 @@ | |||
10 | , load5Alert ? loadAlert | 10 | , load5Alert ? loadAlert |
11 | , load15Alert ? load5Alert | 11 | , load15Alert ? load5Alert |
12 | , mdadm | 12 | , mdadm |
13 | , sudo | ||
14 | , master | 13 | , master |
15 | , lib | 14 | , lib |
15 | , mypluginsConfig | ||
16 | , ... | 16 | , ... |
17 | }: | 17 | }: |
18 | let | 18 | let |
@@ -109,58 +109,18 @@ in | |||
109 | ]; | 109 | ]; |
110 | } | 110 | } |
111 | ]; | 111 | ]; |
112 | command = { | 112 | command = lib.foldr (v: o: o // (v.commands or {})) {} (builtins.attrValues mypluginsConfig) // { |
113 | check_dns = "$USER1$/check_dns -H $ARG1$ -s $HOSTADDRESS$ $ARG2$"; | ||
114 | check_emails = "$USER2$/check_emails -H $HOSTADDRESS$ -i $USER203$ -l $ARG1$ -p $ARG2$ -s $ARG3$ -f $ARG4$"; | ||
115 | check_emails_local = "$USER2$/check_emails -H $HOSTADDRESS$ -n $ARG1$ -r $ADMINEMAIL$ -s $ARG2$ -f $ARG3$"; | ||
116 | check_backup_eriomem = "$USER2$/check_eriomem $USER208$"; | ||
117 | check_backup_eriomem_age = "$USER2$/check_backup_eriomem_age $ARG1$"; | ||
118 | check_backup_ovh_age = "$USER2$/check_backup_ovh_age $ARG1$"; | ||
119 | check_external_dns = "$USER1$/check_dns -H $ARG2$ -s $ARG1$ $ARG3$"; | ||
120 | check_ftp_database = "$USER2$/check_ftp_database"; | ||
121 | check_git = "$USER2$/check_git $USER203$"; | ||
122 | check_http = "$USER1$/check_http --sni -f stickyport -H \"$ARG1$\" -u \"$ARG2$\" -r \"$ARG3$\""; | ||
123 | check_https = "$USER1$/check_http --sni --ssl -f stickyport -H \"$ARG1$\" -u \"$ARG2$\" -r \"$ARG3$\""; | ||
124 | check_https_auth = "$USER1$/check_http --sni --ssl -a \"$USER202$\" -f stickyport -H \"$ARG1$\" -u \"$ARG2$\" -r \"$ARG3$\""; | ||
125 | check_https_certificate = "$USER1$/check_http --sni --ssl -H \"$ARG1$\" -C 21,15"; | ||
126 | check_https_code = "$USER1$/check_http --sni --ssl -f stickyport -H \"$ARG1$\" -u \"$ARG2$\" -e \"$ARG3$\" -r \"$ARG4$\""; | ||
127 | check_imap_connection = "$USER2$/check_imap_connection -u \"$USER204$\" -p \"$USER205$\" -H \"imap.immae.eu:143\""; | ||
128 | check_local_disk = "$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$"; | 113 | check_local_disk = "$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$"; |
129 | check_local_procs = "$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$"; | 114 | check_local_procs = "$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$"; |
130 | check_local_load = "$USER1$/check_load -r -w $ARG1$ -c $ARG2$"; | 115 | check_local_load = "$USER1$/check_load -r -w $ARG1$ -c $ARG2$"; |
131 | check_local_swap = "$USER1$/check_swap -n ok -w $ARG1$ -c $ARG2$"; | 116 | check_local_swap = "$USER1$/check_swap -n ok -w $ARG1$ -c $ARG2$"; |
132 | check_local_bandwidth = "$USER2$/check_bandwidth -i=$ARG1$ -w $ARG2$ -c $ARG3$"; | ||
133 | check_memory = "$USER2$/check_mem.sh -w $ARG1$ -c $ARG2$"; | ||
134 | check_command_match = "$USER2$/check_command -c \"$ARG1$\" -C \"$ARG2$\" $ARG3$"; | ||
135 | check_command_output = "$USER2$/check_command -c \"$ARG1$\" -s 0 -o \"$ARG2$\" $ARG3$"; | ||
136 | check_command_status = "$USER2$/check_command -c \"$ARG1$\" -s \"$ARG2$\" $ARG3$"; | ||
137 | check_ntp = "$USER1$/check_ntp_time -t 30 -q -H 0.arch.pool.ntp.org"; | 117 | check_ntp = "$USER1$/check_ntp_time -t 30 -q -H 0.arch.pool.ntp.org"; |
138 | check_mailq = "$USER1$/check_mailq -s -w 1 -c 2"; | 118 | check_mailq = "$USER1$/check_mailq -s -w 1 -c 2"; |
139 | check_megaraid = "$USER2$/check_megaraid_sas --sudo"; | ||
140 | check_mysql_replication = "${sudo} -u mysql $USER2$/check_mysql_replication \"$ARG1$\" \"$ARG2$\""; | ||
141 | check_postgresql_replication = "${sudo} -u postgres $USER2$/check_postgres_replication \"$ARG1$\" \"$ARG2$\" \"$ARG3$\""; | ||
142 | check_openldap_replication = "${sudo} -u openldap $USER2$/check_openldap_replication \"$ARG1$\" \"$ARG2$\" \"$ARG3$\" \"$ARG4$\" \"$ARG5$\""; | ||
143 | check_ovh_sms = "$USER2$/check_ovh_sms \"$USER209$\""; | ||
144 | check_redis_replication = "${sudo} -u redis $USER2$/check_redis_replication \"$ARG1$\""; | ||
145 | check_smtp = "$USER1$/check_smtp -H $HOSTADDRESS$ -p 25 -S -D 21,15"; | 119 | check_smtp = "$USER1$/check_smtp -H $HOSTADDRESS$ -p 25 -S -D 21,15"; |
146 | check_tcp = "$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ -e \"$ARG2$\" -Mcrit"; | ||
147 | check_tcp_ssl = "$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ -S -D 21,15"; | ||
148 | check_zfs = "$USER2$/check_zpool.sh -p ALL -w 80 -c 90"; | ||
149 | 120 | ||
150 | check_host_alive = "$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5"; | 121 | check_host_alive = "$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5"; |
151 | check_last_file_date = "${sudo} -u \"$ARG3$\" $USER2$/check_last_file_date \"$ARG1$\" \"$ARG2$\""; | ||
152 | check_ok = "$USER1$/check_dummy 0 \"Dummy OK\""; | 122 | check_ok = "$USER1$/check_dummy 0 \"Dummy OK\""; |
153 | check_critical = "$USER1$/check_dummy 2 \"Dummy CRITICAL\""; | 123 | check_critical = "$USER1$/check_dummy 2 \"Dummy CRITICAL\""; |
154 | |||
155 | # $OVE is to force naemon to run via shell instead of execve which fails here | ||
156 | notify-host-by-email = "ADMINEMAIL=\"$ADMINEMAIL$\" SERVICENOTIFICATIONID=\"$SERVICENOTIFICATIONID$\" HOSTSTATE=\"$HOSTSTATE$\" HOSTOUTPUT=\"$HOSTOUTPUT$\" $USER2$/notify_by_email host \"$NOTIFICATIONTYPE$\" \"$HOSTALIAS$\" \"$LONGDATETIME$\" \"$CONTACTEMAIL$\" $OVE"; | ||
157 | # $OVE is to force naemon to run via shell instead of execve which fails here | ||
158 | notify-service-by-email = "ADMINEMAIL=\"$ADMINEMAIL$\" SERVICENOTIFICATIONID=\"$SERVICENOTIFICATIONID$\" SERVICEDESC=\"$SERVICEDESC$\" SERVICESTATE=\"$SERVICESTATE$\" SERVICEOUTPUT=\"$SERVICEOUTPUT$\" $USER2$/notify_by_email service \"$NOTIFICATIONTYPE$\" \"$HOSTALIAS$\" \"$LONGDATETIME$\" \"$CONTACTEMAIL$\" $OVE"; | ||
159 | notify-by-slack = "HOST=\"$HOSTALIAS$\" SERVICESTATE=\"$SERVICESTATE$\" SERVICEDESC=\"$SERVICEDESC$\" SERVICEOUTPUT=\"$SERVICEOUTPUT$\" $USER2$/notify_by_slack \"$ARG1$\" \"$ARG2$\""; | ||
160 | notify-host-eban-url = "STATUS_NAME=\"Server\" USER=\"$USER210$\" PASSWORD=\"$USER211$\" HOSTSTATE=\"$HOSTSTATE$\" $USER2$/notify_eban_url"; | ||
161 | notify-service-eban-url = "STATUS_NAME=\"$_SERVICEWEBSTATUS_NAME$\" USER=\"$USER210$\" PASSWORD=\"$USER211$\" SERVICESTATE=\"$SERVICESTATE$\" $USER2$/notify_eban_url"; | ||
162 | |||
163 | notify-master = "$USER2$/send_nrdp.sh -u \"$USER200$\" -t \"$USER201$\" -H \"$HOSTADDRESS$\" -s \"$SERVICEDESC$\" -S \"$SERVICESTATEID$\" -o \"$SERVICEOUTPUT$ | $SERVICEPERFDATA$\""; | ||
164 | }; | 124 | }; |
165 | timeperiod = { | 125 | timeperiod = { |
166 | "24x7" = { | 126 | "24x7" = { |