diff options
Diffstat (limited to 'src/libs/zbxsysinfo/common')
-rw-r--r-- | src/libs/zbxsysinfo/common/Makefile.am | 12 | ||||
-rw-r--r-- | src/libs/zbxsysinfo/common/common.c | 5 | ||||
-rw-r--r-- | src/libs/zbxsysinfo/common/http_metrics.c | 30 | ||||
-rw-r--r-- | src/libs/zbxsysinfo/common/http_metrics.h | 27 |
4 files changed, 66 insertions, 8 deletions
diff --git a/src/libs/zbxsysinfo/common/Makefile.am b/src/libs/zbxsysinfo/common/Makefile.am index c63ec6be318..d6326a28ab2 100644 --- a/src/libs/zbxsysinfo/common/Makefile.am +++ b/src/libs/zbxsysinfo/common/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -noinst_LIBRARIES = libcommonsysinfo.a +noinst_LIBRARIES = libcommonsysinfo.a libcommonsysinfo_http.a libcommonsysinfo_httpmetrics.a libcommonsysinfo_a_CFLAGS = -I@top_srcdir@/src/zabbix_agent/ @@ -15,11 +15,17 @@ libcommonsysinfo_a_SOURCES = \ dns.h \ file.c \ file.h \ - http.c \ - http.h \ net.c \ net.h \ system.c \ system.h \ zabbix_stats.c \ zabbix_stats.h + +libcommonsysinfo_http_a_SOURCES = \ + http.c \ + http.h + +libcommonsysinfo_httpmetrics_a_SOURCES = \ + http_metrics.c \ + http_metrics.h diff --git a/src/libs/zbxsysinfo/common/common.c b/src/libs/zbxsysinfo/common/common.c index 9fa1705fe30..89016fbafcf 100644 --- a/src/libs/zbxsysinfo/common/common.c +++ b/src/libs/zbxsysinfo/common/common.c @@ -24,7 +24,6 @@ #include "file.h" #include "dir.h" -#include "http.h" #include "net.h" #include "dns.h" #include "system.h" @@ -60,10 +59,6 @@ ZBX_METRIC parameters_common[] = {"system.localtime", CF_HAVEPARAMS, SYSTEM_LOCALTIME, "utc"}, {"system.run", CF_HAVEPARAMS, SYSTEM_RUN, "echo test"}, - {"web.page.get", CF_HAVEPARAMS, WEB_PAGE_GET, "localhost,,80"}, - {"web.page.perf", CF_HAVEPARAMS, WEB_PAGE_PERF, "localhost,,80"}, - {"web.page.regexp", CF_HAVEPARAMS, WEB_PAGE_REGEXP, "localhost,,80,OK"}, - {"vfs.file.size", CF_HAVEPARAMS, VFS_FILE_SIZE, VFS_TEST_FILE}, {"vfs.file.time", CF_HAVEPARAMS, VFS_FILE_TIME, VFS_TEST_FILE ",modify"}, {"vfs.file.exists", CF_HAVEPARAMS, VFS_FILE_EXISTS, VFS_TEST_FILE}, diff --git a/src/libs/zbxsysinfo/common/http_metrics.c b/src/libs/zbxsysinfo/common/http_metrics.c new file mode 100644 index 00000000000..5d41a0f3d14 --- /dev/null +++ b/src/libs/zbxsysinfo/common/http_metrics.c @@ -0,0 +1,30 @@ +/* +** 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. +**/ + +#include "http.h" + +ZBX_METRIC parameters_common_http[] = +/* KEY FLAG FUNCTION TEST PARAMETERS */ +{ + {"web.page.get", CF_HAVEPARAMS, WEB_PAGE_GET, "localhost,,80"}, + {"web.page.perf", CF_HAVEPARAMS, WEB_PAGE_PERF, "localhost,,80"}, + {"web.page.regexp", CF_HAVEPARAMS, WEB_PAGE_REGEXP, "localhost,,80,OK"}, + + {NULL} +}; diff --git a/src/libs/zbxsysinfo/common/http_metrics.h b/src/libs/zbxsysinfo/common/http_metrics.h new file mode 100644 index 00000000000..8799a0d455c --- /dev/null +++ b/src/libs/zbxsysinfo/common/http_metrics.h @@ -0,0 +1,27 @@ +/* +** 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. +**/ + +#include "sysinfo.h" + +#ifndef ZABBIX_SYSINFO_COMMON_HTTP_METRICS_H +#define ZABBIX_SYSINFO_COMMON_HTTP_METRICS_H + +extern ZBX_METRIC parameters_common_http[]; + +#endif /* ZABBIX_SYSINFO_COMMON_HTTP_METRICS_H */ |