From eb18a4594a81600122ab1d6e068c5ad4db7f65b9 Mon Sep 17 00:00:00 2001 From: Kevin222004 Date: Wed, 26 Jun 2024 20:07:26 +0530 Subject: [PATCH] feat: enhance the demo with disk telemetries Signed-off-by: Kevin222004 --- .github/workflows/docker-publish.yml | 1 + README.md | 3 ++- config/telegraf.conf | 3 +++ docker-compose.yml | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 416dfa7..5c2a200 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -48,6 +48,7 @@ jobs: curl --fail http://127.0.0.1:9091/api/v1/query?query=net_bytes_recv_total | grep net_bytes_recv_total curl --fail http://127.0.0.1:9091/api/v1/query?query=nginx_requests | grep nginx_requests curl --fail http://127.0.0.1:9091/api/v1/query?query=redfish_thermal_fans_reading_rpm | grep redfish_thermal_fans_reading_rpm + curl --fail http://127.0.0.1:9091/api/v1/query?query=disk_used_percent | grep disk_used_percent - name: Logs if: always() diff --git a/README.md b/README.md index 18b0402..0dc6bc2 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ curl -k --user spdkuser:spdkpass -X POST -H "Content-Type: application/json" -d - For example - TODO: need more details and examples -## Qery examples +## Query examples ```text curl --fail http://127.0.0.1:9091/api/v1/query?query=mem_free | grep mem_free @@ -114,6 +114,7 @@ curl --fail http://127.0.0.1:9091/api/v1/query?query=dpu_num_blocks | grep dpu_n curl --fail http://127.0.0.1:9091/api/v1/query?query=net_bytes_recv_total | grep net_bytes_recv_total curl --fail http://127.0.0.1:9091/api/v1/query?query=nginx_requests | grep nginx_requests curl --fail http://127.0.0.1:9091/api/v1/query?query=redfish_thermal_fans_reading_rpm | grep redfish_thermal_fans_reading_rpm +curl --fail http://127.0.0.1:9091/api/v1/query?query=disk_used_percent | grep disk_used_percent ``` ## Running example diff --git a/config/telegraf.conf b/config/telegraf.conf index 43c8b5b..b5cc203 100644 --- a/config/telegraf.conf +++ b/config/telegraf.conf @@ -32,6 +32,9 @@ [[inputs.net]] ignore_protocol_stats = false +[[inputs.disk]] + ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"] + [[outputs.file]] files = ["stdout"] data_format = "influx" diff --git a/docker-compose.yml b/docker-compose.yml index f2b2777..224d9be 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,7 +41,11 @@ services: telegraf: image: docker.io/library/telegraf:1.29 volumes: + - /:/hostfs:ro - ./config/telegraf.conf:/etc/telegraf/telegraf.conf:ro + environment: + - HOST_MOUNT_PREFIX=/hostfs + - HOST_PROC=/hostfs/proc depends_on: - spdk - influxdb