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]

        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
{u'check': {u'id': 443593, u'name': u''}}

Modifying a check:

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

Deleting a check:

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

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: