Power Cut, Anyone ?

Power Cut, Anyone ?

We've been improving Zabbix functionality and integration over the last few months and also analysing steps we take when validating or investigating the cause of an alert . When zabbix alerts us of a total loss of connectivity at one of customer sites, the first step for us is to check if there is a known power cut in the area. That involves visiting the ESB power check website , browsing to the town, locality or street and see if there's a known fault close to our clients building.

That's all grand and easy to do but why not automate that check and save valuable time and effort. At first glance it seemed like an ordeal but with a bit or research and the power of python it quickly became feasible.

Thanks to Jason Madigan's Github project, we got a head start with inputs and outputs from HTTPS requests to the ESB Powercheck site. By taking the basic logic of that code, we wrote a custom action module in python.

So the logic we applied was as follows:

  • If total remote connectivity to site is lost ( i.e. all firewalls and WANs/ISPs down from a remote point of view ) , run the script passing the customers' site geo-coordinates to the code.
  • The script then requests all known power faults and their geo-coordinates from the ESB Powercheck site and we filter it down to all faults within 2 kilometers of the customer site in question. This gives us the relevant data that we need.
  • We then update the zabbix item esb.status on the client's zabbix host entry to show the status, fault start date/time and estimated restore time along with number of customers affected to give a sense of scale and severity.
  • The zabbix esb.status item then has an associated trigger which generates the relevant alerts to our team.

All this is done in about 1 second so a lot more quickly and accurately than the old manual process with the benefit of a historical event record stored within zabbix.


With a bit of creative thinking , a modicum of skill , a mentality to constantly learn and a bit of spare time before Christmas , anything is possible :-)


Until next year.................


#smarthotspots #MoreThanWiFi #ManagedNetworks #zabbix









要查看或添加评论,请登录

smarthotspots的更多文章

社区洞察

其他会员也浏览了