summaryrefslogtreecommitdiffstats
path: root/plugins/check_users.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2026-06-08 08:23:44 +0200
committerGitHub <noreply@github.com>2026-06-08 08:23:44 +0200
commit9bbc76483888c9e2ef2f4ed281c0ab8f2aab7bb6 (patch)
treec9f72dda47e082e9e2ce74377035b48c77415064 /plugins/check_users.c
parent992a4555ac975285f959dd2d3228b1d71ab23123 (diff)
downloadmonitoring-plugins-9bbc76483888c9e2ef2f4ed281c0ab8f2aab7bb6.tar.gz
Ok summary (#2270)
* lib: implement functionality to set ok summary * check_load: implement setting ok summary * OK summary for ntp_peer, ntp_time and users * check_apt: implement ok summary * check_curl: implement ok summary * check_disk: implement ok summary * check_dbi: implement ok summary * check_ldap: auto formatting * check_ldap: implement ok summary * check_ssh: implement ok summary * check_tcp: implement ok summary * fixup! check_curl: implement ok summary * fixup! check_dbi: implement ok summary * fixup! check_ldap: implement ok summary * fixup! check_ssh: implement ok summary * fixup! check_tcp: implement ok summary * check_apt: remove illegal free * check_mrtg: fix link * check_mrtg: implement ok summary * check_mrtgtraf: fix link * check_mrtgtraf: implement ok summary * check_mysql: implement ok summary * check_mysql_query: implement ok summary * check_pgsql: implement ok summary * check_radius: implement ok summary * check_real: implement ok summary * check_smtp: implement ok summary * check_snmp: implement ok summary * check_swap: implement ok summary * check_ups: add OK summary --------- Co-authored-by: Lorenz Kästle <lorenz.kaestle@netways.de>
Diffstat (limited to 'plugins/check_users.c')
-rw-r--r--plugins/check_users.c7
1 files changed, 6 insertions, 1 deletions
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),