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
Abakus Status Checks
====================

.. image:: https://ci.frigg.io/eirsyl/abakus-status-checks.svg
:target: https://ci.frigg.io/eirsyl/abakus-status-checks/last/
:alt: Build Status

.. image:: https://ci.frigg.io/eirsyl/abakus-status-checks/coverage.svg
:target: https://ci.frigg.io/eirsyl/abakus-status-checks/last/
:alt: Coverage Status

This package is used together with Sensu_. Checks is managed with Puppet and reported to our #devops
channel on Slack.

Supported checks:

- CPU percent
- Load


Create a new check
------------------

- Create a new file in the abakus_checks/checks directory
- Import abakus_checks.utils.check.StatusCheck and use this as a base for your check.
- Give the check a name, decription and options

::

name = 'load'
description = 'Trigger errors based on load threshold. Load is divided by core count.'
options = [
click.option('--warning', default='2,1.5,1', type=str),
click.option('--critical', default='3,2,1.5', type=str),
]

- Implement the run method. Call self.ok, self.warning, self.critical with a message based on the
result.

- Register the check in abakus_checks/cli.py. Import the check in the check import block and
register the check.

::

from .checks import load
register_check(load.LoadCheck)

- You can use the tests.test_case.CLITestCase to test the check. This TestCase has a .invoke
method you can use to call the check.

::

class LoadCheckTestCase(CLITestCase):

@mock.patch('os.getloadavg', return_value=(0, 0, 0))
def test_load_ok(self, mock_loadavg):
result = self.invoke(['load', '--warning /'3.2.1/''])
self.assertEquals(result.exit_code, 0)

.. _Sensu: https://sensuapp.org/
Release History

Release History

0.0.1

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

0.0.0

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
abakus_status_checks-0.0.1-py2.py3-none-any.whl (9.6 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jan 19, 2016
abakus-status-checks-0.0.1.tar.gz (6.0 kB) Copy SHA256 Checksum SHA256 Source Jan 19, 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