Automate OutagesIO Internet monitoring on Linux

This article has been updated to describe our latest method of installing OutagesIO on your desktop or server.

In the previous method, you could have to manually complete a numbaer of steps but now it’s easier than ever. The new method involves downloading two files, putting them in the correct directories then running a few commands.

Note that you must have root/sudo access to your host and the service must run as root or user with full network access because the agent needs network in order to monitor the connectivity and provider.

Once completed, your agent will be started and stopped using simple service start/stop commands and will automatically start on boot.

First step

The first step is to create your account on app.outagesio.com and log into your control panel.
You can sign up here; https://app.outagesio.com/account/signUp

Once logged in, click on the Agents menu item. Click on the ‘Create software agent’ option.

Pick the Linux platform you need for your board or device.

Enter the local Internet providers business name.
Enter the address where this agent is being installed. You can enter whole or part address then click on ‘Click to auto fill address details’. This should auto fill all of the details on the right hand side of the page.
If the map shows the correct location, you are done and can click on Create at the bottom of the page.
If the address is not right, try entering a nearby address then you can move the map around and click where the address is. Once you have the right location, click on Create.

At this point, follow the instructions and you’ll soon have an agent running on your device.

Only two files, pre-created for you

You’ll download two files to your host. One is called otm.service and the other is called agentid.
If you cannot save them in the correct paths, simply save where you can and you can move them later from your terminal.

The files will go here;
‘/etc/systemd/system/otm.service’
‘/etc/agentid’

You will create a directory called ‘/otm’. This directory must be at the root of yout host as shown.

You will activate and automate the new service

systemctl daemon-reload – This reloads the services to make your new service live.
systemctl enable otm.service – This enables the service to start on boot so your agent automatically starts when you boot your host.
systemctl start otm.service – This manually starts, stops or restarts the service.

Note that starting, stopping or restarting the service can take several seconds for all of the steps the service takes care of.

Once these steps have been followed, the Linux agent will be downloaded and automatically started.

Always the latest version

The service will always download the latest version of the starter.sh. When the starter.sh starts, that in turn will always download the latest version of the program, will make it executable and will automatically start it.

Keep in mind that when you turn off your device, the agent service gets turned off as well which means it is no longer monitoring your Internet connection. You will see that your agent shows Inactive in your OutagesIO dashboard. After 30 minutes or so, that status will change to Disconnected.

If you experience an Internet disconnection, never restart the agent if it is running as it is monitoring the outage start, end and will send a report once your Internet is back up. If you restart it during an outage, that information will be lost and no report will be sent to your dashboard.

As always, if you have any problems, our forums are always there and we’ll help you through any problems you might face.