CPU temperature monitoring with Zabbix


With contemporary monitoring systems you can monitor whatever you wish. All you need – understand technology of data gathering and visualizing. 2016 year serves thousands of ways to perform it. At this post I’ll show up one of the most popular ways to do it – monitoring customization with Zabbix.

CPU temperature metric is one of the most important for every kind of IT infrastructure. You can analyze your hardware healthcare, check server refrigeration at your datacenter. If this value is around critical – your project looks so close to crash. But here is just an example about how to track anything your OS has. You can go through the list of instructions I’ll point below with every data metric. All we need now – Zabbix-agent on host with installed lm-sensors utility and Zabbix-server. You can find lm_sensors utility in every default repository for your Linux distribution.

Filter sensors command to see average CPU temperature

Just run this command:

sensors | tail -n 5 | head -n 4 | awk -F'[:+°]' '{avg+=$3}END{print avg/NR}'

You should see just one figure. That’s an average temperature of processor cores.

You can monitor temperature of each core running few commands and add each of this metrics as a special user parameter. You can gather this temperature metrics at the one graph easily. That’s just my opinion of look at it, average picture for one physical CPU will be enough.

Add user parameter to Zabbix agent

1. Edit Zabbix agent config file (/etc/zabbix/zabbix_agentd.conf). At first ensure that user parameters option is on


2. Add new parameter at the bottom of file.

UserParameter=cluster1.cpuTemperature,sensors | tail -n 5 | head -n 4 | awk -F'[:+°]' '{avg+=$3}END{print avg/NR}'

3. Restart Zabbix agent on the Wowza server to enable your changes at last. Now you have a streaming metric which is going to be shipped to connected Zabbix server.

Configure Zabbix web-panel

1. Add new item to your host (Configuration -> Hosts -> Items of desired host). Configure stored time, choose subject application, data type and so on.


2. Add new trigger for your item (Configuration -> Hosts -> Triggers of desired host). Your trigger has to contain the comparison between your item and critical value. Set up your own value, I picked 70 degrees. Later you can receive from Zabbix alerts if your metric is getting higher than the trigger value.


3. Add new graph to your host (Configuration -> Hosts -> Graphs of desired host). Point there name of created item and customize properties of visualization.


4. Check your new graph.


My CPU temperature was too high. But with monitoring I’ve got an opportunity to fix cooling problem in time.

That’s all. Change the metric and command – principles will stay as they are.


5 thoughts on “CPU temperature monitoring with Zabbix

  1. Hi. I got this in server log : “”Zabbix server:cluster1.cpuTemperature” became not supported: Received value [39.75] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]”

    As one can see, there is a value. Maybe the “.” in value ? How can it be replace by “,” as it’s a german system.
    Agent on client has been restartet and the value in the item is set to numeric (float) befotre !


  2. Love your write up but I have been scratching my head to redo it so I can monitor all cores Core0-3 individually. I can average them in Zabbix but new to Linux Debian. Windows has spoiled me. How can I tweak your line above to accomplish that? Great job! many thanks!


  3. AVG CPU Temp over how ever many cpu’s detected. This makes sure there’s a valid temp and counts the rows counted to work out the average.

    UserParameter=cluster1.cpuTemperature,sensors | awk -F'[:+°]’ ‘{$3?rws++:rws;avg+=$3}END{print avg/rws}’


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s