Possibly… Probably… I was unaware of SNMP when I went down this rabbit hole. It wasn’t until this post that I realized that I could have gone that route.
Have you successfully set up SNMP sensors from FreeNAS? Is it pretty simple? Do you get access to the same information, warning messages etc?
To be fair, ive got no idea, it really depends how much data FreeNAS publishes through SNMP and how usable that data is. I havent played with FreeNAS and SNMP yet, but im using SNMP to monitor different servers and devices (like PDUs) and the results are mixed depending on how much information particular system or device exposes
OK! Now I am intrigued! I assumed what SNMP gave you is what you got. But if you can pass anything, that would be awesome. Not only for notification, but I like having all my stat collection in one place and tracked in HA. Could probably accomplish the same thing or better in a FN jail with some type of logging server… Been thinking about looking into that to track network traffic from my pfSense router and such. Prioritizing time for these nice to haves is always the thing.
I originally thought it would be cool to have API integration because I could auto unlock my FreeNAS encrypted drives from HA and get stat data. I wasn’t able to get the unlock to work on my first crack and then found other things to do that were higher priority and never got back to it.
Can include result of custom scripts over SNMP on pfsense too.
As default SNMP daemon is limited, I installed net-snmp package, changed port from default 161, then in the advanced configuration added the location of the scripts:
My box is a fanless J1900 with pfblockerng, snort, ClamAV (comes with Squid) and net-snmp packages (I only added a few custom sensors over SNMP, was mostly looking to get processor temperature into HA).
Usually stays at 0.4-0.5 on 15 min load, sometimes going up to 0.7-0.8 (processor is quad core so this is quite low) and 70-72 degrees C.
I seem to remember that you’ll get an “Unknown” if there is no message or alert level. Maybe you can set a condition that if the others were able to pull data and Alert message is null, then make it “Ok.” or something.
In order to get your UPS status, you’ll probably have to go the SNMP sensor route and create a custom SNMP sensor. I would also like to set this up for the same reason. I just haven’t gotten around to playing with SNMP yet. With the API you can access your UPS settings, but it doesn’t look like you can get the current status: http://api.freenas.org/resources/services.html#ups
I got it to work. I was missing “object” in the value_template. But in the process I forced an alert by setting the disk temp low. I have the alert showing now but it will not clear even when I reset my disk temp alert and clear it from the Freenas UI. Restarted HA and it still holds.
It could either be your scan_interval or FreeNAS could still be reporting it in the API. Try getting the message from your browser and see what FreeNAS is reporting. http://hostipaddress/api/v1.0/system/alert/?format=json
On another note did you get the stats from pfSense working?
I installed a crazy custom API package to get stats from pfSense ([link ](https://community.home-assistant.io/t/pfsense-stat-monitor/61070)). SNMP may have been better?
Her you go. Its pretty easy. Just copy and paste the sensors below and paste them in your sensor.yaml file.
Replace the IP of mine that is 192.168.1.9 with the IP of your Freenas. Also put in your user name and password on each sensor.