Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrejs Kozlovs <andrejs.kozlovs@zabbix.com>2020-01-14 13:40:54 +0300
committerAndrejs Kozlovs <andrejs.kozlovs@zabbix.com>2020-01-14 13:43:32 +0300
commitdcf5a71d813bb1ead9281ebf154cc4a635549d02 (patch)
treea748dfc53f115b06fbfbd9d85353014fca7d3a38 /include/sysinfo.h
parent45c02cf7a5e161892a50d5feae3651277094b8ee (diff)
...G...... [ZBXNEXT-5490] added new key vfs.fs.get to collect mounted filesystems information and relevant metrics into json
* commit '198759126b9fc1dbeade12c70590bbf81f460d9a': .D........ [ZBXNEXT-5490] added ChangeLog ...G...... [ZBXNEXT-5490] fixed memory leak in Windows ...G...... [ZBXNEXT-5490] remove extra line ...G...... [ZBXNEXT-5490] some corrections of new code ...G...... [ZBXNEXT-5490] refactored windows vfs.fs.discovery, vfs.fs.get keys ...G...... [ZBXNEXT-5490] edit comment ...G...... [ZBXNEXT-5490] Code review rework .......... [ZBXNEXT-5490] fixed coding style .......... [ZBXNEXT-5490] fixed coding style ...G...... [ZBXNEXT-5490] make json keys constant ...G...... [ZBXNEXT-5490] Windows fixes ...G...... [ZBXNEXT-5490] preliminary commit (cherry picked from commit d8d57045d9e3cd1dad13810d08b17ecb93e6c38e)
Diffstat (limited to 'include/sysinfo.h')
-rw-r--r--include/sysinfo.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/sysinfo.h b/include/sysinfo.h
index 32128c331fd..9d8fc404fbd 100644
--- a/include/sysinfo.h
+++ b/include/sysinfo.h
@@ -281,6 +281,7 @@ int VFS_DEV_DISCOVERY(AGENT_REQUEST *request, AGENT_RESULT *result);
int VFS_FS_INODE(AGENT_REQUEST *request, AGENT_RESULT *result);
int VFS_FS_SIZE(AGENT_REQUEST *request, AGENT_RESULT *result);
int VFS_FS_DISCOVERY(AGENT_REQUEST *request, AGENT_RESULT *result);
+int VFS_FS_GET(AGENT_REQUEST *request, AGENT_RESULT *result);
int VM_MEMORY_SIZE(AGENT_REQUEST *request, AGENT_RESULT *result);
#if defined(_WINDOWS) || defined(__MINGW32__)
@@ -315,7 +316,33 @@ typedef struct
}
MODE_FUNCTION;
+typedef struct
+{
+ char fsname[MAX_STRING_LEN];
+ char fstype[MAX_STRING_LEN];
+ zbx_uint64_t total;
+ zbx_uint64_t not_used;
+ zbx_uint64_t used;
+ double pfree;
+ double pused;
+}
+zbx_mpoint_t;
+
+#define ZBX_LLD_MACRO_FSNAME "{#FSNAME}"
+#define ZBX_LLD_MACRO_FSTYPE "{#FSTYPE}"
+#define ZBX_LLD_MACRO_FSDRIVETYPE "{#FSDRIVETYPE}"
+
+#define ZBX_SYSINFO_TAG_FSNAME "fsname"
+#define ZBX_SYSINFO_TAG_FSTYPE "fstype"
+#define ZBX_SYSINFO_TAG_FSDRIVETYPE "fsdrivetype"
+#define ZBX_SYSINFO_TAG_TOTAL "total"
+#define ZBX_SYSINFO_TAG_FREE "free"
+#define ZBX_SYSINFO_TAG_USED "used"
+#define ZBX_SYSINFO_TAG_PFREE "pfree"
+#define ZBX_SYSINFO_TAG_PUSED "pused"
+
int zbx_execute_threaded_metric(zbx_metric_func_t metric_func, AGENT_REQUEST *request, AGENT_RESULT *result);
+void zbx_mpoints_free(zbx_mpoint_t *mpoint);
/* the fields used by proc queries */
#define ZBX_SYSINFO_PROC_NONE 0x0000