Librenms’ API

Librenms is a very flexible network and server monitoring and alerting system.  I have it deployed at a number of companies based on the ease of installation, the fact that it auto discovers devices, it is updated frequently (typically 55 times a week) and supports pretty much every network device you can think of.

On top of that, the alerting can be tuned to match very specific cases as the back end is MySQL so you alerting conditions can match almost anything you can write a SQL query for.  A good example would be to only alert on certain interfaces that have a specific description in them such as “TRANSIT” where the device has a host name of “edge” and is only a 10Gbs connection (the interface name is ‘xe’).  Because you can group things by description or part of a host  name, you can just say anything with the string “edge” in the hostname should be considered a “edge router” so a group “ER” can be created for these devices.  With autodiscovery, as soon as you add a device, it will get automatically be put into the group that the rule/regular expression matches it.

One of the more interesting features is Libre’s API.  You can get pretty much any detail you want out of what Libre has collected and stored in the DB.  It will also create graphs for you on the fly.  One case I have had in the past is to create daily and weekly total bandwidth graphs for a set of specific ports on a group of switches.  The switch ports has a particular unique string I can match on so I was able to create a “group” called “peering” that included these ports over all of the switches.

I wrote this simple script called that asked for a graph for daily and weekly time frames.  I also added various options to the request such as don’t show the legend of interfaces and make the in and out directions all one color.  The other option is to make different colors for each interface.  We wanted a clean look so we went for the solid color.  The API doesn’t do everything you may want such as tilting the graph.  This is where I use the “convert” program from imagemagick to overlay some text at the top of the graph.  You can see the final result at the SFMIX site.

Why you should never use zip (wire) ties…

Lets get geeky…

A good argument against zip ties was very well documented by a friend of mine, Steve Lampen at Belden[1]. It gets down to the fact that, as with any wire, you have a transmission medium. Much like coax and open line, you need to have a constant impedance through out the length of the line, else your signal will not arrive on the other end the way you may want due to mis-matches in the impedance of the wire causing standing waves.

What determines the impedance of a transmission line is the dielectric (the material between the conductors, the diameter of the conductors and the distance from each other. Zip ties typically will change that with the amount of pressure that is used for installation of the ties.

Additionally, you have to be careful in how you tie your cables together. Everyone wants a neat looking installation and will likely have a nice even spacing between ties. With the change in the characteristic impedance of the ties and spacing them out evenly, you get a really big notch in the frequency response of the line that is based on the distance of the ties. It is actually better to randomly space the ties.

Cable lacing with flat waxed string is one of the better ways to tie down cable. It provides for less pressure on the cable and is also less of an obstruction when you have to work with adding more or moving cable around the area that you have previously tied down. Many colos and Central Offices (CO) I have worked with have banned wire ties for these reasons.

A great alternative to lacing is VELCRO[2] or hook and loop fabric straps. Velcro has the advantage that it can be quickly moved around and doesn’t bind or change the cable specification. Typically it is used to bind a bunch of cables together. You may still need to use lacing to tie that bundle down to a wire tray. RIPTIE was one of the first companies to sell VELCRO for cable bundling. They have nice individual ties but they are expensive. If you don’t mind not having a fancy tag on your ties, then just get a roll of VELCO from pretty much any dealer. Wrap the cable and cut as needed. You can even get different colors to identify different bundles. Such as using the resistor color code to indicated bundle numbers. At my last company, we would use one color for core cables and another color for customer facing cabling.

And again, check out Steve’s report.

[2] VELCRO is the registered trademark for the Velcro Industries‘ product