-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: UI Example (FreeNAS 11) #12
Comments
Awesome tutorial. Been running this for a few weeks now. Although maybe once a week, my ngninx config gets overwritten. Does the same happen to you? |
Yea, I hit the same issue. I'm sure there's a way to create an add-in file to nginx rather that modify it directly, but I haven't had time to poke. I ended up creating a cron to update the nginx file if it did not contain the update :) |
@ValigarmandaTritoch: Thanks for the tutorial! 👍 @ValigarmandaTritoch @seren: Example 1: HDD Y-axis = 34.5°C - 40.5°C Example 2: CPU Y-axis = 43°C - 64°C Thanks! |
@svtkobra7 It's probably a very ugly solutions compared to theirs, but here's my solution https://github.com/GusGold/FreeNASTempsGUI Also, here's a basic graph with both cpu and hdd on the same scale until I can work out the right axis. (This is actually already included in the file, however there were some typos I corrected) Add the following to your outputfilename=everything
title="Temperature: All CPUs and Drives, ${interval} minute interval"
guidrule=
defsandlines=
for (( i=0; i < ${numcpus}; i++ )); do
(( colorindex = i % NUMCOLORS )) # If we run out of colors, start over
defsandlines="${defsandlines} DEF:cpu${i}=${datafile}:cpu${i}:MAX LINE1:cpu${i}#${LINECOLORS[$colorindex]}:cpu${i}"
done
i=0
for drdev in ${drivedevs}; do
(( colorindex = ( i + numcpus ) % NUMCOLORS )) # Don't reuse the cpu colors unless we have to
defsandlines="${defsandlines} DEF:${drdev}=${datafile}:${drdev}:MAX LINE1:${drdev}#${LINECOLORS[$colorindex]}:${drdev}"
(( i = i + 1 ))
done
write_graph_to_disk |
@svtkobra7 As you've seen, the temps are hard-coded into the script at the moment (https://github.com/seren/freenas-temperature-graphing/blob/master/rrd-graph.sh#L111). The easiest way to make them variable would be to replace the temperature values to environment variable references and then set them when you run the script:
New:
Then you would run it like this: I've actually just added this change and updated the README, so hopefully that will help you avoid having to have two copies of the script with different values hard-coded inside. |
Hi all this was exactly what i was looking for (thanks @seren for pointing me here) I am running into the issue mention before the conf get overwritten does any one have a elegant solution for this ? I see the mention of a cron job but i only know how to set that up to replace the file risking overwriting freenas changes is it possible to cronjob only the addition of these files ? |
Hi @spacecabbie
https://github.com/GusGold/FreeNASTempsGUI only appends to The down side to my solution is the complexity of running node in a jail but it achieves the goal of keeping the temps in the GUI. |
@GusGold Perfect i am already running a jail so that not a biggie I will try your suggestion ! Ran into an problem i made an issue in https://github.com/GusGold/FreeNASTempsGUI |
Closing this since it's ancient and fairly resolved. |
Just a quick note on how to drop this in the UI if people are interested - yes, it probably goes away with updates, I haven't tested :-)
Anywhere in 'server {'
Restart nginx:
service nginx restart
Create index.html file in alias directory (my directory was /mnt/tank/rrdtemp):
at the end of /usr/local/www/freenasUI/templates/reporting/index.html (before the
</div>
):<div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="title: '{% trans "Temps" %}', href: '/temps', refreshOnShow: true"></div>
The text was updated successfully, but these errors were encountered: