Sending Windows data to Bosun using Scollector

I have previously written about how to send .net application data to Bosun however what if we wanted to send data from our OS to Bosun? Well for that we need Scollector!

The first thing we need to do is download the correct binary for our OS, these can all be found on the Scollector homepage however for this article we will just be focusing on the Windows version. Once downloaded create a folder for Scollector on C:\ (this can be anywhere really but this makes it nice and easy). One thing that also makes things easy is to rename the exe to just Scollector. Put the exe in the directory you have just made. Now open a Powershell session as administrator and run the following command to install Scollector as a Windows service.

c:\Scollector\Scollector.exe -winsvc="install"

Now we need to modify the service so it can connect to our Bosun server, for that we need to open the registry editor (run > regedit) and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\scollector. We should see an entry called ImagePath which points to our Scollector exe.

We now need to right click on this entry and select modify. Add the following parameter to the Value data (the ip and port correspond to your Bosun server).

Now all we need to do is open Services (run > services.msc), find scollector and start the service. If everything has worked the service should start and its status should be ‘Running’. If the service won’t start then check the Windows Event Viewer and navigate to Windows Logs > Application.

If we now open our Bosun server and click Items our host should be listed under Hosts. Once clicked we should be greeted with every metric we could possibly need for our OS!

Clicking ‘Available Metrics’ will show us everything that is being sent and we can use any of these to setup alerts.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.