diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-12 22:01:46 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-12 22:01:46 +0100 |
| commit | 6ac236c1ef06ef17541d3919aed2a008aabaa7f4 (patch) | |
| tree | c34e7cedcd3a4540b4de0e40df5f6ba104a45f7f /plugins/check_users.d/users.h | |
| parent | 39b9b62adda3887e7706754d4e34a7eff2f793b5 (diff) | |
| download | monitoring-plugins-6ac236c1ef06ef17541d3919aed2a008aabaa7f4.tar.gz | |
Refactor check_users
Diffstat (limited to 'plugins/check_users.d/users.h')
| -rw-r--r-- | plugins/check_users.d/users.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/check_users.d/users.h b/plugins/check_users.d/users.h new file mode 100644 index 00000000..aacba775 --- /dev/null +++ b/plugins/check_users.d/users.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | typedef struct get_num_of_users_wrapper { | ||
| 4 | int errorcode; | ||
| 5 | int users; | ||
| 6 | } get_num_of_users_wrapper; | ||
| 7 | |||
| 8 | enum { | ||
| 9 | NO_SYSTEMD_ERROR = 64, | ||
| 10 | WINDOWS_COULD_NOT_ENUMERATE_SESSIONS, | ||
| 11 | COULD_NOT_OPEN_PIPE, | ||
| 12 | STDERR_COULD_NOT_BE_READ, | ||
| 13 | }; | ||
| 14 | |||
| 15 | get_num_of_users_wrapper get_num_of_users_systemd(); | ||
| 16 | get_num_of_users_wrapper get_num_of_users_utmp(); | ||
| 17 | get_num_of_users_wrapper get_num_of_users_windows(); | ||
| 18 | get_num_of_users_wrapper get_num_of_users_who_command(); | ||
