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 | RSS feed
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)
Built Distribution
Close
Hashes for outlyer_plugin-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d79fecf4336de4e65d7d83344264a8f7cb8c584add66cbf4845f5f8bcb43d78 |
|
MD5 | 8a8ebdbc5f7c41ea07b3b4787f810e70 |
|
BLAKE2b-256 | 662bfaa0b060effb0fb81e718acdf98496bd378e3b15a01afd5fdb9cdb405588 |