Skip to content

Instantly share code, notes, and snippets.

# To run:
# `flask --app pydb --debug run #--without-threads`
# client examples:
# curl -X PATCH localhost:5000/set -d 'spam=eggs&foo=bar'
# curl localhost:5000/get?key=spam
from typing import Dict
from flask import Flask
# To run:
# `flask --app pydb --debug run #--without-threads`
# client examples:
# curl -X PATCH localhost:5000/set -d 'spam=eggs&foo=bar'
# curl localhost:5000/get?key=spam
from typing import Dict
from flask import Flask
# Description:
# This script receives pages in the formats
# /usr/bin/curl -d host="$HOSTALIAS$" -d output="$SERVICEOUTPUT$" -d description="$SERVICEDESC$" -d type=service -d notificationtype="$NOTIFICATIONTYPE$ -d state="$SERVICESTATE$" $CONTACTADDRESS1$
# /usr/bin/curl -d host="$HOSTNAME$" -d output="$HOSTOUTPUT$" -d type=host -d notificationtype="$NOTIFICATIONTYPE$" -d state="$HOSTSTATE$" $CONTACTADDRESS1$
#
# Based on a gist by oremj (https://gist.github.com/oremj/3702073)
#
# Configuration:
# HUBOT_NAGIOS_URL - https://<user>:<password>@nagios.example.com/cgi-bin/nagios3
#