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.

Files for outlyer-plugin, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size outlyer_plugin-0.0.1-py3-none-any.whl (5.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size outlyer-plugin-0.0.1.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page