Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    pingdom 0.1.3

    Download button

    No screenshots available
    Downloads: 148  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Mike Babineau | More programs
    The Apache License 2.0 / FREE
    July 22nd, 2011, 01:37 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    pingdom description

    Pingdom Library

    pingdom is a 3rd-party Python interface to Pingdom's new REST API.

    Note that this API is still in beta.

    See README.md for details.

    For more information about the API, see Pingdom's blog post.

    Currently, the library supports:

    - Checks (create, delete, get, list)

    Love writing code? EA2D is hiring!

    Installation

    Install using the provided setup.py:

    sudo setup.py install

    Or install from PyPI:

    sudo easy_install pingdom

    Library Usage

    Set up a Pingdom connection:

    >>> import pingdom
    >>> c = pingdom.PingdomConnection(PINGDOM_USERNAME, PINGDOM_PASSWORD) # Same credentials you use for the Pingdom website


    Create a new Pingdom check:

    # The wrong way:
    >>> c.create_check('EA2D Website', 'http://ea2d.com', 'http')
    ERROR:root:PingdomError: HTTP 400 Bad Request returned with message, "Invalid parameter value: host"
    # The right way:
    >>> c.create_check('EA2D Website', 'ea2d.com', 'http')
    Check:EA2D Website


    Get basic information about a Pingdom check:

    >>> check = c.get_all_checks(['EA2D Website'])[0] # Expects a list, returns a list
    >>> dir(check)
    ['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'id', 'lasterrortime', 'lastresponsetime', 'lasttesttime', 'name', 'status', 'type']
    >>> check.id
    302632
    >>> check.status
    u'up'


    Get more detailed information about a Pingdom check:

    >>> check = c.get_check(210702) # Look up by check ID
    >>> dir(check)
    ['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'contactids', 'created', 'hostname', 'id', 'lasterrortime', 'lasttesttime', 'name', 'notifyagainevery', 'notifywhenbackup', 'resolution', 'sendnotificationwhendown', 'sendtoemail', 'sendtoiphone', 'sendtosms', 'sendtotwitter', 'status', 'type']
    >>> check.lasterrortime
    1289482981


    Delete a Pingdom check:

    >>> c.delete_check(302632)
    {u'message': u'Deletion of check was successful!'}



    Product's homepage

    Requirements:

    · Python
    · Pingdom account
    · simplejson

      


    TAGS:

    Pingdom library | Python interface | REST API | Python | Pingdom | library

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM