Twitter has been used for lots of experiments, both useful and just for fun. [FIRESTORM_v1] sent in his project that falls under the useful category. When he wanted a way to monitor his server’s power statistics, Twitter was a logical choice. Similar to the Tweet-a-Watt, he wrote a script that posts messages from APCUPSd to a Twitter account that he follows, and gets the updates on his phone. [FIRESTORM_v1] documents all of the scripts he used and the steps to get your server up and tweeting.
21 thoughts on “A Linux Server That Tweets Power Changes”
Leave a Reply
Please be kind and respectful to help make the comments section excellent. (Comment Policy)
Correct me if I’m wrong here, but is there anything twitter can do that doesn’t already exist? I just mean, what was ever wrong with all email/usenet/IM/etc protocols that already exist and work perfectly well?
Please can someone tell me what I can do with twitter that I can’t do already?
I agree, why couldn’t his scripts send a SMS directly to his phone? Why involve Twitter and add an extra layer of complication and possible failure?
Like this my nas currently tweets it uptime I got loads of things to add to it I like the idea of this too http://twitter.com/freenas_tomnas
my linux server has apcupsd installed and it has a cgi-script that apache can use to display the capacity/runtime/load graphically and show recent events and all the info from the ups. Why not take out the middle man (twitter) and just use that?
“…add an extra layer of complication and possible failure”
This is twitter we’re talking about. It’s an extra layer of complication, and _guaranteed_ failure at some point.
This is very useful: it can send report about your own behaviors, changes, and a lot informations…cool!
Upon reading this article I spend about 15 minutes and added the same functionality to my NUT installation. It was sending emails to my phone before, but doing it via twitter to SMS is much more direct.
So something that can be replicated with a 10-line shell script counts as a hack now?
I guess I’m a hardcore hacker, then.
Indeed. Can we stop the “Simple thing…. on Twitter!!!” stories please?
Please don’t feel like you need to keep up a certain volume of stories. I’m sure everyone appreciates you guys filtering out some of the not-so-amazing ‘hacks’.
I agree with tim — I’d be content with one solid hack per day, rather than numerous blinking, twittering dilduinos.
Then again…why am I bitching? I’m not paying to read the content of the site…
I suppose I can suck it up and just not read articles that don’t interest me ;)
twitter is lame, but this is actually a half decent use for it.
I’ve been receiving apcupsd alerts from my home server via email for 2 years now. Pretty simple shell scripts, and this one is no different… But mine also graphs the battery load over the day/week/month/year with mrtg, and actually speaks aloud a cool alert through festival text-to-speech when the main power fails. That’s the fun of shell scripting.
@error404
Indeed. But notice that you would need a crapload of scripting to do the same on windows. So this may count as a hack for them ;)
I think I’m going to tweet my mouse movement milestone or kph (keystrokes per hour).
There is no Arduino this does not qualify as a hack.
it’s sad to see all this animosity that’s been prevalent lately.
if you’re too 1337 to read twitter and arduino posts, then you should be quite capable of filtering them from your rss feeds.
@absolutezero
I totally agree. But I think the best thing we can do is to just *ignore* them.
I’m sure someone can hack an Arduino to filter out the… oh wait.
I don’t mind some of the “simple” hacks. If not just for ideas.
Twitter just seems to get used for everything, it’s just micro blogging,
I have even had requests from clients to have their server alerts published to twitter, and if they want to pay for it why not?
At least some people are taking the right stance on this and publishing their findings for others to use.
I have submitted two twitter uses which I had completely forgotten to write up until I saw this, (even though my code has been in subversion for over 3 months) to hackaday, using twitter for Nagios alerts and Subversion commit messages.
Cheers for sharing this one for gather APC data.
@oneiroi
> I have submitted two twitter uses which I
> had completely forgotten to write up until I
> saw this
> using twitter for Nagios alerts and Subversion
> commit messages.
Actually twitter for svn commit messages is a very good idea. I feel it is easier to keep track of development by watching tweeter history than by mailing lists.
I think I’m going to tweet git commits on a few projects of mine. git allows script hooks, so it will be simple.
visit http://hacking26.blogspot.com/ for mare info.