Skip to main content

Library for building native plugins for the Outlyer monitoring agent

Project description

Outlyer Plugin

api for definining native Outlyer Plugins

class Plugin:
    """
    The Plugin API.
    Users must derive from this class when implementing a custom Plugin
    """
    def collect(self) -> Status:
        """Perform collections operations for the provided Target"""

    def gauge(self, name: str, labels: Optional[dict]) -> Gauge:
        """Get a Gauge instance for the specified Name/Labels"""

    def counter(self, name: str, labels: Optional[dict]) -> Counter:
        """Get a Counter instance for the specified Name/Labels"""

    def get(self, key: str, default: any) -> any:
        """Get a Target config property"""

Usage

from outlyer_plugin import Plugin, Status

class MyPlugin(Plugin):
    def collect(self):
        self.gauge(f'sys.cpu.user.pct').set(55)
        return Status.OK

if __name__ == '__main__':
    # To run the collection
    sys.exit(MyPlugin().run())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

outlyer-plugin-0.0.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

outlyer_plugin-0.0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file outlyer-plugin-0.0.1.tar.gz.

File metadata

  • Download URL: outlyer-plugin-0.0.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.0

File hashes

Hashes for outlyer-plugin-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d2410a932c1a557f3384b8d6e712639541f65e448740c618157b14514989a797
MD5 69d44ae9f406d8dcc721e8d7a27d435a
BLAKE2b-256 3af29c3baa12971c30783364f57ea899d9118fb7d496785f060a10b15e5b6306

See more details on using hashes here.

File details

Details for the file outlyer_plugin-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: outlyer_plugin-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.0

File hashes

Hashes for outlyer_plugin-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0d79fecf4336de4e65d7d83344264a8f7cb8c584add66cbf4845f5f8bcb43d78
MD5 8a8ebdbc5f7c41ea07b3b4787f810e70
BLAKE2b-256 662bfaa0b060effb0fb81e718acdf98496bd378e3b15a01afd5fdb9cdb405588

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page