Universal API for different monitoring systems
Project description
unimonapi
Universal API for different monitoring systems: use built-in system types or extend with your own.
Currently supported API is Zabbix. But you can extend the package with any monitoring system you want.
Just imagine: universal API for every system!
Getting Started
Installing
To install the package simply run:
pip install unimonapi
Using
The unimonapi CLI is available just after installation:
zabbix_cli.py --help
Or of course you can use the package for coding:
from unimonapi import ZabbixAPI
api = ZabbixAPI('http://zabbix-web', 'Admin', 'zabbix')
for problem in api.get_problems():
print problem
Extending
Extending the package is simple:
import requests
from unimonapi import MonitoringAPI
from unimonapi import Event
class MyMonAPI(MonitoringAPI):
def __init__(self, url):
self.url = url
def get_problems(self, severities=None, groups=None):
problems = []
for p in requests.get(self.url).json():
if severities is None or p['severity'] in severities:
if groups is None or p['group'] in groups:
event = Event(Event.PROBLEM, True, p['severity'], p['host'], p['text'], p['id'])
problems.append(event)
return problems
License
This project is licensed under the MIT License - see the LICENSE file for details
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
unimonapi-0.0.1.tar.gz
(11.8 kB
view hashes)
Built Distribution
unimonapi-0.0.1-py2-none-any.whl
(17.0 kB
view hashes)
Close
Hashes for unimonapi-0.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c1c972c478e435e62163e05af7e1b74cba125d2d9cc43eabd3893c6c7874986 |
|
MD5 | 8f40f8f1b6eb0b4ed2f74bff959d86a4 |
|
BLAKE2b-256 | 7dff5af83df4a9905ab3eb1ca94820ef6e5ff3d9aa2fbacbb2418441a6db6b30 |