Skip to content

Instantly share code, notes, and snippets.

View wolfdancer's full-sized avatar

Shane Duan wolfdancer

View GitHub Profile
@wolfdancer
wolfdancer / hostinfo.py
Created November 25, 2014 06:15
pull host info from agents under an acconut
#!/usr/bin/env python2.7
"""
This plugin will hit the monitoring API, pull entities, agents and host info from the account, and push to another service.
To use:
./hostinfo.py --user <username> --api-key <api key>
Todo:
=============
# The entities response is paginated at 100. Need to handle the case where there are more entities
@wolfdancer
wolfdancer / traceroute.py
Created March 31, 2016 18:11
Command line to use Monitoring to run traceroute
#!/usr/bin/env python3
"""
https://gist.github.com/wolfdancer/98e1234fff2bcd77a8a0
This script will hit the monitoring API, pull monitoring configuration on the specified entty and check,
then generate yaml config file
To use:
./export.py --user <username> --api-key <api key> --target <target> --target_resolver <target_resolver>
"""
@wolfdancer
wolfdancer / http.yaml
Last active July 15, 2016 15:54
Rackspace Montiornig HTTP Configuration
type: remote.http
label: ZNC Bouncer Web
disabled: false
period: 60
timeout: 30
target_hostname: irc.duan.io
target_resolver: IPv4
details:
method: GET
url: https://irc.duan.io