New build with a custom GUI/display

Status
Not open for further replies.

rzd

Cadet
Joined
Mar 29, 2016
Messages
7
Hello everyone, this is my FreeNas build with a twist - I DIY'ed a case with a built-in display, and rolled up my own FreeNas UI to use with it. This is in no way a competition/replacement for the official UI, but rather a companion app, as it's main purpose to be a monitoring dashboard, not an administration tool.

First, the hardware:
  • Supermicro X10SLM+-F
  • Core I3-4150 Haswell processor
  • 16GB ECC memory
  • EVGA 650 G2 PSU
  • APC 550VA UPS
  • 2 Rosewill Hard Drive cages
  • 8x3TB HDD RAIDZ2 pool for data
  • 2x32 GB USB mirror boot pool
  • 1x500 GB SSD app/jail pool
  • 7'' iRULU Tablet as a monitor.
The case is built around an old Gageway (circa 2002) chassis with plywood sides/face with fiber carbon touches.

On the software side I'm using a bunch of shell scripts to collect the data (vmstat, iostat, netstat, zpool, smbstatus, smartctl, ipmitool, etc, etc.), a Python app/web server and an HTML5 mobile app compiled for the Android. It can also be used as a website or compiled as an Apple app, but can you buy a 7" Apple tablet for $23? :)

Let me know what you guys think. I'll be glad to share whatever knowledge I have, and the app itself if there is enough interest.

This is what a photo of the case (did not come out nice, with or without the flash)
case_zpscpyygsgo.png


And these are the screenshots from the app. The title bar is also the alert indicator; as there are pool-related warnings it's red on all the screens.
Home screen
home_zpsapgn9fko.png

Industrial/LCD looking kitchen sink:
lsd_zpsvhs815y9.png

OS:
os_zps0xgntcib.png

Hardware:
hw_zpsjdbll3i7.png

Pools:
zpools_zpsny41zpje.png

and the raw zpool output (reminds me of the Fallout Pip-boy)
zpool_zpsh3be3eij.png

SMB stats:
smb_zpsrkcuncdf.png

Drives with SMART status:
smart_zpsv7tcuyzj.png

and individual drive's attributes:
smart_attrib_zpsadcybhjr.png

ARC stats:
arc_zpsht73ies0.png

filesystem usage:
df_zpsxoaihjwj.png

alerts:
alerts_zps8sknnnzl.png
 
Joined
Dec 2, 2015
Messages
730
Very cool! Congrats on getting it working.
 

HardChargin

Dabbler
Joined
Jul 19, 2015
Messages
49
Pretty slick.
 

MtK

Patron
Joined
Jun 22, 2013
Messages
471
Awesome!
Would love to see the code and help out if you need anything...
 

rzd

Cadet
Joined
Mar 29, 2016
Messages
7
What's the preferred way to share files here? It will be binary files – a .tar.gz with the server side stuff and a .apk file for Android.
Thanks.
 

MtK

Patron
Joined
Jun 22, 2013
Messages
471
Probably in a private message, or repository with the source
 

rzd

Cadet
Joined
Mar 29, 2016
Messages
7
I'm setting up a Git repository. Tonight or tomorrow morning I'll add the files and post the links.
Thanks.
 

rzd

Cadet
Joined
Mar 29, 2016
Messages
7
Just noticed the 'Upload a File' button :rolleyes:
Anyway, I have it on Github as well. Download from https://github.com/drezni01/BsdMon/tree/initial-revision, you're looking for bin/sysinfo.tar.gz.

Copy to one of your datapools, unzip and un-tar.
You'll have a 'sysinfo' folder which contains the webserver/web app and scripts.
By default the server uses ports 504 (UDP) internally and 8080 (HTTP) externally. You can check first if they are available or just try to run my app and see if anything fails.
cd to sysinfo and run start.sh. (once you get everything working you can add it to you Post Init tasks). Check sysinfo.log, monitor/stats.log and monitor/smart.log to see if there are any errors. (you might need to tweak the smart-related scripts later, I'll provide more info once you get the basic stuff working).
Now, assuming there are no errors you can run the front end. In a browser go to http://<freenas host or ip>:8080/static/index.html.
One limitation of running on a desktop: since the app was originally designed for a phone/tablet it doesn't automatically respond to resizing the browser window. If you resize the window you'll need to refresh the page. I might address it in the future.

Let me know how it goes.
 

Attachments

  • sysinfo.tar.gz
    1 MB · Views: 416

Schuby

Dabbler
Joined
Apr 27, 2016
Messages
37
Just noticed the 'Upload a File' button :rolleyes:
Anyway, I have it on Github as well. Download from https://github.com/drezni01/BsdMon/tree/initial-revision, you're looking for bin/sysinfo.tar.gz.

Copy to one of your datapools, unzip and un-tar.
You'll have a 'sysinfo' folder which contains the webserver/web app and scripts.
By default the server uses ports 504 (UDP) internally and 8080 (HTTP) externally. You can check first if they are available or just try to run my app and see if anything fails.
cd to sysinfo and run start.sh. (once you get everything working you can add it to you Post Init tasks). Check sysinfo.log, monitor/stats.log and monitor/smart.log to see if there are any errors. (you might need to tweak the smart-related scripts later, I'll provide more info once you get the basic stuff working).
Now, assuming there are no errors you can run the front end. In a browser go to http://<freenas host or ip>:8080/static/index.html.
One limitation of running on a desktop: since the app was originally designed for a phone/tablet it doesn't automatically respond to resizing the browser window. If you resize the window you'll need to refresh the page. I might address it in the future.

Let me know how it goes.

Can't wait to try this when I have some free time!
 

Greg F

Cadet
Joined
Nov 15, 2016
Messages
3
I don't know if this is still alive, but I need a little help getting it running.

Thanks
 

Greg F

Cadet
Joined
Nov 15, 2016
Messages
3
Im not sure what is wrong, trying this out as a test setup. I'm not using a tablet, just checking with browser. Website loads properly, shows interface, but it says that it is unable to connect to server.

Since this is a test, I chmod 777 the entire directory tree, just in case it was permissions. Didn't fix it. So I started looking around at the logs, here is what I am finding:


Sysinfo.log:

Code:
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner
	self.run()
  File "/mnt/Saturn/Downloads/BsdMon/bin/sysinfo/udpMonitor.py", line 74, in run
	handler.process(data)
  File "/mnt/Saturn/Downloads/BsdMon/bin/sysinfo/monitorsImpl.py", line 631, in process
	self.alerts = jsonpickle.decode(match.group(1), )
  File "/mnt/Saturn/Downloads/BsdMon/bin/sysinfo/pylibs/jsonpickle/__init__.py", line 148, in decode
	return unpickler.decode(string, backend=backend, keys=keys)
  File "/mnt/Saturn/Downloads/BsdMon/bin/sysinfo/pylibs/jsonpickle/unpickler.py", line 26, in decode
	return context.restore(backend.decode(string), reset=reset)
  File "/mnt/Saturn/Downloads/BsdMon/bin/sysinfo/pylibs/jsonpickle/backend.py", line 194, in decode
	raise e
ValueError: Expected object or value


Stats.log:

Code:
./start.sh: ./stats.sh: not found


monitor/stats.log:

Code:
ifconfig: interface igb0 does not exist
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
ifconfig: interface igb0 does not exist


monitor/smart.log - is empty (I'm guessing it didn't get far enough to write anything yet)

*Note: I am a relative newbie at this, I've set up a simple freenas server that works fine. I've messed around with jails but that is a little beyond my understanding right now. I understand python and shell scripts (though for some reason I have to execute them as sh start.sh). Though, I have not written either from scratch, a lot of copying and pasting. So I get the ideas, but when it fails, I get a little lost with troubleshooting :)

Just so you know where I am coming from.

Any help is appreciated, thanks!
 

rzd

Cadet
Joined
Mar 29, 2016
Messages
7
Greg, no worries, I'll try to help as best as I can.
First of all, this thing is "designed" to run in the FreeNas itself, not in a jail - otherwise I may not get the correct system metrics. I'm not sure where you run it, but you've mentioned jails, so I just want to point out that you don't have to/need to run it in a jail.
2. in the web UI you need to go to the Settings area and enter your server name or IP and click on the Save icon (seems redundant, but this website gets compiled into an app, so need to provide the server address)
3. don't use sh to start the script. Either do ./start.sh or bash start.sh

As far as the errors:
1. ifconfig: interface igb0 does not exist: Your actual network interface needs to be specified in monitor/starts.60sec.sh. You'll need to run ifconfig to list all the interfaces and then see which one is used. If you post the output of the above command and I should be able to tell you what it is. After you have it plug it into the above script instead of igb0.
2. Could not open device at /dev/ipmi0: Most likely your motherboard doesn't support IPMI
3. python error: Please edit monitor/FnApi.py and plug the username/password you use for your FreeNas admin UI.

Let me know how it goes.
 

Greg F

Cadet
Joined
Nov 15, 2016
Messages
3
That all seems to work, dashboard is functional and reading fine. The ONLY thing that is not giving a reading is hardware stats (fans and temps). Is this due to the ipmiO problem?

If my motherboard does not support it, is there a work around? I am using a ASRock CM70M1, which works well for my small setup, and was REALLY inexpensive too :).

Thanks, this is a really useful tool.
 
Last edited:

rzd

Cadet
Joined
Mar 29, 2016
Messages
7
Yes, the fan speed and the motherboard temperature readings are provided by IPMI. The disk temperatures come from SMART and should work. You can post your hardware specs on the forum and the knowledgeable folks here can confirm if your mobo supports IPMI at all or perhaps you just need to enable it.
 
Joined
Apr 14, 2017
Messages
1
Congratulations on the work, friend, I'm from Brazil and I'll try to translate it into Portuguese.

Congratulations
 
Status
Not open for further replies.
Top