Command Line Interface for Pingdom API

At Gorilla Nation we use Pingdom to monitor our websites. We have a lot of websites so in order to automatically add/remove our websites from Pingdom I created a command line interface to Pingdom’s API. My command line interface is based on drcraig’s python module for Pingdom.

pingdom-cli allows you to easily create, read, update and delete Pingdom checks:

usage: ./pingdom-cli COMMAND CHECK_NAME [PARAMS]

    Commands:
        add       - add a check
        delete    - delete a check by name
        info      - get JSON dump of check info
        modify    - modify a check
        listnames - list all check names
        listids   - list all check ids
        listsites - list all HTTP checks
        credits   - return info on remaining checks and credits

Adding a check:

./pingdom-cli add druwerd.com
Adding druwerd.com
{u'check': {u'id': 443593, u'name': u'druwerd.com'}}

Modifying a check:

./pingdom-cli modify druwerd.com  '{"host" : "github.com/Druwerd" }'
{u'message': u'Modification of check was successful!'}

Deleting a check:

./pingdom-cli delete druwerd.com
Deleting check 443593
{u'message': u'Deletion of check was successful!'}
Advertisements
Tagged with: , ,
Posted in python

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: