diff options
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/check_apt.c | 9 | ||||
| -rw-r--r-- | plugins/check_curl.c | 2 | ||||
| -rw-r--r-- | plugins/check_dbi.c | 2 | ||||
| -rw-r--r-- | plugins/check_disk.c | 3 | ||||
| -rw-r--r-- | plugins/check_ldap.c | 4 | ||||
| -rw-r--r-- | plugins/check_load.c | 13 | ||||
| -rw-r--r-- | plugins/check_mrtg.c | 4 | ||||
| -rw-r--r-- | plugins/check_mrtgtraf.c | 5 | ||||
| -rw-r--r-- | plugins/check_mysql.c | 2 | ||||
| -rw-r--r-- | plugins/check_mysql_query.c | 3 | ||||
| -rw-r--r-- | plugins/check_ntp_peer.c | 2 | ||||
| -rw-r--r-- | plugins/check_ntp_time.c | 2 | ||||
| -rw-r--r-- | plugins/check_pgsql.c | 2 | ||||
| -rw-r--r-- | plugins/check_radius.c | 3 | ||||
| -rw-r--r-- | plugins/check_real.c | 3 | ||||
| -rw-r--r-- | plugins/check_smtp.c | 3 | ||||
| -rw-r--r-- | plugins/check_snmp.c | 2 | ||||
| -rw-r--r-- | plugins/check_ssh.c | 2 | ||||
| -rw-r--r-- | plugins/check_swap.c | 3 | ||||
| -rw-r--r-- | plugins/check_tcp.c | 2 | ||||
| -rw-r--r-- | plugins/check_ups.c | 2 | ||||
| -rw-r--r-- | plugins/check_users.c | 7 |
22 files changed, 75 insertions, 5 deletions
diff --git a/plugins/check_apt.c b/plugins/check_apt.c index 9ed5b6cf..345b8414 100644 --- a/plugins/check_apt.c +++ b/plugins/check_apt.c | |||
| @@ -204,6 +204,15 @@ int main(int argc, char **argv) { | |||
| 204 | mp_add_subcheck_to_check(&overall, sc_security_updates); | 204 | mp_add_subcheck_to_check(&overall, sc_security_updates); |
| 205 | mp_add_subcheck_to_check(&overall, sc_other_updates); | 205 | mp_add_subcheck_to_check(&overall, sc_other_updates); |
| 206 | 206 | ||
| 207 | char *ok_summary = NULL; | ||
| 208 | |||
| 209 | if (packages_available == 0) { | ||
| 210 | ok_summary = "No pending updates"; | ||
| 211 | } else { | ||
| 212 | xasprintf(&ok_summary, "%zu pending updates", packages_available); | ||
| 213 | } | ||
| 214 | mp_set_ok_summary(&overall, ok_summary); | ||
| 215 | |||
| 207 | mp_exit(overall); | 216 | mp_exit(overall); |
| 208 | } | 217 | } |
| 209 | 218 | ||
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 3f44c86b..adafc620 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
| @@ -161,6 +161,8 @@ int main(int argc, char **argv) { | |||
| 161 | mp_check overall = mp_check_init(); | 161 | mp_check overall = mp_check_init(); |
| 162 | mp_subcheck sc_test = check_http(config, working_state, 0); | 162 | mp_subcheck sc_test = check_http(config, working_state, 0); |
| 163 | 163 | ||
| 164 | mp_set_ok_summary(&overall, "Connection test succeeded"); | ||
| 165 | |||
| 164 | mp_add_subcheck_to_check(&overall, sc_test); | 166 | mp_add_subcheck_to_check(&overall, sc_test); |
| 165 | 167 | ||
| 166 | mp_exit(overall); | 168 | mp_exit(overall); |
diff --git a/plugins/check_dbi.c b/plugins/check_dbi.c index dd466d00..9c5c8574 100644 --- a/plugins/check_dbi.c +++ b/plugins/check_dbi.c | |||
| @@ -220,6 +220,8 @@ int main(int argc, char **argv) { | |||
| 220 | 220 | ||
| 221 | mp_check overall = mp_check_init(); | 221 | mp_check overall = mp_check_init(); |
| 222 | 222 | ||
| 223 | mp_set_ok_summary(&overall, "DBI check was successful"); | ||
| 224 | |||
| 223 | mp_subcheck sc_connection_time = mp_subcheck_init(); | 225 | mp_subcheck sc_connection_time = mp_subcheck_init(); |
| 224 | sc_connection_time = mp_set_subcheck_default_state(sc_connection_time, STATE_OK); | 226 | sc_connection_time = mp_set_subcheck_default_state(sc_connection_time, STATE_OK); |
| 225 | xasprintf(&sc_connection_time.output, "Connection time: %f", conn_time); | 227 | xasprintf(&sc_connection_time.output, "Connection time: %f", conn_time); |
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index e773e56c..65169105 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
| @@ -162,6 +162,9 @@ int main(int argc, char **argv) { | |||
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | mp_check overall = mp_check_init(); | 164 | mp_check overall = mp_check_init(); |
| 165 | |||
| 166 | mp_set_ok_summary(&overall, "Filesystem checks succeeded"); | ||
| 167 | |||
| 165 | if (config.path_select_list.length == 0) { | 168 | if (config.path_select_list.length == 0) { |
| 166 | mp_subcheck none_sc = mp_subcheck_init(); | 169 | mp_subcheck none_sc = mp_subcheck_init(); |
| 167 | xasprintf(&none_sc.output, "No filesystems were found for the provided parameters"); | 170 | xasprintf(&none_sc.output, "No filesystems were found for the provided parameters"); |
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index 0e8c5804..ea4b3b1e 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c | |||
| @@ -98,6 +98,8 @@ int main(int argc, char *argv[]) { | |||
| 98 | 98 | ||
| 99 | mp_check overall = mp_check_init(); | 99 | mp_check overall = mp_check_init(); |
| 100 | 100 | ||
| 101 | mp_set_ok_summary(&overall, "LDAP check succeeded"); | ||
| 102 | |||
| 101 | LDAP *ldap_connection; | 103 | LDAP *ldap_connection; |
| 102 | /* initialize ldap */ | 104 | /* initialize ldap */ |
| 103 | { | 105 | { |
| @@ -428,7 +430,7 @@ check_ldap_config_wrapper process_arguments(int argc, char **argv) { | |||
| 428 | die(STATE_UNKNOWN, "failed to parse number of entries critical threshold"); | 430 | die(STATE_UNKNOWN, "failed to parse number of entries critical threshold"); |
| 429 | } | 431 | } |
| 430 | result.config.entries_thresholds = | 432 | result.config.entries_thresholds = |
| 431 | mp_thresholds_set_crit(result.config.entries_thresholds, tmp.range); | 433 | mp_thresholds_set_crit(result.config.entries_thresholds, tmp.range); |
| 432 | } break; | 434 | } break; |
| 433 | #ifdef HAVE_LDAP_SET_OPTION | 435 | #ifdef HAVE_LDAP_SET_OPTION |
| 434 | case '2': | 436 | case '2': |
diff --git a/plugins/check_load.c b/plugins/check_load.c index 7995408e..66d6a4b7 100644 --- a/plugins/check_load.c +++ b/plugins/check_load.c | |||
| @@ -145,6 +145,12 @@ int main(int argc, char **argv) { | |||
| 145 | mp_set_format(config.output_format); | 145 | mp_set_format(config.output_format); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | char *ok_summary = NULL; | ||
| 149 | xasprintf(&ok_summary, "Load: 1m: %f - 5m: %f - 15m: %f", load_values[0], load_values[1], | ||
| 150 | load_values[2]); | ||
| 151 | mp_set_ok_summary(&overall, ok_summary); | ||
| 152 | free(ok_summary); | ||
| 153 | |||
| 148 | bool is_using_scaled_load_values = false; | 154 | bool is_using_scaled_load_values = false; |
| 149 | long numcpus; | 155 | long numcpus; |
| 150 | if (config.take_into_account_cpus && ((numcpus = GET_NUMBER_OF_CPUS()) > 0)) { | 156 | if (config.take_into_account_cpus && ((numcpus = GET_NUMBER_OF_CPUS()) > 0)) { |
| @@ -156,6 +162,11 @@ int main(int argc, char **argv) { | |||
| 156 | load_values[2] / numcpus, | 162 | load_values[2] / numcpus, |
| 157 | }; | 163 | }; |
| 158 | 164 | ||
| 165 | xasprintf(&ok_summary, "Scaled Load (%ld CPUs): 1m: %f - 5m: %f - 15m: %f", numcpus, | ||
| 166 | load_values[0], load_values[1], load_values[2]); | ||
| 167 | mp_set_ok_summary(&overall, ok_summary); | ||
| 168 | free(ok_summary); | ||
| 169 | |||
| 159 | mp_subcheck scaled_load_sc = mp_subcheck_init(); | 170 | mp_subcheck scaled_load_sc = mp_subcheck_init(); |
| 160 | scaled_load_sc = mp_set_subcheck_default_state(scaled_load_sc, STATE_OK); | 171 | scaled_load_sc = mp_set_subcheck_default_state(scaled_load_sc, STATE_OK); |
| 161 | scaled_load_sc.output = "Scaled Load (divided by number of CPUs)"; | 172 | scaled_load_sc.output = "Scaled Load (divided by number of CPUs)"; |
| @@ -254,7 +265,7 @@ int main(int argc, char **argv) { | |||
| 254 | 265 | ||
| 255 | if (top_proc.errorcode == OK) { | 266 | if (top_proc.errorcode == OK) { |
| 256 | // +1 here since the string list contains the header line | 267 | // +1 here since the string list contains the header line |
| 257 | for (unsigned long i = 0; i < config.n_procs_to_show +1; i++) { | 268 | for (unsigned long i = 0; i < config.n_procs_to_show + 1; i++) { |
| 258 | xasprintf(&top_proc_sc.output, "%s\n%s", top_proc_sc.output, | 269 | xasprintf(&top_proc_sc.output, "%s\n%s", top_proc_sc.output, |
| 259 | top_proc.top_processes[i]); | 270 | top_proc.top_processes[i]); |
| 260 | } | 271 | } |
diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c index bb38fcc5..5c05426d 100644 --- a/plugins/check_mrtg.c +++ b/plugins/check_mrtg.c | |||
| @@ -72,6 +72,8 @@ int main(int argc, char **argv) { | |||
| 72 | 72 | ||
| 73 | mp_check overall = mp_check_init(); | 73 | mp_check overall = mp_check_init(); |
| 74 | 74 | ||
| 75 | mp_set_ok_summary(&overall, "Values in MRTG log are OK"); | ||
| 76 | |||
| 75 | /* open the MRTG log file for reading */ | 77 | /* open the MRTG log file for reading */ |
| 76 | mp_subcheck sc_open_mrtg_log_file = mp_subcheck_init(); | 78 | mp_subcheck sc_open_mrtg_log_file = mp_subcheck_init(); |
| 77 | FILE *mtrg_log_file = fopen(config.log_file, "r"); | 79 | FILE *mtrg_log_file = fopen(config.log_file, "r"); |
| @@ -436,7 +438,7 @@ void print_help(void) { | |||
| 436 | printf(" %s\n", _("you can always hack the code to make this plugin work for you...")); | 438 | printf(" %s\n", _("you can always hack the code to make this plugin work for you...")); |
| 437 | printf(" %s\n", | 439 | printf(" %s\n", |
| 438 | _("- MRTG stands for the Multi Router Traffic Grapher. It can be downloaded from")); | 440 | _("- MRTG stands for the Multi Router Traffic Grapher. It can be downloaded from")); |
| 439 | printf(" %s\n", "http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"); | 441 | printf(" %s\n", "https://oss.oetiker.ch/mrtg/"); |
| 440 | 442 | ||
| 441 | printf(UT_SUPPORT); | 443 | printf(UT_SUPPORT); |
| 442 | } | 444 | } |
diff --git a/plugins/check_mrtgtraf.c b/plugins/check_mrtgtraf.c index 46b94f57..be9f67b2 100644 --- a/plugins/check_mrtgtraf.c +++ b/plugins/check_mrtgtraf.c | |||
| @@ -70,6 +70,9 @@ int main(int argc, char **argv) { | |||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | mp_check overall = mp_check_init(); | 72 | mp_check overall = mp_check_init(); |
| 73 | |||
| 74 | mp_set_ok_summary(&overall, "Transfer rates in MRTG are OK"); | ||
| 75 | |||
| 73 | mp_subcheck sc_open_mrtg_log_file = mp_subcheck_init(); | 76 | mp_subcheck sc_open_mrtg_log_file = mp_subcheck_init(); |
| 74 | 77 | ||
| 75 | /* open the MRTG log file for reading */ | 78 | /* open the MRTG log file for reading */ |
| @@ -440,7 +443,7 @@ void print_help(void) { | |||
| 440 | printf("\n"); | 443 | printf("\n"); |
| 441 | printf("%s\n", _("Notes:")); | 444 | printf("%s\n", _("Notes:")); |
| 442 | printf(" %s\n", _("- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from")); | 445 | printf(" %s\n", _("- MRTG stands for Multi Router Traffic Grapher. It can be downloaded from")); |
| 443 | printf(" %s\n", " http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"); | 446 | printf(" %s\n", " https://oss.oetiker.ch/mrtg/"); |
| 444 | printf(" %s\n", _("- While MRTG can monitor things other than traffic rates, this")); | 447 | printf(" %s\n", _("- While MRTG can monitor things other than traffic rates, this")); |
| 445 | printf(" %s\n", _(" plugin probably won't work with much else without modification.")); | 448 | printf(" %s\n", _(" plugin probably won't work with much else without modification.")); |
| 446 | printf(" %s\n", _("- The calculated i/o rates are a little off from what MRTG actually")); | 449 | printf(" %s\n", _("- The calculated i/o rates are a little off from what MRTG actually")); |
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index b70e0e22..eee32e71 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c | |||
| @@ -121,6 +121,8 @@ int main(int argc, char **argv) { | |||
| 121 | 121 | ||
| 122 | mp_check overall = mp_check_init(); | 122 | mp_check overall = mp_check_init(); |
| 123 | 123 | ||
| 124 | mp_set_ok_summary(&overall, "Mariadb/MySQL seems to be ok"); | ||
| 125 | |||
| 124 | mp_subcheck sc_connection = mp_subcheck_init(); | 126 | mp_subcheck sc_connection = mp_subcheck_init(); |
| 125 | /* establish a connection to the server and check for errors */ | 127 | /* establish a connection to the server and check for errors */ |
| 126 | if (!mysql_real_connect(&mysql, config.db_host, config.db_user, config.db_pass, config.db, | 128 | if (!mysql_real_connect(&mysql, config.db_host, config.db_user, config.db_pass, config.db, |
diff --git a/plugins/check_mysql_query.c b/plugins/check_mysql_query.c index fc0966d3..ff86e219 100644 --- a/plugins/check_mysql_query.c +++ b/plugins/check_mysql_query.c | |||
| @@ -92,6 +92,9 @@ int main(int argc, char **argv) { | |||
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | mp_check overall = mp_check_init(); | 94 | mp_check overall = mp_check_init(); |
| 95 | |||
| 96 | mp_set_ok_summary(&overall, "MySQL query is OK"); | ||
| 97 | |||
| 95 | mp_subcheck sc_connect = mp_subcheck_init(); | 98 | mp_subcheck sc_connect = mp_subcheck_init(); |
| 96 | 99 | ||
| 97 | /* establish a connection to the server and error checking */ | 100 | /* establish a connection to the server and error checking */ |
diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c index b5cfb460..34686cb9 100644 --- a/plugins/check_ntp_peer.c +++ b/plugins/check_ntp_peer.c | |||
| @@ -708,6 +708,8 @@ int main(int argc, char *argv[]) { | |||
| 708 | const ntp_request_result ntp_res = ntp_request(config); | 708 | const ntp_request_result ntp_res = ntp_request(config); |
| 709 | mp_check overall = mp_check_init(); | 709 | mp_check overall = mp_check_init(); |
| 710 | 710 | ||
| 711 | mp_set_ok_summary(&overall, "NTP Server seems to be OK"); | ||
| 712 | |||
| 711 | mp_subcheck sc_offset = mp_subcheck_init(); | 713 | mp_subcheck sc_offset = mp_subcheck_init(); |
| 712 | xasprintf(&sc_offset.output, "offset"); | 714 | xasprintf(&sc_offset.output, "offset"); |
| 713 | if (ntp_res.offset_result == STATE_UNKNOWN) { | 715 | if (ntp_res.offset_result == STATE_UNKNOWN) { |
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c index 4e3a55db..3e23d0bf 100644 --- a/plugins/check_ntp_time.c +++ b/plugins/check_ntp_time.c | |||
| @@ -696,6 +696,8 @@ int main(int argc, char *argv[]) { | |||
| 696 | 696 | ||
| 697 | mp_check overall = mp_check_init(); | 697 | mp_check overall = mp_check_init(); |
| 698 | 698 | ||
| 699 | mp_set_ok_summary(&overall, "NTP time synchronisation seems to be working"); | ||
| 700 | |||
| 699 | mp_subcheck sc_offset = mp_subcheck_init(); | 701 | mp_subcheck sc_offset = mp_subcheck_init(); |
| 700 | offset_request_wrapper offset_result = | 702 | offset_request_wrapper offset_result = |
| 701 | offset_request(config.server_address, config.port, config.time_offset); | 703 | offset_request(config.server_address, config.port, config.time_offset); |
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index 8cbaaeeb..9e6b0f41 100644 --- a/plugins/check_pgsql.c +++ b/plugins/check_pgsql.c | |||
| @@ -214,6 +214,8 @@ int main(int argc, char **argv) { | |||
| 214 | 214 | ||
| 215 | mp_check overall = mp_check_init(); | 215 | mp_check overall = mp_check_init(); |
| 216 | 216 | ||
| 217 | mp_set_ok_summary(&overall, "Postgres check is OK"); | ||
| 218 | |||
| 217 | mp_subcheck sc_connection = mp_subcheck_init(); | 219 | mp_subcheck sc_connection = mp_subcheck_init(); |
| 218 | 220 | ||
| 219 | if (PQstatus(conn) == CONNECTION_BAD) { | 221 | if (PQstatus(conn) == CONNECTION_BAD) { |
diff --git a/plugins/check_radius.c b/plugins/check_radius.c index 03153926..9f9af3cc 100644 --- a/plugins/check_radius.c +++ b/plugins/check_radius.c | |||
| @@ -171,6 +171,9 @@ int main(int argc, char **argv) { | |||
| 171 | #endif | 171 | #endif |
| 172 | 172 | ||
| 173 | mp_check overall = mp_check_init(); | 173 | mp_check overall = mp_check_init(); |
| 174 | |||
| 175 | mp_set_ok_summary(&overall, "Radius check is OK"); | ||
| 176 | |||
| 174 | mp_subcheck sc_read_config = mp_subcheck_init(); | 177 | mp_subcheck sc_read_config = mp_subcheck_init(); |
| 175 | 178 | ||
| 176 | char *str = strdup("dictionary"); | 179 | char *str = strdup("dictionary"); |
diff --git a/plugins/check_real.c b/plugins/check_real.c index b415578f..0dd649e1 100644 --- a/plugins/check_real.c +++ b/plugins/check_real.c | |||
| @@ -83,6 +83,9 @@ int main(int argc, char **argv) { | |||
| 83 | time(&start_time); | 83 | time(&start_time); |
| 84 | 84 | ||
| 85 | mp_check overall = mp_check_init(); | 85 | mp_check overall = mp_check_init(); |
| 86 | |||
| 87 | mp_set_ok_summary(&overall, "REAL check is OK"); | ||
| 88 | |||
| 86 | mp_subcheck sc_connect = mp_subcheck_init(); | 89 | mp_subcheck sc_connect = mp_subcheck_init(); |
| 87 | 90 | ||
| 88 | /* try to connect to the host at the given port number */ | 91 | /* try to connect to the host at the given port number */ |
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index 19e2a58f..e1f2842e 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c | |||
| @@ -187,6 +187,9 @@ int main(int argc, char **argv) { | |||
| 187 | my_tcp_connect(config.server_address, config.server_port, &socket_descriptor); | 187 | my_tcp_connect(config.server_address, config.server_port, &socket_descriptor); |
| 188 | 188 | ||
| 189 | mp_check overall = mp_check_init(); | 189 | mp_check overall = mp_check_init(); |
| 190 | |||
| 191 | mp_set_ok_summary(&overall, "SMTP connection check is OK"); | ||
| 192 | |||
| 190 | mp_subcheck sc_tcp_connect = mp_subcheck_init(); | 193 | mp_subcheck sc_tcp_connect = mp_subcheck_init(); |
| 191 | char buffer[MAX_INPUT_BUFFER]; | 194 | char buffer[MAX_INPUT_BUFFER]; |
| 192 | bool ssl_established = false; | 195 | bool ssl_established = false; |
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index 09196dc4..b595066a 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c | |||
| @@ -295,6 +295,8 @@ int main(int argc, char **argv) { | |||
| 295 | 295 | ||
| 296 | mp_check overall = mp_check_init(); | 296 | mp_check overall = mp_check_init(); |
| 297 | 297 | ||
| 298 | mp_set_ok_summary(&overall, "SNMP query is OK"); | ||
| 299 | |||
| 298 | if (response.errorcode == OK) { | 300 | if (response.errorcode == OK) { |
| 299 | mp_subcheck sc_successfull_query = mp_subcheck_init(); | 301 | mp_subcheck sc_successfull_query = mp_subcheck_init(); |
| 300 | xasprintf(&sc_successfull_query.output, "SNMP query was successful"); | 302 | xasprintf(&sc_successfull_query.output, "SNMP query was successful"); |
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index 911f6787..df85b815 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c | |||
| @@ -93,6 +93,8 @@ int main(int argc, char **argv) { | |||
| 93 | mp_set_format(config.output_format); | 93 | mp_set_format(config.output_format); |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | mp_set_ok_summary(&overall, "SSH check was successful"); | ||
| 97 | |||
| 96 | /* initialize alarm signal handling */ | 98 | /* initialize alarm signal handling */ |
| 97 | signal(SIGALRM, socket_timeout_alarm_handler); | 99 | signal(SIGALRM, socket_timeout_alarm_handler); |
| 98 | alarm(socket_timeout); | 100 | alarm(socket_timeout); |
diff --git a/plugins/check_swap.c b/plugins/check_swap.c index dbf53a00..3d7e3260 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c | |||
| @@ -100,6 +100,9 @@ int main(int argc, char **argv) { | |||
| 100 | 100 | ||
| 101 | double percent_used; | 101 | double percent_used; |
| 102 | mp_check overall = mp_check_init(); | 102 | mp_check overall = mp_check_init(); |
| 103 | |||
| 104 | mp_set_ok_summary(&overall, "Swap check is OK"); | ||
| 105 | |||
| 103 | if (config.output_format_is_set) { | 106 | if (config.output_format_is_set) { |
| 104 | mp_set_format(config.output_format); | 107 | mp_set_format(config.output_format); |
| 105 | } | 108 | } |
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 924322e4..8f1044ea 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
| @@ -249,6 +249,8 @@ int main(int argc, char **argv) { | |||
| 249 | mp_set_format(config.output_format); | 249 | mp_set_format(config.output_format); |
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | mp_set_ok_summary(&overall, "Connection succeeded"); | ||
| 253 | |||
| 252 | /* set up the timer */ | 254 | /* set up the timer */ |
| 253 | signal(SIGALRM, socket_timeout_alarm_handler); | 255 | signal(SIGALRM, socket_timeout_alarm_handler); |
| 254 | alarm(socket_timeout); | 256 | alarm(socket_timeout); |
diff --git a/plugins/check_ups.c b/plugins/check_ups.c index ac6bf574..7bced308 100644 --- a/plugins/check_ups.c +++ b/plugins/check_ups.c | |||
| @@ -91,6 +91,8 @@ int main(int argc, char **argv) { | |||
| 91 | 91 | ||
| 92 | mp_check overall = mp_check_init(); | 92 | mp_check overall = mp_check_init(); |
| 93 | 93 | ||
| 94 | mp_set_ok_summary(&overall, "UPS check is OK"); | ||
| 95 | |||
| 94 | mp_subcheck sc_retrieve_status = mp_subcheck_init(); | 96 | mp_subcheck sc_retrieve_status = mp_subcheck_init(); |
| 95 | 97 | ||
| 96 | /* get the ups status if possible */ | 98 | /* get the ups status if possible */ |
diff --git a/plugins/check_users.c b/plugins/check_users.c index 4027d21a..8e0e2c35 100644 --- a/plugins/check_users.c +++ b/plugins/check_users.c | |||
| @@ -111,8 +111,13 @@ int main(int argc, char **argv) { | |||
| 111 | mp_add_subcheck_to_check(&overall, sc_users); | 111 | mp_add_subcheck_to_check(&overall, sc_users); |
| 112 | mp_exit(overall); | 112 | mp_exit(overall); |
| 113 | } | 113 | } |
| 114 | /* check the user count against warning and critical thresholds */ | ||
| 115 | 114 | ||
| 115 | char *ok_summary = NULL; | ||
| 116 | xasprintf(&ok_summary, "Users on the system: %d", user_wrapper.users); | ||
| 117 | mp_set_ok_summary(&overall, ok_summary); | ||
| 118 | free(ok_summary); | ||
| 119 | |||
| 120 | /* check the user count against warning and critical thresholds */ | ||
| 116 | mp_perfdata users_pd = { | 121 | mp_perfdata users_pd = { |
| 117 | .label = "users", | 122 | .label = "users", |
| 118 | .value = mp_create_pd_value(user_wrapper.users), | 123 | .value = mp_create_pd_value(user_wrapper.users), |
