[GUIDE] Quickly deployable Sonar Poller image for RPI3B+


#1

I’ve recently run into the problem of needing a quickly deployable poller that’s easy on space and cost. (not asking for much, right?) On small to medium sized networks, (I’ve only tested with about 50 devices at once using default poller settings, though I imagine a lot more can be done) I’ve found that a Raspberry Pi 3 B+ does the job quite nicely. However, the Raspbian OS does not like the poller software, so you have to use an Ubuntu 16.04 image. The problem is, there hasn’t been an RPI3B+ specific image of Ubuntu 16.04. I’ve created my own, and it seems to run flawlessly. I currently have three of these pollers deployed at the actual network sites, and I’ve not had any issues as of yet. A couple of these pollers have been running nearly 6 months. That being said, this is not an officially distributed image, and it’s expected to be used at your own risk. This tutorial is to be used in tandem with Sonar’s documentation on poller deployment.

Ubuntu 16.04, RPI3B+ image:
https://drive.google.com/open?id=1jKl3t-X-L83WirFeh_Tkri-7gaBEtatc

  1. flash image using Etcher.io (https://etcher.io) then boot up the raspberry
  2. login using these credentials:
    user: ubuntu
    pass: raspberry
  3. do “passwd” to change the “ubuntu” user’s password
  4. do “sudo hostnamectl set-hostname (hostname)” to change your hostname
    4a) make sure you also do “sudo nano /etc/hosts” and add your new hostname to the top of the file, but below localhost. ie:
    127.0.0.1 localhost
    127.0.0.1 (your new hostname)
  5. when you’re ready, do these:
    5a) the command below will let you edit a file where you must put in your
    Sonar API key and Sonar URL:
    “sudo -u sonarpoller nano -w /opt/poller/.env”
    5b) this command sets the poller to auto-update:
    “sudo cp poller_upgrade /etc/cron.d”
    5c) if you want to check for updates right now, then:
    “sudo php /opt/poller/bin/checkForUpgrades.php”
  6. to test that the poller works, finally type:
    “sudo -u sonarpoller php /opt/poller/bin/getWork.php”
    if it’s successful, it’ll mention something like “Enqueuing ICMP/SNMP job…”
  7. enable your poller in Sonar and deploy the device

If there’s any questions, I’m happy to help! Please leave feedback if you’ve tried this, I’m curious to know what the community thinks about it!

(note: if I’m posting this in the wrong spot, please also let me know about that)


#2

This is awesome! I’m surprised you can get much monitoring out of a Pi, but that’s great to hear it’s working well.