From f5c9d6721f082e2fdb43b4bd3c452dfa66154794 Mon Sep 17 00:00:00 2001 From: thiagoftsm Date: Sun, 18 Jul 2021 18:36:46 +0000 Subject: eBPF ZFS monitoring (#11330) Add new filesystem monitoring to Netdata. --- collectors/ebpf.plugin/README.md | 1 + collectors/ebpf.plugin/ebpf.d/filesystem.conf | 1 + collectors/ebpf.plugin/ebpf_filesystem.c | 8 ++++++++ packaging/ebpf.checksums | 6 +++--- packaging/ebpf.version | 2 +- web/gui/dashboard_info.js | 17 +++++++++++++++++ 6 files changed, 31 insertions(+), 4 deletions(-) diff --git a/collectors/ebpf.plugin/README.md b/collectors/ebpf.plugin/README.md index 1c8037476d..76b962fdf2 100644 --- a/collectors/ebpf.plugin/README.md +++ b/collectors/ebpf.plugin/README.md @@ -329,6 +329,7 @@ filesystems are monitored. ext4dist = yes nfsdist = yes xfsdist = yes + zfsdist = yes ``` The ebpf program `nfsdist` monitors only `nfs` mount points. diff --git a/collectors/ebpf.plugin/ebpf.d/filesystem.conf b/collectors/ebpf.plugin/ebpf.d/filesystem.conf index b6038e0d55..d116a97a5c 100644 --- a/collectors/ebpf.plugin/ebpf.d/filesystem.conf +++ b/collectors/ebpf.plugin/ebpf.d/filesystem.conf @@ -16,3 +16,4 @@ ext4dist = yes nfsdist = yes xfsdist = yes + zfsdist = yes diff --git a/collectors/ebpf.plugin/ebpf_filesystem.c b/collectors/ebpf.plugin/ebpf_filesystem.c index 7d81a6ec91..8af0e1013d 100644 --- a/collectors/ebpf.plugin/ebpf_filesystem.c +++ b/collectors/ebpf.plugin/ebpf_filesystem.c @@ -33,6 +33,14 @@ ebpf_filesystem_partitions_t localfs[] = .flags = NETDATA_FILESYSTEM_ATTR_CHARTS, .enabled = CONFIG_BOOLEAN_YES, .addresses = {.function = NULL, .addr = 0}}, + {.filesystem = "zfs", + .optional_filesystem = NULL, + .family = "ZFS", + .objects = NULL, + .probe_links = NULL, + .flags = NETDATA_FILESYSTEM_FLAG_NO_PARTITION, + .enabled = CONFIG_BOOLEAN_YES, + .addresses = {.function = NULL, .addr = 0}}, {.filesystem = NULL, .optional_filesystem = NULL, .family = NULL, diff --git a/packaging/ebpf.checksums b/packaging/ebpf.checksums index 4463ecc543..4d25fd39ef 100644 --- a/packaging/ebpf.checksums +++ b/packaging/ebpf.checksums @@ -1,3 +1,3 @@ -131825cfef1880b7264d8fde815026fc9326b8e1dffb515d2ac3f8e3eef9af29 netdata-kernel-collector-glibc-v0.7.3.tar.xz -09d70c4000897c1ec99d41841abddf613f20c39b6e822efc838ffef3c56dda8b netdata-kernel-collector-musl-v0.7.3.tar.xz -b80dfe18288103c01d5222cf122ac81d1f5a8f60f8b3f61fc86c18d7176d5f61 netdata-kernel-collector-static-v0.7.3.tar.xz +d450f288dcbbc29e75ff8b6c300d4a08d7a270c44221772e2710058159bdf87a netdata-kernel-collector-glibc-v0.7.4.tar.xz +e505c80e7e5a5d37814bd477904f2adbd188860ce8897dba214b7f250095dc1b netdata-kernel-collector-musl-v0.7.4.tar.xz +af1a5d56cca6a88f23acfb6ee66feb8ac895dc1920c746696256fbde432a26cd netdata-kernel-collector-static-v0.7.4.tar.xz diff --git a/packaging/ebpf.version b/packaging/ebpf.version index 3d105a6fd8..520c9c28b7 100644 --- a/packaging/ebpf.version +++ b/packaging/ebpf.version @@ -1 +1 @@ -v0.7.3 +v0.7.4 diff --git a/web/gui/dashboard_info.js b/web/gui/dashboard_info.js index 841aca364f..4deb51f5ab 100644 --- a/web/gui/dashboard_info.js +++ b/web/gui/dashboard_info.js @@ -3531,6 +3531,23 @@ netdataDashboard.context = { info: 'Latency is the time it takes for an event to be completed. Netdata is attaching a kprobe for when the function nfs_getattr is called and another for when it finishes the execution. We calculate the difference between the calling and return times, we get the logarithmic for the final result and we sum one value to the respective bin. Based on the eBPF nfsdist from BCC tools.' }, + 'filesystem.zfs_read_latency': { + info: 'Latency is the time it takes for an event to be completed. Netdata is attaching a kprobe for when the function zpl_iter_read is called and another for when it finishes the execution. We calculate the difference between the calling and return times, we get the logarithmic for the final result and we sum one value to the respective bin. Based on the eBPF zfsdist from BCC tools.' + }, + + 'filesystem.zfs_write_latency': { + info: 'Latency is the time it takes for an event to be completed. Netdata is attaching a kprobe for when the function zpl_iter_write is called and another for when it finishes the execution. We calculate the difference between the calling and return times, we get the logarithmic for the final result and we sum one value to the respective bin. Based on the eBPF zfsdist from BCC tools.' + }, + + 'filesystem.zfs_open_latency': { + info: 'Latency is the time it takes for an event to be completed. Netdata is attaching a kprobe for when the function zpl_open is called and another for when it finishes the execution. We calculate the difference between the calling and return times, we get the logarithmic for the final result and we sum one value to the respective bin. Based on the eBPF zfsdist from BCC tools.' + }, + + 'filesystem.zfs_sync_latency': { + info: 'Latency is the time it takes for an event to be completed. Netdata is attaching a kprobe for when the function zpl_fsync is called and another for when it finishes the execution. We calculate the difference between the calling and return times, we get the logarithmic for the final result and we sum one value to the respective bin. Based on the eBPF zfsdist from BCC tools.' + }, + + // ------------------------------------------------------------------------ // eBPF -- cgit v1.2.3