temperature sensors - get the data from OPNsense on regular basis - CLI or API

Started by zyghom, April 11, 2024, 09:10:56 AM

Previous topic - Next topic
hi there,

I am trying to figure out if I need a fan or not but one thing that does not help me is: the cpu temperatures shown in the report on GUI are not showing trends - only the status at this particular moment:



Is there any way to have it exported on regular basis?
I tried Monit and Telegraf but it seems this information is not there.
Any other way?

thx

No, the UI is only point in time.
Best way is with telegraf which you seem to have. What you're missing is the right sensor setup. You might need to use inputs.exec https://github.com/influxdata/telegraf/blob/master/plugins/inputs/exec/README.md


it looks like I succeeded - thank you again
with small caviat: to get disks temperature I, the command:
smartctl -a /dev/ada1 | grep Temperat | awk '{ print $10 }'
requires root priviledges so I did not get it yet how to. But for CPU/ACPI the user telegraf is enough to get the data (without and with fan installed):