summaryrefslogtreecommitdiffstats
path: root/plugins/check_by_ssh.d
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-03-13 00:48:00 +0100
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-03-13 00:48:00 +0100
commit54a099ed6d4ae57835095083aa825462eb03f369 (patch)
treecf7af5c49f0c8ebc5574b0efc1af3871f1717357 /plugins/check_by_ssh.d
parent89df16e7503539c2b0da7e95375b470559bb94ec (diff)
parent02acc76edc5c646af90a6168df61c711aa3d11d6 (diff)
downloadmonitoring-plugins-54a099ed6d4ae57835095083aa825462eb03f369.tar.gz
Merge branch 'master' into refactor/check_tcp
Diffstat (limited to 'plugins/check_by_ssh.d')
-rw-r--r--plugins/check_by_ssh.d/config.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/plugins/check_by_ssh.d/config.h b/plugins/check_by_ssh.d/config.h
new file mode 100644
index 00000000..05435def
--- /dev/null
+++ b/plugins/check_by_ssh.d/config.h
@@ -0,0 +1,56 @@
1#pragma once
2
3#include "../../config.h"
4#include <stddef.h>
5
6typedef struct {
7 int commargc;
8 char **commargv;
9} command_construct;
10
11typedef struct {
12 char *hostname;
13 char *host_shortname;
14
15 char **service;
16 unsigned int number_of_services;
17
18 unsigned int commands; // Not needed during actual test run
19 char *remotecmd;
20
21 command_construct cmd;
22
23 bool unknown_timeout;
24 bool warn_on_stderr;
25 int skip_stdout;
26 int skip_stderr;
27 bool passive;
28 char *outputfile;
29} check_by_ssh_config;
30
31check_by_ssh_config check_by_ssh_config_init() {
32 check_by_ssh_config tmp = {
33 .hostname = NULL,
34 .host_shortname = NULL,
35
36 .service = NULL,
37 .number_of_services = 0,
38
39 .commands = 0,
40 .remotecmd = "",
41
42 .cmd =
43 {
44 .commargc = 0,
45 .commargv = NULL,
46 },
47
48 .unknown_timeout = false,
49 .warn_on_stderr = false,
50 .skip_stderr = 0,
51 .skip_stdout = 0,
52 .passive = false,
53 .outputfile = NULL,
54 };
55 return tmp;
56}