Simple HTTP

services.simple_http.simple_http_service module

Simple HTTP Honeycomb Service.

class services.simple_http.simple_http_service.HoneyHTTPRequestHandler(*args, directory=None, **kwargs)[source]

Bases: http.server.SimpleHTTPRequestHandler, object

Simple HTTP Request Handler.

log_error(msg, *args)[source]

Log an error.

log_message(level, msg, *args)[source]

Send message to logger with standard apache format.

log_request(code='-', size='-')[source]

Log a request.

send_head(*args, **kwargs)[source]

Handle every request by raising an alert.

server_version = 'nginx'
version_string()[source]

HTTP Server version header.

class services.simple_http.simple_http_service.SimpleHTTPService(*args, **kwargs)[source]

Bases: base_service.ServerCustomService

Simple HTTP Honeycomb Service.

alert(request)[source]

Raise an alert.

httpd = None
on_server_shutdown()[source]

Shut down gracefully.

on_server_start()[source]

Initialize Service.

test()[source]

Test service alerts and return a list of triggered event types.

class services.simple_http.simple_http_service.ThreadingHTTPServer(server_address, RequestHandlerClass, bind_and_activate=True)[source]

Bases: socketserver.ThreadingMixIn, http.server.HTTPServer

Threading HTTP Server stub class.

services.simple_http.simple_http_service.service_class

alias of services.simple_http.simple_http_service.SimpleHTTPService