-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enhance the demo with disk telemetries #139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @Kevin222004 for the contribution
please fix https://commitlint.js.org/ checker failing
please also add curl call here to test we actually getting correct metrics :
otel/.github/workflows/docker-publish.yml
Line 49 in f161093
curl --fail http://127.0.0.1:9091/api/v1/query?query=nginx_requests | grep nginx_requests |
and also same here, just for documentation:
Line 115 in f161093
curl --fail http://127.0.0.1:9091/api/v1/query?query=nginx_requests | grep nginx_requests |
also when runnign in docker, we need to document for this specific disc plugin we need to fix hostfs like this
and fix compose
Lines 43 to 44 in f161093
volumes: | |
- ./config/telegraf.conf:/etc/telegraf/telegraf.conf:ro |
, for example:
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
@glimchb Thanks for reviewing. I have updated the readme, added curl command for testing and added volume and env in docker-compose. |
Signed-off-by: Kevin222004 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from CI i see:
+ curl --fail 'http://127.0.0.1:9091/api/v1/query?query=disk_used_percent'
+ grep disk_used_percent
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 1069 100 1069 0 0 927k 0 --:--:-- --:--:-- --:--:-- 1043k
{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"disk_used_percent","device":"nsfs","fstype":"nsfs","host":"36a8694974a0","instance":"otel-gw-collector:8889","job":"otel-collector","label1":"value1","mode":"rw","path":"/run/snapd/ns/lxd.mnt"},"value":[1719420750.837,"0.054752331251604065"]},{"metric":{"__name__":"disk_used_percent","device":"sda1","fstype":"ext4","host":"36a8694974a0","instance":"otel-gw-collector:8889","job":"otel-collector","label1":"value1","mode":"rw","path":"/"},"value":[1719420750.837,"74.89278022464133"]},{"metric":{"__name__":"disk_used_percent","device":"sda15","fstype":"vfat","host":"36a8694974a0","instance":"otel-gw-collector:8889","job":"otel-collector","label1":"value1","mode":"rw","path":"/boot/efi"},"value":[1719420750.837,"5.789958954053813"]},{"metric":{"__name__":"disk_used_percent","device":"sdb1","fstype":"ext4","host":"36a8694974a0","instance":"otel-gw-collector:8889","job":"otel-collector","label1":"value1","mode":"rw","path":"/mnt"},"
looks good
Part of #5
I have added the disk telemetry. https://github.com/influxdata/telegraf/tree/master/plugins/inputs/disk
Testing data that it works