For a long while now I've been brainstorming how I could leverage the API that's present in the Cisco Spark collaboration platform to create a bot. There are lots of goofy and fun examples of bots (ie, Gifbot) that I might be able to draw inspiration from, but I wanted to create something that would provide high value to myself and anyone else that choose to download and use it. The idea finally hit me after I started using Zabbix for system monitoring. Since Zabbix also has a feature-rich API, all the pieces were in place to create a bot that would act as a bit of middle-ware between Zabbix and Spark. I call the bot: Zpark.
Instead of relying on Zabbix to initiate an email or SMS to alert me of a new issue, I now route all notifications through Zpark and get notified right within my Cisco Spark client. And since I have the Spark client on all of my devices, I can receive alerts no matter where I am or what I'm doing.
- Relays new Zabbix alerts (which are generated from Zabbix events) to Spark user(s) and/or room(s).
- Relays Zabbix "all clear" alerts (which are generated when a recovery condition is met) to Spark user(s) and/or room(s).
- Configure Spark message recipients based on a combination of alert severity, time of day, host group, or other arbitrary criteria. eg:
- Send all alerts to the Spark room "Network Engineers" between 0800-2000 Mon-Fri
- Send alerts with severity "critical" or higher to engineers Joe, Jill, and Mark 24x7, using their Spark accounts "email@example.com", "firstname.lastname@example.org" and "email@example.com".
- Interrogate information from Zabbix by issuing commands to the bot on Spark. Eg, "show status".
Downloading and Usage⌗
I've open-sourced the bot and licensed it under a BSD-style license which makes it free (as in beer) for commercial and non-commercial use. You may also offer improvements, suggestions, or fixes.
You must run your own instance of Zpark that can talk to your Zabbix server. This is not a service that you can turn on and expect to work as is shown above.
Disclaimer: The opinions and information expressed in this blog article are my own and not necessarily those of Cisco Systems.