Skip to main content
https://img.shields.io/pypi/v/arguspy.svg https://img.shields.io/pypi/dm/arguspy.svg https://travis-ci.org/crazy-canux/arguspy.svg?branch=master https://coveralls.io/repos/github/crazy-canux/arguspy/badge.svg?branch=master

arguspy

pic1

[Deprecated] As nagios is too old, this project is deprecated.

Please Move to another project [super-devops].

Arguspy 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 super_devops
$ pip install arguspy

How to use

Just import what protocol you need:

from arguspy.ftp_ftplib import Ftp
from arguspy.http_requests import Http
from arguspy.mssql_pymssql import Mssql
from arguspy.mysql_pymysql import Mysql
from arguspy.ssh_paramiko import Ssh
from arguspy.winrm_pywinrm import WinRM
from arguspy.wmi_sh import Wmi
from arguspy.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():
    plugin = Register()
    if plugin.args.option == 'action':
        plugin.action_handle()
    elif ...:
        ...
    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

  • Write unit tests in tests/

  • Write docs in docs/

  • Write examples in examples/

  • Compatible with Python3

  • vSphere monitoring

  • LDAP monitoring

  • SNMP monitoring

Contribution

[Contribution]

Authors

[Authors]

License

[License]

Metadata

Release files for arguspy 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arguspy 2.0.0
File Size Uploaded
arguspy-2.0.0.tar.gz 573.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arguspy 2.0.0
File Interpreter ABI Platform
arguspy-2.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 589.2 kB

Release files / arguspy-2.0.0.tar.gz

Download URL arguspy-2.0.0.tar.gz
Size 573.1 kB
Tags Source
SHA-256 checksum
How to use checksums
97ef028daacf8d0f19f4ff2b2a91f475cc3d0f136d74d54e66091d4c6790a6dc
BLAKE2b-256 checksum
How to use checksums
94a9b0f1e0a9f9e4df74d91a9664160942885a30e5876b611c772ca76ad2a8c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / arguspy-2.0.0-py2.py3-none-any.whl

Download URL arguspy-2.0.0-py2.py3-none-any.whl
Size 16.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
97061420992ceb451763ebb3520aaf6db12f52f26bf90523187257b455867911
BLAKE2b-256 checksum
How to use checksums
bf2e99dbaa003eba348721c1faf16330882145f7a04562361ccdc89b2c54b38a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.3.1

2 release files

1.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page