Skip to content

Commit

Permalink
feat: enhance the demo with disk telemetries
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin222004 <[email protected]>
  • Loading branch information
Kevin222004 committed Jun 26, 2024
1 parent f161093 commit eb18a45
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ curl -k --user spdkuser:spdkpass -X POST -H "Content-Type: application/json" -d
- For example <https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/syslogreceiver>
- 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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions config/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eb18a45

Please sign in to comment.