Skip to content

robbydyer/pysensu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pysensu

This is a simple python package to interact with Sensu

Installing

pip install pysensu

Example Usage

Pysensu uses the hostname and port where your sensu-api is running.

from pysensu import pysensu

client = pysensu.Pysensu("sensu.organization.com", port=4567)

# Stashes
client.create_stash('server1')
client.delete_stash('server2')
client.get_all_stashes()

# Clients
client.get_client('server1')
client.get_client_history('server1')
client.delete_client('server2')
client.get_all_clients()

# Checks
client.get_check('check_dns')
client.get_all_checks()
client.request_check('check_api_process', ['api-servers'])

# Events
client.get_all_events()
client.get_all_client_events('server1')
client.get_event('server1', 'check_dns')
client.delete_event('server1', 'check_dns')
client.resolve_event('server1', 'check_dns')

It can optionally use basic auth with or without SSL:

from pysensu import pysensu
client = pysensu.Pysensu("sensu.organization.com", port=4567, user='sensu', password='secret', ssl=True)
...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%