Install Smokeping On Windows



Tutorial and steps related to the installation, configuration, and use of theSmokePing software product for monitoring latencywithin network environment.

  1. Smokeping is a very useful network monitoring tool but it’s also very complicated to install.
  2. Use the etc/config.dist file as a template to create your own smokeping configuration file. See smokepingconfig for details. Installing the webinterface. Copy the content of the PREFIX/htdocs directory to the place where your webserver expects its data. Maybe to /var/www/smokeping. Edit the smokeping.fcgi script to point to your smokepingcgi script.

In this video I show you how to install smokeping on debian and configure some basic options URL to smokeping @mancinitech w. Popular Alternatives to SmokePing for Windows, Linux, Mac, Software as a Service (SaaS), Web and more. Explore 17 apps like SmokePing, all suggested and ranked by the AlternativeTo user community.

Background

The ability to monitor your network environments can be handled via a number of various tools andservices, not the least of which are SaaS products provided through external vendors. If you are the“do it yourself” kind of engineer, exploring a tool such asSmokePing is an easy and affordable (free) way toget some very quick latency information exposed to your customers.

This post will explore the installation, configuration, and (basic) usage of the SmokePing product.It is intended to be a primer on the subject, not a full/in-depth tutorial and, as such, some aspectsof the “productization” of the service will not be included.

Underlying Compute Technology/Ecosystem

This tutorial utilizes/makes the following assumptions about your compute infrastructure. Although theinstructions can be extended to accommodate cloud-based and/or other infrastructure environments quiteeasily, all details are explained with respect to local development for the purposes of simplicity:

  • Hypervisor Technology: VirtualBox
  • Provisioner: Vagrant
  • Number of VMs: 2
  • Operating System: Ubuntu 16.04
  • Arch: 64-bit
  • CPUs: 2
  • Mem: 4GB
  • Disk: 50GB

This tutorial is built with 2 virtual machines serving as the compute resources - one of the resourceswill be the Master/UI instance while the other will be a dedicated poller/Slave instance. The followinghostnames and corresponding IP addresses will be used for the 2 virtual machine instances:

  • node1.localhost: 10.11.13.15
  • node2.localhost: 10.11.13.16

The following software versions are used as part of this tutorial - again, versions can/may be changed,but there is no guarantee that using different versions will result in a working/functional technologystack. The versions listed are such that they represent a fully-functional and working technologyecosystem:

  • RRDTool: 1.6.0 (dependency)
  • Apache2: 2.4.18-2 (Master - UI web server)
  • SmokePing: 2.6.11 (internal version 2.006011)

Finally, the code blocks included in this tutorial will list, as a comment, the node(s) that the commandsfollowing need to be run on. For instance, if required on both nodes, the code will include a comment likeso:

If the code block only applies to one of the nodes, it will list the specific node it applies to like so:

All commands assume that your user is vagrant and the user’s corresponding home directory is /home/vagrantfor the purposes of running sudo commands.

Install Smokeping On Windows

End State Architecture

At the end of this tutorial, the following end-state architecture will be realized:

Prerequisites/Dependencies

SmokePing requires several components to be installed prior to installing the software on yourhost system. Most Ubuntu-based distributions come with Perl pre-installed - if this is not thecase, install Perl for your system using the native package manager. In addition, a C-compileris required in order to install the versions of software specific to this tutorial. Note thatwe will install some prerequisites for both nodes up front in preparation for the Slave nodeconfiguration towards the end of the tutorial, while other packages are strictly installed onthe Master due to the capabilities desired (i.e. sendmail for Email handling):

Install Smokeping On Windows

Once Perl is installed, you will need RRDTool - to install the version used in this tutorial,perform the following steps. Note that the actual build and installation of the rrdtool softwareis only done on node1.localhost where the actual graphs are generated:

Following the installation, running the following command should result in the output of therrdtool version installed:

This SmokePing installation is going to use the Apache web server with CGI support to display its webpages - install the Apache software/supporting module and create the SmokePing directory for servingthe application via Apache:

Finally, we need to configure some defaults related to resolving the hostnames between the node1.localhostand node2.localhost nodes. Update the /etc/hosts file on each node to provide name resolution:

Installation

Windows

Once the installation prerequisites are in place, you can download and install the SmokePing product.First, download, extract, and compile the SmokePing package for the version you wish to install tothe Master and Slave nodes:

To ensure that the appropriate Perl modules are in place, run the setup script to install any thatmay be missing, along with the apt-get install command for the librrds-perl package. Although theRRD files and corresponding graphs are only generated on the Master instance, the build of theSmokePing software will ultimately fail if the librrds-perl package is not installed, so we willinstall this on both instances:

Once the package has been extracted and dependencies for the Perl environment are in place, proceedto building and installing the software:

If the above commands were successful, you should be able to run the following and receive outputcorresponding to the version of SmokePing installed:

Configuration

Smokeping Install

Now that the SmokePing application code is in place, we can continue to configure the applicationfor use. In this particular installation, the configuration file was created with a trailing .distname. This will cause some issues with the way the scripts are expecting the configuration file toexist and, as such, we will create a symlink to the configuration file without the .dist trailingname to ensure everything works as expected:

Edit the /opt/smokeping/etc/config file for your environment. There are a lot of configuration optionsavailable and the format is quite complicated - we will focus on a few paramaters to start with:

In addition to the above configuration changes, re-open/edit the configuration file to replacethe section ++ James with the Master/localhost configuration information so that data can bevisualized for the Master instance:

Before starting the application, several directories must exist in order for the out of boxconfiguration to function as expected, and certain permissions must be in place for the outof box security to work:

The Apache server needs to be configured to serve the web interface for the SmokePing application -to configure this, copy the files from the SmokePing htdocs folder into the respective Apache webfolder, and edit the Apache default virtual host file:

Once the configuration file is in place, enable the FastCGI and SUExec modules and restart theApache web server:

Now that the web server is up and running, visit the web page located at http://10.11.13.15/ andyou should see the SmokePing web interface presented to you. There is likely no data due to not yethaving run any pollers to collect information.

We need to start the SmokePing daemon in order to start generating some data and graphs. Start bylaunching the application in the foreground (“debug” mode) and inspecting for errors:

After some time, the output will generate some results that ultimately result in some graphs beinggenerated. Navigate back to your browser and reload the webpage - in the left menu navigation,select the “Targets -> node1.localhost” options to view the generated graphs. If no data appears butno errors are seen in the command-line debug session, leave the agent running in the foreground fora few minutes until the page appears with data.

Config

If all is successful, you can terminate the foreground agent job and launch the smokeping agent indaemon mode to have it run continuously in the background on your Master node like so:

Refresh your web page and you should see updates to the graphs for the Master node (node1.localhost).The graph will appear towards the top of the page. You can also select the “Test -> node2.localhost”node to view the graph data for the Slave node as well (being pinged from the Master).

Slave Poller

Now let’s add a secondary poller on the Slave “node2.localhost”. This poller will check both theMaster and the Slave and will demonstrate distributing pollers on separate machines that reportback to the Master instance. Note that in order for the following configurations/setup to work, theresult of the command hostname on the node2.localhost node should report node2.

First, we need to configure the Master instance to accept the Slave communication as well as tell theSlave which nodes to poll - update the configuration sections as follows on the Master:

Before reloading the configuration, we need to update the secret for the Slave to be able tocommunicate with the Master, and ensure the Apache process can read it:

Next, reload the configuration on the Master node for the new Slave information to take effect,and ensure that the Apache process is also restarted for this to work:

Once you’ve updated the configuration on the Master node, we need to set up the Slave instance.Note that if you try to view the web interface at this point you will likely see various errorscorresponding to missing ‘slave1’ data/graphs - this is because the Slave has not yet beenconfigured and communicated with the Master for the first time.

If you ran the commands to install the SmokePing on the Slave instance in parallel as the instructionsat the beginning of this tutorial stated, you can simply proceed with the next steps (if you didnot follow the instructions and do not yet have the SmokePing application installed, go back andrepeat the relative steps for the Slave instance above).

First, there are a few Perl dependencies we need to install by hand since we did not install Apacheand/or the relative dependencies associated with the Master instance:

Once complete, create a secret file on the Slave so that when the process starts it knows how tocommunicate with the Master instance, and secure the file:

Now you are ready to launch the poller:

If you received output as indicated, your Poller/Slave instance has successfully establishedconnectivity and is communicating with the Master. If you received some other kind of output,inspect the log output to see what may have gone wrong.

Navigate back to the SmokePing web interface and refresh/reload the web page. You should now seestacked graphs showing poller results for the Master node poller along with a secondary graphindicating the results from the node2.localhost (Slave) poller. If there is no data within thesecondary graph, give the poller a few minutes to finish its first round of polling and sendingthe results to the Master for rendering.

Smokeping install

There are many more additional capabilities that are possible with this tool - this primer isstricly a starting point. Visit the project page for more information about the tool and itsoperation.

Disclaimers

As stated in prior tutorials, this tutorial is in no way intended to be a ‘production-ready’setup. There are various tuning and configuration parameters, security settings, and overallarchitecture/directory structure changes that would need to be made in order to make thistutorial match a production-ready setup of the SmokePing application. It is intended to be aprimer of installing and configuring the application for basic use and, as such, the knowledgecontained within can be leveraged to further develop a more production-ready solution.

Credit

The above tutorial was pieced together with some information from the following sites/resources:

How To Use Smokeping

Menu

  • Documentation

Gold Sponsors



Reading the Graphs
Notes on reading the graphs.
smokeping_examples
Examples of Smokeping configuration
smokeping_extend
Notes on extending Smokeping
smokeping_install
How to install SmokePing
smokeping_master_slave
How to run multiple distributed instances of SmokePing
smokeping_upgrade
Notes on upgrading Smokeping
smokeping
Commandline tool for SmokePing
smokeping_cgi
SmokePing webfrontend
smokeinfo
poll smokeping site for numeric information
smokeping_config
Reference for the SmokePing Config File