Skip to content

Commit

Permalink
feat: enhance the demo with netstat and dns_query telemetries
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin222004 <[email protected]>
  • Loading branch information
Kevin222004 authored and glimchb committed Jul 1, 2024
1 parent 4316536 commit eba1aba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
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
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
- name: Logs
if: always()
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ curl --fail http://127.0.0.1:9091/api/v1/query?query=net_bytes_recv_total | grep
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
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
```

## Running example
Expand Down
7 changes: 7 additions & 0 deletions config/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]

[[inputs.netstat]]
# no configuration

[[inputs.dns_query]]
servers = ["8.8.8.8"]
include_fields = ["all_ips"]

[[outputs.file]]
files = ["stdout"]
data_format = "influx"
Expand Down

0 comments on commit eba1aba

Please sign in to comment.