rbicelli / pfsense-zabbix-template

Zabbix Template for pfSense
Apache License 2.0
244 stars 107 forks source link

Temp reading with netgate appliances. #40

Closed TidalWave123 closed 3 years ago

TidalWave123 commented 4 years ago

For Netgate appliances they offer a temp reading.

So I've added the user agents

UserParameter=temperature0,sysctl -n dev.cpu.0.temperature UserParameter=temperature1,sysctl -n dev.cpu.1.temperature

Which returns a text value of 32.0C. I'll try to make a custom trigger for it. Just wanted other netgate users to know.

keentonsas commented 4 years ago

Hi there,

For the text value, you can strip the C with preprocessing in Zabbix (Right Trim: C), then you should be able to store it as a float.

For CPU temperature in general, I think we need to discover how many cores are available, or simply calculate an average value for all cores before sending it to Zabbix.

Bye.

rbicelli commented 4 years ago

I think creating proper discovery rules is the best way to achieve cpu temps. From the template design perspective is preferable to read temperatures from pfsense php function library. Will look into it as soon as I make the next review