Observium Client Setup Script

Observium is a neat PHP based system monitoring platform that I’ve been using lately, it’s fairly easy to install (Observium + Nginx/PHP-FPM install guide Coming Soon!) and provides a large variety of easy to read graphs of system information.

Observium is an autodiscovering SNMP based network monitoring platform written in PHP which includes support for a wide range of network hardware and operating systems including Cisco, Windows, Linux, HP, Dell, FreeBSD, Juniper, Brocade, Netscaler, NetApp and many more.

From the Official Observium Wiki

After the initial task of Observium host installation and configuration, you need install and configure SNMP daemon on all of your client servers, aka all the servers that you want to monitor.  This can be quite annoying if you’re monitoring more then a handful of servers, thus I have taken the time to write bash script for installation of the SNMP daemon on a client server.

Script Usage:

This script has been tested on Debian 6/7, Ubuntu 12.04/13.10 and CentOS 5.10/6.5/7.0 – All other distributions are unsupported at this time.

wget www.sonicboxes.com/scripts/observium-client.sh
chmod 755 observium-client.sh
./observium-client.sh  <community>  <contact email>

EXAMPLE: 
[root@server ~]# ./observium-client.sh myservers obv@sonicboxes.com
Please enter where the server is physically located: New York

When you run the script, you need to define your community and your contact email.  You will be prompted for the servers geographical location, enter the proper name of the city for Observium’s map to function correctly.

SNMP Community:
An SNMP community is essentially text string that functions as a password. It authenticates Observium to your client server and stops anyone else from being able to poll your SNMP daemon and receiving detailed information about the health of your system. Your community does not need to be unique for every server, you can use the same community for all of your servers, all servers in a specific geographical location, it’s entirely up to you.

Adding a client to Observium:
When you’ve finished installing the SNMP daemon on all of the servers you wish to monitor, it’s time to set them up in Obserivum.  You’ll want to login to your Observium dashboard, hover your mouse over Devices, click Add Device.

Observium add device screen

For hostname enter the fully qualified domain name of the server you wish to monitor, it must be a domain you cannot use an IP address (Note: Observium does not support AAAA records), then enter the community you defined while installing the client.  All other options may be left in their default setting, scroll down to the bottom of the page and click Add Device.

If it was successfully added you should see a green box with a check next to it that says something similar to this: Device added (id = 21).  If you configured your cronjob properly, when you installed your Observium master, it will take about 5 minutes for your device to be polled and added to the map.

observium-dashboard
Observium dashboard showing server locations and status on a geographical map.

Repeat these steps for every server you wish to monitor and soon you will have a nice map showing you the health of all of your servers.

14 thoughts to “Observium Client Setup Script”

  1. Why can’t you use an IP address instead of domain name?
    If fully qualified name is required can the IP mapping be defined in hosts file?

    1. It *should* work just fine if you define it in the HOSTS file.

      Taken from the Observium FAQ:
      Because parts of the auto-discovery code and protocol relationship tracking code requires valid hostnames. We made an early architectural decision to make this name the primary identification for a host.

      I would really like to see proper support for AAAA records, it’s just good practice to have a FQDN as your hostname.

  2. I’m getting “./observium-client.sh: line 69: /bin/systemctl: No such file or directory” when trying to run the script. SNMP installed fine. CentOS 6.6 64bit.

    1. This is normal on CentOS 6, I’ve added that line to ensure compatibility with CentOS 7, haven’t gone back in to add a check for 6 vs. 7 yet.

    1. Victor,

      You’ll need to provide some more context in regards to where you’re seeing this error, along with OS & Version.

  3. Hiya,

    Had no problem before the summer using/downloading the script.
    Looks to me some change has been made to the certificate on the site.

    Connecting to http://www.sonicboxes.com|104.251.216.12|:443… connected.
    ERROR: cannot verify http://www.sonicboxes.com‘s certificate, issued by `/C=BE/O=Global Sign nv-sa/CN=AlphaSSL CA – SHA256 – G2′:
    Issued certificate has expired.
    ERROR: certificate common name `*.sonicboxes.net’ doesn’t match requested host name ‘www.sonicboxes.com’.
    To connect to http://www.sonicboxes.com insecurely, use `–no-check-certificate’.
    Unable to establish SSL connection.

    CentOS 5-7 does not seem to like LetsEncrypt.

    1. It was most likely just an issue with the SSL cert on my end being configured incorrect. I’ve resolved the issue and it should be functioning normally.

Leave a Reply

Your email address will not be published. Required fields are marked *