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


Release history Release notifications

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
outlyer_plugin-0.0.1-py3-none-any.whl (5.0 kB) Copy SHA256 hash SHA256 Wheel py3
outlyer-plugin-0.0.1.tar.gz (4.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page