-
Notifications
You must be signed in to change notification settings - Fork 931
/
globals_linux.go
127 lines (109 loc) · 4.15 KB
/
globals_linux.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/*
** Zabbix
** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
package zbxlib
/* cspell:disable */
/*
#cgo LDFLAGS: -Wl,--start-group
#cgo LDFLAGS: ${SRCDIR}/../../../zabbix_agent/logfiles/libzbxlogfiles.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxcomms/libzbxcomms.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxcommon/libzbxcommon.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxcrypto/libzbxcrypto.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxsys/libzbxsys.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxnix/libzbxnix.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxconf/libzbxconf.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxhttp/libzbxhttp.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxcompress/libzbxcompress.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxregexp/libzbxregexp.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxsysinfo/libzbxagentsysinfo.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxsysinfo/common/libcommonsysinfo.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxsysinfo/simple/libsimplesysinfo.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxsysinfo/linux/libspechostnamesysinfo.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxsysinfo/linux/libspecsysinfo.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxexec/libzbxexec.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxalgo/libzbxalgo.a
#cgo LDFLAGS: ${SRCDIR}/../../../libs/zbxjson/libzbxjson.a
#cgo LDFLAGS: -lz -lpcre -lresolv
#cgo LDFLAGS: -Wl,--end-group
#include "common.h"
#include "sysinfo.h"
#include "comms.h"
#include "log.h"
#include "../src/zabbix_agent/metrics.h"
#include "../src/zabbix_agent/logfiles/logfiles.h"
typedef ZBX_ACTIVE_METRIC* ZBX_ACTIVE_METRIC_LP;
typedef zbx_vector_ptr_t * zbx_vector_ptr_lp_t;
int CONFIG_MAX_LINES_PER_SECOND = 20;
char ZBX_THREAD_LOCAL *CONFIG_HOSTNAME = NULL;
int CONFIG_UNSAFE_USER_PARAMETERS= 0;
int CONFIG_ENABLE_REMOTE_COMMANDS= 0;
int CONFIG_LOG_REMOTE_COMMANDS= 0;
char *CONFIG_SOURCE_IP= NULL;
unsigned int configured_tls_connect_mode = ZBX_TCP_SEC_UNENCRYPTED;
unsigned int configured_tls_accept_modes = ZBX_TCP_SEC_UNENCRYPTED;
char *CONFIG_TLS_CONNECT= NULL;
char *CONFIG_TLS_ACCEPT = NULL;
char *CONFIG_TLS_CA_FILE = NULL;
char *CONFIG_TLS_CRL_FILE = NULL;
char *CONFIG_TLS_SERVER_CERT_ISSUER = NULL;
char *CONFIG_TLS_SERVER_CERT_SUBJECT = NULL;
char *CONFIG_TLS_CERT_FILE = NULL;
char *CONFIG_TLS_KEY_FILE = NULL;
char *CONFIG_TLS_PSK_IDENTITY = NULL;
char *CONFIG_TLS_PSK_FILE = NULL;
char *CONFIG_TLS_CIPHER_CERT13 = NULL;
char *CONFIG_TLS_CIPHER_CERT = NULL;
char *CONFIG_TLS_CIPHER_PSK13 = NULL;
char *CONFIG_TLS_CIPHER_PSK = NULL;
char *CONFIG_TLS_CIPHER_ALL13 = NULL;
char *CONFIG_TLS_CIPHER_ALL = NULL;
char *CONFIG_TLS_CIPHER_CMD13 = NULL;
char *CONFIG_TLS_CIPHER_CMD = NULL;
int CONFIG_PASSIVE_FORKS = 0;
int CONFIG_ACTIVE_FORKS = 0;
int CONFIG_TCP_MAX_BACKLOG_SIZE = SOMAXCONN;
const char *progname = NULL;
const char title_message[] = "agent";
const char syslog_app_name[] = "agent";
const char *usage_message[] = {};
unsigned char program_type = 0x80;
const char *help_message[] = {};
ZBX_METRIC parameters_agent[] = {NULL};
ZBX_METRIC parameters_specific[] = {NULL};
void zbx_on_exit(int ret)
{
}
int zbx_procstat_collector_started(void)
{
return FAIL;
}
int zbx_procstat_get_util(const char *procname, const char *username, const char *cmdline, zbx_uint64_t flags,
int period, int type, double *value, char **errmsg)
{
return FAIL;
}
int get_cpustat(AGENT_RESULT *result, int cpu_num, int state, int mode)
{
return SYSINFO_RET_FAIL;
}
char *strerror_from_system(unsigned long error)
{
return zbx_strerror(errno);
}
*/
import "C"