FreeNAS-11.1-U7 Netdata adding cpu temp to System Overview

Nitro626

Dabbler
Joined
Mar 4, 2019
Messages
29
Hi all,

I finally got this working, SHH in to FreeNAS with WinSCP navigate to /usr/local/share/netdata/web/index.html copy the index file for editing (Rename the original index so you can go back if needed) open index.html in notepad or html editor Ctrl F and search cpu in the mainHead section you should see the system.cpu gauge under that paste the code below.

Code:
    if(typeof charts['cpu.temperature'] !== 'undefined')
                head += '<div class="netdata-container" style="margin-right: 10px;" data-netdata="cpu.temperature"'
                + ' data-dimensions="cpu2.temp"'
                + ' data-chart-library="gauge"'
                + ' data-title="CPU Temp"'
                + ' data-units="Celsius"'
                + ' data-gauge-max-value="100"'
                + ' data-width="20%"'
                + ' data-after="-' + duration.toString() + '"'
                + ' data-points="' + duration.toString() + '"'
                + ' data-colors="' + NETDATA.colors[12] + '"'
                + ' role="application"></div>';


The first 2 line of code use cpu.temperature from the chart maybe different for each system
ND.JPG


The data-dimensions come from the start of that same chart cpu2.temp if you have a cpu package average temp use that, if not use your hottest core mine was 2
ND2.JPG


Save the file, replace to usr/local/share/netdata/web/ then right click and set owner of index.html to netdata.

Which gives this result !
System-over.JPG


Probably posted in the wrong forum section but i wanted to share this.

Regards Nitro
 

Attachments

  • System-over.JPG
    System-over.JPG
    28.2 KB · Views: 606
Last edited:

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
@Nitro626, you filed a report for this, but it's unclear what you need. What help do you need, forum-wise?
 

Nitro626

Dabbler
Joined
Mar 4, 2019
Messages
29
@Nitro626, you filed a report for this, but it's unclear what you need. What help do you need, forum-wise?

Sorry i went about it the wrong way, i was wondering is this worth putting in How to forum section?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
That section is only for archiving old threads that already existed there before the forums were reorganized.
 

zamana

Contributor
Joined
Jun 4, 2017
Messages
163
Hi all,

I finally got this working, (...)

Hi!

Do you know how to set an alarm for cpu TEMPERATURE? I would like to be alerted when my CPU gets hot.

I know that /usr/local/etc/netdata/health.d/cpu.conf is the file, but I was unable to understand how to add the temperature sensor there. The documentation doesn't help.

Thanks.
Regards.
 

Nitro626

Dabbler
Joined
Mar 4, 2019
Messages
29
Hi!

Do you know how to set an alarm for cpu TEMPERATURE? I would like to be alerted when my CPU gets hot.

I know that /usr/local/etc/netdata/health.d/cpu.conf is the file, but I was unable to understand how to add the temperature sensor there. The documentation doesn't help.

Thanks.
Regards.

No but the guys at Netdata Github are very helpful thats where I got my info to change the index file from
 

zamana

Contributor
Joined
Jun 4, 2017
Messages
163
Thanks for pointing me there.

This is working for me now:

Code:
alarm   : temperature_out
on      : cpu.temperature
os      : freebsd
hosts   : *
calc    : ($cpu0.temp + $cpu1.temp + $cpu2.temp + $cpu3.temp + $cpu4.temp + $cpu5.temp + $cpu6.temp + $cpu7.temp) / 8
units   : C
every   : 5s
warn    : $this > 30
crit    : $this > 50
info    : CPU temperature is out of spec
to      : sysadmin


I just created a "cpu_temp.conf" file in /usr/local/etc/netdata/health.d and send the USR2 signal to netdata.

Thanks!
 
Top