Monitoring FreeNAS with Observium

Status
Not open for further replies.

Oko

Contributor
Joined
Nov 30, 2013
Messages
132
I am playing with Observium and so far my impressions are so positive that I am thinking in using it in production along M/Monit (for up and down view). One of the nice features at least for the kind of setup I have that Observium relies on SNMP for pooling info (collectd is also a nice auxiliary option). I was wondering if a kind soul could share her/his auxiliary parameters for SNMP daemon on FreeNAS box. For Red Hat boxes I found following
/etc/snmp/snmp.conf file to be working perfectly

Code:
com2sec readonly  default        public
group MyROGroup v1         readonly
group MyROGroup v2c        readonly
group MyROGroup usm        readonly
view all    included  .1                               80
access MyROGroup ""      any       noauth    exact  all    none   none
syslocation Rack A1-2A, My Location[40.4424925,-79.9425528]
syscontact me <my@email>
#This line allows Observium to detect the host OS if the distro script is installed
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro


The stupid /usr/bin/distro is Linux specific script. However what I am really after is getting sensor information which on Red Hat are passed through lm_sensor. I would appreciate any information on this topic including possible integration of FreeNAS collectd and ipmi with Observioum.
 
D

dlavigne

Guest
#This line allows Observium to detect the host OS if the distro script is installed
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro

I'm not sure how well this will work with 9.2.x as it uses bsnmpd which provides a limited set of MIBs. The upcoming 9.3 has switched to net-snmp which provides many more MIBs.

What is the contents of /usr/bin/distro? I assume it is just a small script that does a uname or something to grab the distro info in order to extend the functionality of the specified MIB. If so, it could easily be modified to run the similar FreeBSD command.
 

Oko

Contributor
Joined
Nov 30, 2013
Messages
132
/usr/bin/distro is a Bourne shell script. It is actually Linux specific. Without that script any Linux distro is reported by SNMP daemon as just a Linux. With that script my Springdale Linux and CentOS boxes are reported as Red Hat. FreeNAS is reported by SNMP to Observium as FreeBSD. The only thing I entered in SNMP configuration was the location including [GPS x,y] which is correctly listed on the world map and my e-mail. I didn't enter any other parameters. GUI created /etc/snmpd.config file which through me off as I expected extension .conf . Observium or should I say SNMP daemon is quite confused about file systems. Each partition /etc /usr /mnt is reported as "software RAID" including /mnt/my-zfs-data set. There was also that problem with to IP addressed assigned to same physical interface (one belongs to Jail). All in all Observium is not too useful with FreeNAS but would be probably fixable. I am playing with collectd plug-in for Observioum which should get collectd graphs out of collectd server running on the same machine as Observioum. I wonder if that thing could pull collectd info from a FreeNAS box as collectd is the part of default FreeNAS installation.

Edit: As I dig dipper into this in part because I have now two vanilla TrueOS servers I got greedy. It would be very easy to modify /usr/local/etc/collectd.conf file by hand (of course the changes are going to be lost on reboot) add remote collectd server and restart daemon. I have not done this on production servers. I need to test it before I do on production servers. I am afraid to mess up collectd graphs on FreeNAS gui.

Since Observium can serve also as a web interface for centralizing loggin server (using either rsyslog or syslog-ng as a backend) it would also be a peace of cake to slightly modify /etc/syslog.conf file to send data to syslog-ng server (I think syslog-ng can receive legacy log files). Of course it would be better to have syslog-ng instead of syslog daemon as a default loggin daemon on FreeNAS box. if I am reading correctly syslog-ng uses LGPL which is off course not BSD but could at least go into free edition of FreeNAS.

Another thing. From the point of view of Observium and SNMP v3 (secure one) replacing bsnmpd with net-snmp is a good thing. I never got native OpenBSD snmpd to be detected in v3 mode by Observium and I really wonted to encrypt one remote connection. With net-snmp there is no problem.

For people who read this post and get excited about Observium. There are hundreds of good thing going for it but there is one bad thing. As correctly observed by Monit (I use it for up and down view), Collectd, and Syslog-ng developers push model is inherently better than pull model used by Observium due to the nature of SNMP protocol. Why? Because of monitoring private networks. I have 5 server in a branch which is only acceptable through VPN connection which is established on add hock basis. While Monit, Collectd, and Syslog-ng have no problems reporting as the traffic can pass out without VPN connection (I know security model of that facility is flowed but I have to use it because of government regulations) that can't be done with SNMP which is in core of Observium. I noticed a proxy server for SNMP but it seems rather clumsy from the first reading. On another hand Observium lack proxy. That is a major feature lacking by Observium IMHO. Essentially the correct way to do it is to have Observium proxy which will poll remote location and report back to main Observium server

So my FreeNAS remaining question really now is how does one edits daemon configuration files in such fashion that the changes will not be lost on the boot. And secondly how to restart daemons like collectd, syslog safely.
 
Last edited:

Oko

Contributor
Joined
Nov 30, 2013
Messages
132
Please refer further inqeries to missing features #6437 and #6438 at bugs.freenas.org.
 
Status
Not open for further replies.
Top