From f4dae5e68ac5a14dac60964e2bf57d90fd618f02 Mon Sep 17 00:00:00 2001 From: Kevin222004 Date: Wed, 10 Jul 2024 17:37:16 +0530 Subject: [PATCH] feat: added more telegraf plugins Signed-off-by: Kevin222004 --- .github/workflows/docker-publish.yml | 2 ++ README.md | 2 ++ config/telegraf.conf | 7 +++++++ docker-compose.yml | 2 ++ 4 files changed, 13 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 4134b2f..a448196 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -51,6 +51,8 @@ jobs: curl --fail http://127.0.0.1:9091/api/v1/query?query=disk_used_percent | grep disk_used_percent curl --fail http://127.0.0.1:9091/api/v1/query?query=netstat_tcp_listen | grep netstat_tcp_listen curl --fail http://127.0.0.1:9091/api/v1/query?query=dns_query_result_code | grep dns_query_result_code + curl --fail http://127.0.0.1:9091/api/v1/query?query=ethtool_duplex | grep ethtool_duplex + curl --fail http://127.0.0.1:9091/api/v1/query?query=kernel_boot_time_total | grep kernel_boot_time_total - name: Logs if: always() diff --git a/README.md b/README.md index b4147e1..291da84 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,8 @@ curl --fail http://127.0.0.1:9091/api/v1/query?query=redfish_thermal_fans_readin curl --fail http://127.0.0.1:9091/api/v1/query?query=disk_used_percent | grep disk_used_percent curl --fail http://127.0.0.1:9091/api/v1/query?query=netstat_tcp_listen | grep netstat_tcp_listen curl --fail http://127.0.0.1:9091/api/v1/query?query=dns_query_result_code | grep dns_query_result_code +curl --fail http://127.0.0.1:9091/api/v1/query?query=ethtool_duplex | grep ethtool_duplex +curl --fail http://127.0.0.1:9091/api/v1/query?query=kernel_boot_time_total | grep kernel_boot_time_total ``` ## Running example diff --git a/config/telegraf.conf b/config/telegraf.conf index 97d0859..d0d5b77 100644 --- a/config/telegraf.conf +++ b/config/telegraf.conf @@ -38,6 +38,13 @@ [[inputs.netstat]] # no configuration +[[inputs.ethtool]] + down_interfaces = "skip" + interface_include = ["eth0"] + +[[inputs.kernel]] + collect = ["psi"] + [[inputs.dns_query]] servers = ["8.8.8.8"] include_fields = ["all_ips"] diff --git a/docker-compose.yml b/docker-compose.yml index 224d9be..e34c2de 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,6 +51,8 @@ services: - influxdb networks: - opi + cap_add: + - SYS_ADMIN healthcheck: test: cat /proc/1/status || exit 1 interval: 6s