This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Declarative configuration library for Uptime Robot

urconf is a Python library for Uptime Robot <https://uptimerobot.com/> API. It expects definition of all your contacts and monitors, and then issues API calls required to configure your Uptime Robot accordingly.

Usage

Install urconf using pip: pip install urconf

Write your monitoring configuration as a Python script:

import logging
import urconf

# urconf logs all operations that change configuration at the INFO level.
# Use DEBUG to see API call contents.
logging.basicConfig(level=logging.INFO)

config = urconf.UptimeRobot("api-key")  # dry_run=True enables dry mode

# Define contacts
email = config.email_contact("me@example.com")
boxcar = config.boxcar_contact("boxcar-api-key", "my boxcar")

# Define monitors
ssh = config.port_monitor("ssh on server1", "server1.example.com", 22)
web = config.keyword_monitor(
    "my site", "https://example.com/", "welcome to example.com!")
# More complex example with HTTP auth and non-standard monitoring interval
backend = config.keyword_monitor(
    "my backend", "https://admin.example.com", "Cannot connect to database",
    should_exist=False, http_username="admin", http_password="password",
    interval=20)

# Associate contacts with monitors
for monitor in (ssh, web, backend):
    monitor.add_contacts(email, boxcar)

# Sync configuration to Uptime Robot
config.sync()

Run the script to sync configuration.

Functionality

Currently implemented:

  • email and boxcar contacts;
  • keyword and port monitors.

Pull requests extending supported types of contacts or monitors are very welcome.

Caveats

Since uptimerobot API does not support modifying contacts, when contact modification is detected, urconf has to remove the old contact and re-add it. This means that e-mail contacts have to be re-verified manually again.

Development notes

  • refer to API documentation <https://uptimerobot.com/api> while implementing additional functionality;
  • run tox to run the tests in Python 2.7 and 3.4 environments;
  • run make html in docs/ to build documentation in HTML. It can be viewed in docs/_build/html/ afterwards.

License

urconf is licensed under the MIT license.

Release History

Release History

2016.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2016.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2016.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2016.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2016.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
urconf-2016.5.tar.gz (11.7 kB) Copy SHA256 Checksum SHA256 Source Jan 23, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting