Zabbix agent 2 - Get CPU Temperature



  • Hi There,

    I need to know what's the key to get cpu temperature in zabbix. I've tried:

    • cpu.temp.0
    • cpu.temp.0.sensors
    • dev.cpu.0.temperature

    Can someone help me to know the key?

    Thanks.



  • By default, the Zabbix agent doesn't have temperature.

    However, you can add it as a user parameter and name it as you wish.

    Example:

    
    UserParameter=temperature,sysctl -n dev.cpu.0.temperature
    
    

    In the above example the key is simply "temperature"



  • @dennypage:

    By default, the Zabbix agent doesn't have temperature.

    However, you can add it as a user parameter and name it as you wish.

    Example:

    
    UserParameter=temperature,sysctl -n dev.cpu.0.temperature
    
    

    In the above example the key is simply "temperature"

    Ok, now I get the 0 CPU temperature. I've the key like: temperature[0] , how can I get from both cpu's?



  • While I have not done this, I would expect that you can do it by adding additional user parameters:

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

    I'm not a Zabbix expert by any stretch of the imagination, so I don't know if you can make it into a pseudo array as would appear with a discovery agent.



  • @dennypage:

    While I have not done this, I would expect that you can do it by adding additional user parameters:

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

    I'm not a Zabbix expert by any stretch of the imagination, so I don't know if you can make it into a pseudo array as would appear with a discovery agent.

    Thanks :)

    It's solved!


Log in to reply