Sunday, November 27, 2011

Using Twitter To Monitor Your Linux Server!

Yes, you can use Twitter for monitoring your server. I won't say that it is a complete monitoring solution nor I will ask you to throw away your existing monitoring mechanisms. In fact the script I am talking about, MYST (AGPLv3), was not created for this purpose. It was created so that I could tweet without using browser with inspiration from Hiemanshu, a Fedora contributor, using python-twitter api.

It is just a fun script which you can use to tweet the health of your server periodically to a private account which only a moderated set of people can follow. So here is how you do it:

Step 1: Create a Twitter account. From settings page, mark it private.

Step 2: Open Twitter's new application page and fill the form. Put the name as 'MYST' and website as ''.

Step 3: Download 'MYST: Twitter for Shell' and extract it.

Step 4: Open your application 'MYST' listed at Twitter's apps page and fill .myst.conf with the relevant details.
Copy it to your home directory.

Step 5: Install python-twitter (version 0.82) on your server along with dependencies.

Step 6: Put a cron with appropriate time (and path to scripts) to execute the following periodically:

./ update `./`

This is a cool method to check out the system health and you can modify to add more parameters to monitor.
Please contribute to the MYST project on


  1. Hi, I have tried your application. But it show error.

    ./ update `./`
    Traceback (most recent call last):
    File "./", line 50, in ?
    user=twitter.Api(consumer_key=conskey, consumer_secret=conssec, access_token_key=accstkn, access_token_secret=accssec)
    TypeError: __init__() got an unexpected keyword argument 'access_token_key'

    I have completed all step like your guide. Please correct me

  2. Hi Ngapak-ers,
    You are getting this error because you are using older version of python-twitter. You need to install the latest version. Download it from [1] and follow the instruction given on their home page at [2]. Make sure that you have all the required dependencies.


  3. How about this error?

    Traceback (most recent call last):
    File "./", line 64, in ?
    File "build/bdist.linux-x86_64/egg/", line 2799, in PostUpdates
    File "build/bdist.linux-x86_64/egg/", line 2765, in PostUpdate
    File "build/bdist.linux-x86_64/egg/", line 3763, in _FetchUrl
    File "build/bdist.linux-x86_64/egg/oauth2/", line 493, in sign_request
    TypeError: 'module' object is not callable

  4. Found a similar bug in tweepy at [1]. Looks like this is because of locale. Maybe you are using a locale which is not supported by python-twitter. I'll try to dig more and get it fixed.


  5. What is locale?

    i will wait your next information

  6. Locale defines things which are local to your computer like language, fonts etc. Read more about it on wikipedia.

  7. Its really a nice post, the content of this blog is really awesome and extraordinary.And also please Read link bvba Woodstone which provide information server monitoring & monitoring tools