Export unraid metrics as a influxDB line Protocol. influxDB line protocol can be handled by telegraf using inputs.exec with dataType influx
As a standalone binary this app will print on the stdout the influxDB protocol line with the results.
go get -d ./
go build -o unraid-influxdb-line
chmod +x unraid-influxdb-line
#Get Help
./unraid-influxdb-line
Usage of ./unraid-influxdb-line:
-modules string
modules to extract data separated with coma, default(disk,ups) available disk,ups (default "disk,ups")
-unraid-disks-path string
Path where disks.ini is located, by default /var/local/emhttp/disks.ini (default "/var/local/emhttp/disks.ini")
Telegraf execute the standalone binary extract the data and can be processed as you want.
docker build -t segator/unraid-telegraf .
You need to edit your telegraf.conf adding on the inputs.exec the execution of /app/unraid-influxdb-line
[[inputs.exec]]
commands = [
"/app/unraid-influxdb-line --unraid-disks-path /rootfs/var/local/emhttp/disks.ini"
]
After this you can run this docker(Remember change the path of the telegraf.conf
docker run -d --name=telegraf --restart=always --privileged --net=host -v /boot/config/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro \
-v /var/run/utmp:/var/run/utmp \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /:/rootfs \
-v /sys:/rootfs/sys \
-v /etc:/rootfs/etc \
-v /proc:/rootfs/proc \
-e HOST_PROC=/rootfs/proc \
-e HOST_SYS=/rootfs/sys \
-e HOST_ETC=/rootfs/etc \
-e HOST_MOUNT_PREFIX=/rootfs \
segator/unraid-telegraf
Content type
Image
Digest
Size
30.5 MB
Last updated
over 6 years ago
docker pull segator/unraid-telegraf