Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    CPU temp and Zabbix

    Scheduled Pinned Locked Moved pfSense Packages
    2 Posts 2 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Titan Frost
      last edited by

      I am trying to get the CPU temp using Zabbix.

      I started by using SSH to remote into the firewall and ran kldload coretemp
      From there, I verified that I was able to get the temp by running:
      sysctl -n dev.cpu.0.temperature
      The temp for core 0 was displayed.
      I then went to the the zabbix_agentd.conf and added this to the bottom:
      UserParameter=cputemp0,/sbin/sysctl -n dev.cpu.0.temperature
      I created a template/application/item in Zabbix that matched cputemp0 as my key. The template will apply to the firewall but after about a minute, it will show up as Not Supported - Unsupported Key Item.

      I then tried to enable it via Include=/usr/local/etc/zabbix52/zabbix_agentd.conf.d/*.conf
      and created a conf file with the following command:
      UserParameter=coretemp.cpu.discovery, /sbin/sysctl -n dev.cpu.0.temperature

      I changed the key in my template, removed it from the firewall, restarted Zabbix on the firewall, and reapplied the template. Same results.

      So it appears that Zabbix isn't receiving the data. Is there something else I need to do so that I can retrieve CPU temp?

      Thank you.

      pfsense 2.5, Zabbix Agent 5.2

      1 Reply Last reply Reply Quote 0
      • T
        tirsojrp
        last edited by

        @titan-frost

        I actually did this long time ago and it is still working after 2.5 upgrade.

        UserParameter=pfsense.cpu.avg.temp,sysctl dev.cpu | grep temperature | cut -f2 -d ' ' | cut -f1 -d 'C' | awk '{s+=$1} END {print s/NR}'

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.