opiproject / otel

OPI Monitoring and Telemetry via Open Telemetry (OTEL)
Apache License 2.0
9 stars 14 forks source link

feat: enhance the demo with disk telemetries #139

Closed Kevin222004 closed 4 months ago

Kevin222004 commented 4 months ago

Part of https://github.com/opiproject/otel/issues/5

I have added the disk telemetry. https://github.com/influxdata/telegraf/tree/master/plugins/inputs/disk

Testing data that it works

$ cd config                                                                           

 [~/Desktop/opi/otel/config]
$ telegraf --config telegraf.conf > telegraph.txt 

 [~/Desktop/opi/otel/config]
 $ cat telegraph.txt | grep disk
disk,device=nvme0n1p2,fstype=ext4,host=kevin-Inspiron-15-5510,mode=rw,path=/ inodes_free=27164985i,inodes_used=4030151i,inodes_used_percent=12.919164705677193,total=501809635328i,free=235259224064i,used=240984608768i,used_percent=50.60109804151729,inodes_total=31195136i 1719322320000000000
disk,device=efivarfs,fstype=efivarfs,host=kevin-Inspiron-15-5510,mode=rw,path=/sys/firmware/efi/efivars used_percent=69.72437234617055,inodes_total=0i,inodes_free=0i,inodes_used=0i,inodes_used_percent=0,total=382876i,free=114368i,used=263388i 1719322320000000000
disk,device=nvme0n1p1,fstype=vfat,host=kevin-Inspiron-15-5510,mode=rw,path=/boot/efi inodes_total=0i,inodes_free=0i,inodes_used=0i,inodes_used_percent=0,total=1124999168i,free=1060528128i,used=64471040i,used_percent=5.730763349328984 1719322320000000000
disk,device=nvme0n1p2,fstype=ext4,host=kevin-Inspiron-15-5510,mode=rw,path=/ free=235259174912i,used=240984657920i,used_percent=50.601108362280854,inodes_total=31195136i,inodes_free=27164985i,inodes_used=4030151i,inodes_used_percent=12.919164705677193,total=501809635328i 1719322330000000000
disk,device=efivarfs,fstype=efivarfs,host=kevin-Inspiron-15-5510,mode=rw,path=/sys/firmware/efi/efivars inodes_used_percent=0,total=382876i,free=114368i,used=263388i,used_percent=69.72437234617055,inodes_total=0i,inodes_free=0i,inodes_used=0i 1719322330000000000
disk,device=nvme0n1p1,fstype=vfat,host=kevin-Inspiron-15-5510,mode=rw,path=/boot/efi free=1060528128i,used=64471040i,used_percent=5.730763349328984,inodes_total=0i,inodes_free=0i,inodes_used=0i,inodes_used_percent=0,total=1124999168i 1719322330000000000
disk,device=nvme0n1p2,fstype=ext4,host=kevin-Inspiron-15-5510,mode=rw,path=/ inodes_free=27164985i,inodes_used=4030151i,inodes_used_percent=12.919164705677193,total=501809635328i,free=235259154432i,used=240984678400i,used_percent=50.601112662599014,inodes_total=31195136i 1719322340000000000
disk,device=efivarfs,fstype=efivarfs,host=kevin-Inspiron-15-5510,mode=rw,path=/sys/firmware/efi/efivars used=263388i,used_percent=69.72437234617055,inodes_total=0i,inodes_free=0i,inodes_used=0i,inodes_used_percent=0,total=382876i,free=114368i 1719322340000000000
disk,device=nvme0n1p1,fstype=vfat,host=kevin-Inspiron-15-5510,mode=rw,path=/boot/efi used=64471040i,used_percent=5.730763349328984,inodes_total=0i,inodes_free=0i,inodes_used=0i,inodes_used_percent=0,total=1124999168i,free=1060528128i 1719322340000000000
Kevin222004 commented 4 months ago

@glimchb Thanks for reviewing.

I have updated the readme, added curl command for testing and added volume and env in docker-compose.