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

pymonitoringplugins

pymonitoringplugins is pure python code.

It’s a API packge for monitoring plugins, like Nagios, Icinga, Naemon, Shinken, Centreon, Opsview and Sensu.

[awesome-monitoring].

How to install

Use pip to install:

pip install pymonitoringplugins

How to use

Just import what protocol you need:

from pymonitoringplugins.ftp_ftplib import Ftp
from pymonitoringplugins.http_requests import Http
from pymonitoringplugins.mssql_pymssql import Mssql
from pymonitoringplugins.mysql_pymysql import Mysql
from pymonitoringplugins.ssh_paramiko import Ssh
from pymonitoringplugins.winrm_pywinrm import WinRM
from pymonitoringplugins.wmi_sh import Wmi
from pymonitoringplugins.wmi_subprocess import Wmi

Then write your own function monitoring class:

class YourClass(Ftp/Mssql/Ssh/WinRM/Wmi/Http/Snmp/...):
    def __init__(self):
        super(YourClass, self).__init__()
        self.logger.debug("Init YourClass.")

    def define_sub_options(self):
        super(YourClass, self).define_sub_options()
        self.your_parser = self.subparsers.add_parser(...)
        self.your_parser.add_argument(...)
        ...

    def your_handle(self):
        """Put your function monitoring code here."""
        # Default status is ok.
        status = self.ok

        # Call the API and get the monitoring data.
        # Read the document or check the API on python/ipython Interactive console.
        # help(Ftp/...)
        # dir(Ftp/...)
        ...

        #  Compare with the warning and critical value and change the status.
        ...

        self.shortoutput = "..."
        self.longoutput.append(...)
        self.perfdata.append(...)

        self.logger.debug("Return status and output.")
        status(self.output())

If you put more than one function monitoring class in one file(Not recommend):

class Register(YourClass1, YourClass2, ...):
    def __init__(self):
        super(Register, self).__init__()

Last step:

def main():
    # For multiple inherit
    # plugin = Register()
    plugin = YourClass()
    arguments = sys.argv[1:]
    if 'your' in arguments:
        plugin.your_handle()
    elif 'your2' in arguments:
        plugin.your2_handle()
    else:
        plugin.unknown("Unknown actions.")

if __name__ == "__main__":
    main()

How to extends

Check the TODO list, you can give test examples or documents.

Also you can pull request for your code.

TODO

  1. pymonitoringplugins/docs build with sphinx(2.0)
  2. http(1.2)
  3. snmp(1.3)
  4. Thresholders need follow nagios rules(1.4)

Documentation

[Documentation]

Contribution

[Contribution]

Authors

[Authors]

License

[License]

Release History

Release History

1.2.0.0

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

1.1.2.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

1.1.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
pymonitoringplugins-1.2.0.0-py2.py3-none-any.whl (35.4 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Nov 28, 2016
pymonitoringplugins-1.2.0.0.tar.gz (488.6 kB) Copy SHA256 Checksum SHA256 Source Nov 28, 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