Twitter

by acls us

Using Zabbix and Grafana to monitor TFL Underground Rail Lines

TFLTransport for London (TFL) publishes a lot of Open Data for Public consumption about the status of the London Underground, in real time. This data is updated every 30 seconds in XML format and is mostly documented.

As a proof of concept I wanted to setup Zabbix to monitor the status of the Underground Lines and present the results on a Grafana Dashboard.

The first step was getting hold of the XML data. Unfortunately the SDK does not say what the Domain is to get the XML from. A little Googling allowed me to find the XML I needed here.

The next step was to extract the data needed from the XML. I wanted to get the name of the TFL Underground Line, It's status and a description of any issues. A simple PHP script was used to get this data, format it and use the Zabbix Sender (zabbix_sender) to post it into a Zabbix Server. I organised the Zabbix data using a Zabbix host for each one of the Lines with a few Zabbix items (which must be created as "Zabbix trapper" item type) to hold the data. The PHP script is run on a Zabbix Server (just for convenience really) under cron every 60 seconds.

Finally I created a simple Grafana Dashboard using "Status Panel" panels to show the data.

Dashboard

Grafana Dashboard using Zabbix data

We have enhanced the monitoring we are using to show the current state of a local manufacturing production line by using a Grafana Dashboard. A number of displays are situated around the production line facility which show the current plan and actual production at the current moment. Data is fed to the screens in real time and Zabbix is used to monitor the display's network status and to capture the current displayed data, this is then displayed in a single Grafana Dashboard.

 Dashboard

If…. and the plastic Ducks

Random thoughts that hit you from time to time…..

If....I was watching the classic 1968 British, Lindsay Anderson, film “If….” and I remembered the debate, in the years after the film’s release, about the use of Colour and black & White screens in the film. There was much talk of why particular scenes where shot using which type of film. This went on until Lindsay Anderson explained that it was due to running short of cash and having to shoot the remaining scenes in Black & White. Films not being shot in chronological order, the Colour and Black & White scenes appears in an almost random order in the finished film.

It’s an example of a consequence of an alteration to a modern world process that gives a new outcome. Admittedly, in this case, that endless committees of Film Fans could debate the finer points of the artistic meaning behind Colour vs. Black & White scenes but it gave them something to do. 

Ducks

Then there’s the 28,00 plastics Ducks. With the vast majoring of international freight packed into forty foot containers stacked as high as possible on massive cargo ships, from time to time the odd container can fall off out at sea. Falling from an hight, the container can let it’s contents out. Now if it’s contents floats and are non-biodegradable they can go off on a long sea journey. This happened to a container of plastic bath Ducks which set off on something like a ten year voyage up to the North Atlantic and round to the East Coast of the United States. Giving rise to some very confused Americans who watched plastic Ducks make landfall on the the beaches of the Eastern Seaboard of the United States.

Once again, a consequence of an alteration to another modern world process. This time, causing some confused Americans but also giving a means for a research team to use a set of tracking devices (the Ducks) to study Ocean currents in the North Atlantic.

The point is, the alterations to these modern world processes cause unexpected but not necessarily bad effects on their systems. Giving rise to new opportunities. So this is about problems giving rise to opportunities, the storm cloud with the silver lining. When something goes wrong there may well be some good to come out of it.