Monitoring notifications using Twitter DMs
I recently had an outage of my mail service, which caused my delivery mailqueue to grow and grow. I was sick by the time and didn’t noticed that until two days later. The restart of the service caused my server to nearly drop dead delivering all the mail, checking for spam and viruses.
Of course I had set up a monitoring (via the wonderful [[http://www.zabbix.com|Zabbix]]). But that notifies me via— you guessed it: mail. So I needed another approach. I roamed around the internet trying to find a decent web sms service providing a nice API that I could access from my Zabbix server. I didn’t found one.
After a while my mobile rang as it was receiving a push about a direct message on twitter (you can find me there [[http://www.twitter.com/dploeger_it|@dploeger_it]] or the more funny and mostly german-speaking [[http://www.twitter.com/dploeger|@dploeger]]) and I had an idea. I quickly asked google about a CLI twitter client and found the wonderful [[http://t.co/YqTYANjj8y|Twidge]].
Twidge is very easy to set up. For a debianish box, it’s just
apt-get install twidge
Afterwards run
twidge setup
and it will lead you to the usual Oauth-based authentication process. That will create a ~/.twidgerc-file with all details. After that just go ahead and type
twidge dmsend dploeger_it „Oh wow! I’ve set up twidge“
to send a direct message to @dploeger_it.
Of course, sending direct messages via twidge is subject to the usual rules of direct messages meaning that you have to follow the user and the user has to follow you.
Using this I quickly vamped up a shell script for Zabbix, that sends out Zabbix notification via a direct message to myself (which works in any case).
So now when something goes beserk, my mobile gets a push and spits out a nice „Pling“.
**Update**: Afterwards I noticed, that you should turn off url shortening in the twidgerc „twidge setup“ sets as a default, so your hostnames aren’t converted into short urls.
Calendar
M | D | M | D | F | S | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 |
Archive
- Januar 2024
- Dezember 2023
- April 2021
- März 2021
- September 2020
- Dezember 2019
- November 2019
- Oktober 2019
- Juli 2019
- Juni 2019
- Mai 2019
- April 2019
- März 2019
- September 2018
- August 2018
- Juli 2018
- März 2018
- Januar 2018
- Dezember 2017
- September 2017
- März 2017
- Februar 2017
- Januar 2017
- August 2016
- Mai 2016
- Dezember 2015
- November 2015
- August 2015
- März 2015
- Dezember 2014
- September 2014
- August 2014
- Juli 2014
- Februar 2014
- Oktober 2013
- September 2013
- August 2013
- Juli 2013
- Juni 2013
- Mai 2013
- April 2013
- November 2012
- Oktober 2012
- September 2012
- August 2012
- Juni 2012
- Mai 2012
- März 2012
- Februar 2012
- Januar 2012
- November 2011
- Juli 2011
- Juni 2011
- März 2011
- Februar 2011
- Januar 2011
- Dezember 2010
- November 2010
- April 2010
- Februar 2010