ghast.server module

Flask server definition

class ghast.server.AlertScriptTrigger(api=None, *args, **kwargs)[source]

Bases: flask_restplus.resource.Resource

endpoint = 'alert_script_trigger'
get()[source]

Removing automatic/implicit support for GET requests

mediatypes()
methods = {'GET', 'POST'}
post()[source]

Handle incoming Graylog HTTP alert callbacks and trigger the configured alert script

On a POST request representing a Graylog HTTP alert callback trigger the configured alert script and return a JSON containing the path to the executed script and the return code of executing such script.

class ghast.server.HTTPSApi(app=None, version='1.0', title=None, description=None, terms_url=None, license=None, license_url=None, contact=None, contact_url=None, contact_email=None, authorizations=None, security=None, doc='/', default_id=<function default_id>, default='default', default_label='Default namespace', validate=None, tags=None, prefix='', ordered=False, default_mediatype='application/json', decorators=None, catch_all_404s=False, serve_challenge_on_401=False, format_checker=None, **kwargs)[source]

Bases: flask_restplus.api.Api

specs_url

Monkey patch for HTTPS

ghast.server.after_request(response)[source]

log details on the request and its served response