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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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