elb-log

API Reference

elb-log

ELB log manager for Common Lisp

ELB-LOG.UTIL

  • Variable *SAMPLE-KEY*
    "awslogs/123456789012/elasticloadbalancing/us-west-2/2014/02/15/123456789012_elasticloadbalancing_us-west-2_my-loadbalancer_20140215t2340z_172.160.001.192_20sg8hgm.log"
  • Variable *SAMPLE-LOG*
    "2014-02-15t23:39:43.945958z my-loadbalancer 192.168.131.39:2817 10.0.0.1:80 0.000073 0.001048 0.000057 200 200 0 29 \"get http://www.example.com:80/ http/1.1\" \"curl/7.38.0\" - -"
  • Variable *KEY-SCANNER*
    (cl-ppcre:create-scanner
     "^awslogs/([0-9]{12})/elasticloadbalancing/(.+?)/([0-9]{4}/[0-9]{2}/[0-9]{2})/[0-9]{12}_elasticloadbalancing_.+?_([^_]+)_([0-9]{8}t[0-9]{4}z)_(.+?)_(.+).log")
  • Variable *LOG-LINE-SCANNER*
    (cl-ppcre:create-scanner
     "^(\\d{4}-\\d{2}-\\d{2}t\\d{2}:\\d{2}:\\d{2}\\.\\d{6}z) (.+?) ([\\d.]+):(\\d+) ([\\d.]+):(\\d+) (.+?) (.+?) (.+?) (.+?) (.+?) (.+?) (.+?) \"(.+?) (.+?) (.+?)\" \"(.+?)\" (.+?) (.+?)$")
  • Function PARSE-DATE (date)
  • Function PARSE-TIMESTAMP (timestamp)
  • Function FORMAT-DATE (date)
  • Macro WITH-STUBS ((&rest fn-name-body-alist) &body body)

ELB-LOG.STRUCT

  • Struct ELB-LOG
    Struct of account information.
    CREDENTIALS
    BUCKET-NAME
    ACCOUNT-ID
    REGION
  • Function ELB-LOG-CREDENTIALS (instance)
  • Function (setf ELB-LOG-CREDENTIALS) (value instance)
  • Function ELB-LOG-BUCKET-NAME (instance)
  • Function (setf ELB-LOG-BUCKET-NAME) (value instance)
  • Function ELB-LOG-ACCOUNT-ID (instance)
  • Function (setf ELB-LOG-ACCOUNT-ID) (value instance)
  • Function ELB-LOG-REGION (instance)
  • Function (setf ELB-LOG-REGION) (value instance)
  • Function %MAKE-ELB-LOG (&key ((credentials credentials) nil) ((bucket-name bucket-name) nil) ((account-id account-id) nil) ((region region) nil))
  • Function MAKE-ELB-LOG (credentials bucket-name)
    Return #S(elb-log credentials bucket-name). CREDENTIALS should be (cons "AWS_ACCESS_KEY" "AWS_SECRET_KEY"). BUCKET-NAME should be bucket name of ELB log.
  • Struct LOG-BUCKET
    Struct of ELB log bucket.
    BUCKETS
    ELB-LOG
  • Function LOG-BUCKET-BUCKETS (instance)
  • Function (setf LOG-BUCKET-BUCKETS) (value instance)
  • Function LOG-BUCKET-ELB-LOG (instance)
  • Function (setf LOG-BUCKET-ELB-LOG) (value instance)
  • Function %MAKE-LOG-BUCKET (&key ((buckets buckets) nil) ((elb-log elb-log) nil))
  • Struct LOG-KEY
    Struct of ELB log object key.
    ACCOUNT-ID
    REGION
    DATE
    ELB-NAME
    TIMESTAMP
    ELB-IP
    HASH
    KEY
  • Function LOG-KEY-ACCOUNT-ID (instance)
  • Function (setf LOG-KEY-ACCOUNT-ID) (value instance)
  • Function LOG-KEY-REGION (instance)
  • Function (setf LOG-KEY-REGION) (value instance)
  • Function LOG-KEY-DATE (instance)
  • Function (setf LOG-KEY-DATE) (value instance)
  • Function LOG-KEY-ELB-NAME (instance)
  • Function (setf LOG-KEY-ELB-NAME) (value instance)
  • Function LOG-KEY-TIMESTAMP (instance)
  • Function (setf LOG-KEY-TIMESTAMP) (value instance)
  • Function LOG-KEY-ELB-IP (instance)
  • Function (setf LOG-KEY-ELB-IP) (value instance)
  • Function LOG-KEY-HASH (instance)
  • Function (setf LOG-KEY-HASH) (value instance)
  • Function LOG-KEY-KEY (instance)
  • Function (setf LOG-KEY-KEY) (value instance)
  • Function %MAKE-LOG-KEY (&key ((account-id account-id) nil) ((region region) nil) ((date date) nil) ((elb-name elb-name) nil) ((timestamp timestamp) nil) ((elb-ip elb-ip) nil) ((hash hash) nil) ((key key) nil))
  • Function MAKE-LOG-KEY (key)
  • Struct LOG-LINE
    Struct of ELB log line.
    TIME
    ELB-NAME
    CLIENT
    CLIENT-PORT
    BACKEND
    BACKEND-PORT
    REQUEST-PROCESSING-TIME
    BACKEND-PROCESSING-TIME
    RESPONSE-PROCESSING-TIME
    ELB-STATUS-CODE
    BACKEND-STATUS-CODE
    RECEIVED-BYTES
    SENT-BYTES
    REQUEST-METHOD
    REQUEST-URI
    REQUEST-PROTOCOL
    USER-AGENT
    SSL-CIPHER
    SSL-PROTOCOL
  • Function LOG-LINE-TIME (instance)
  • Function (setf LOG-LINE-TIME) (value instance)
  • Function LOG-LINE-ELB-NAME (instance)
  • Function (setf LOG-LINE-ELB-NAME) (value instance)
  • Function LOG-LINE-CLIENT (instance)
  • Function (setf LOG-LINE-CLIENT) (value instance)
  • Function LOG-LINE-CLIENT-PORT (instance)
  • Function (setf LOG-LINE-CLIENT-PORT) (value instance)
  • Function LOG-LINE-BACKEND (instance)
  • Function (setf LOG-LINE-BACKEND) (value instance)
  • Function LOG-LINE-BACKEND-PORT (instance)
  • Function (setf LOG-LINE-BACKEND-PORT) (value instance)
  • Function LOG-LINE-REQUEST-PROCESSING-TIME (instance)
  • Function (setf LOG-LINE-REQUEST-PROCESSING-TIME) (value instance)
  • Function LOG-LINE-BACKEND-PROCESSING-TIME (instance)
  • Function (setf LOG-LINE-BACKEND-PROCESSING-TIME) (value instance)
  • Function LOG-LINE-RESPONSE-PROCESSING-TIME (instance)
  • Function (setf LOG-LINE-RESPONSE-PROCESSING-TIME) (value instance)
  • Function LOG-LINE-ELB-STATUS-CODE (instance)
  • Function (setf LOG-LINE-ELB-STATUS-CODE) (value instance)
  • Function LOG-LINE-BACKEND-STATUS-CODE (instance)
  • Function (setf LOG-LINE-BACKEND-STATUS-CODE) (value instance)
  • Function LOG-LINE-RECEIVED-BYTES (instance)
  • Function (setf LOG-LINE-RECEIVED-BYTES) (value instance)
  • Function LOG-LINE-SENT-BYTES (instance)
  • Function (setf LOG-LINE-SENT-BYTES) (value instance)
  • Function LOG-LINE-REQUEST-METHOD (instance)
  • Function (setf LOG-LINE-REQUEST-METHOD) (value instance)
  • Function LOG-LINE-REQUEST-URI (instance)
  • Function (setf LOG-LINE-REQUEST-URI) (value instance)
  • Function LOG-LINE-REQUEST-PROTOCOL (instance)
  • Function (setf LOG-LINE-REQUEST-PROTOCOL) (value instance)
  • Function LOG-LINE-USER-AGENT (instance)
  • Function (setf LOG-LINE-USER-AGENT) (value instance)
  • Function LOG-LINE-SSL-CIPHER (instance)
  • Function (setf LOG-LINE-SSL-CIPHER) (value instance)
  • Function LOG-LINE-SSL-PROTOCOL (instance)
  • Function (setf LOG-LINE-SSL-PROTOCOL) (value instance)
  • Function %MAKE-LOG-LINE (&key ((time time) nil) ((elb-name elb-name) nil) ((client client) nil) ((client-port client-port) nil) ((backend backend) nil) ((backend-port backend-port) nil) ((request-processing-time request-processing-time) nil) ((backend-processing-time backend-processing-time) nil) ((response-processing-time response-processing-time) nil) ((elb-status-code elb-status-code) nil) ((backend-status-code backend-status-code) nil) ((received-bytes received-bytes) nil) ((sent-bytes sent-bytes) nil) ((request-method request-method) nil) ((request-uri request-uri) nil) ((request-protocol request-protocol) nil) ((user-agent user-agent) nil) ((ssl-cipher ssl-cipher) nil) ((ssl-protocol ssl-protocol) nil))
  • Function MAKE-LOG-LINE (string)

Also exports

  • ZS3:KEY
  • LOCAL-TIME:TIMESTAMP
  • COMMON-LISP:TIME

ELB-LOG

  • Variable *ELB-LOG*
    nil
    Default value of #S(elb-log).
  • Variable *LOG-BUCKET*
    nil
    Default value of #S(log-bucket).
  • Variable *LOG-DATE*
    nil
    Default value of date used by #'make-log-bucket.
  • Function MAKE-LOG-BUCKET (&optional (elb-log *elb-log*) (date *log-date*) max-keys)
    Return #S(log-bucket). ELB-LOG should be #S(elb-log). DATE should be an instance of loca-time:timestamp.
  • Macro WITH-ELB-LOG ((credentials bucket-name) &body body)
    Bind *elb-log* to #S(elb-log credentials bucket-name), *log-bucket* to #S(log-bucket bucket *elb-log*).
  • Macro WITH-SPECIFIED-DATE-ELB-LOG (date (credentials bucket-name) &body body)
    Bind *elb-log* to #S(elb-log credentials bucket-name), *log-bucket* to #S(log-bucket bucket *elb-log*), *log-date* to date.
  • Macro WITH-THIS-ELB-LOG ((credentials bucket-name) &body body)
    Bind *elb-log* to #S(elb-log credentials bucket-name), *log-bucket* to #S(log-bucket bucket *elb-log*), *log-date* to (local-time:today).
  • Function LOG-KEYS (&optional (log-bucket *log-bucket*))
    Return a list of #S(log-key).
  • Function LOG-LINES (log-key &key (bucket *log-bucket*))
    Return a list of #S(log-line).

Also exports

  • ELB-LOG.STRUCT:LOG-LINE-CLIENT-PORT
  • ELB-LOG.STRUCT:LOG-KEY-TIMESTAMP
  • ELB-LOG.STRUCT:LOG-LINE-ELB-NAME
  • ELB-LOG.STRUCT:LOG-LINE-REQUEST-METHOD
  • ELB-LOG.STRUCT:LOG-LINE-SSL-CIPHER
  • ELB-LOG.STRUCT:MAKE-ELB-LOG
  • ELB-LOG.STRUCT:LOG-KEY-DATE
  • ELB-LOG.STRUCT:LOG-KEY-ELB-NAME
  • ELB-LOG.STRUCT:LOG-LINE-TIME
  • ELB-LOG.STRUCT:LOG-LINE-BACKEND-PROCESSING-TIME
  • ELB-LOG.STRUCT:LOG-KEY-HASH
  • ELB-LOG.STRUCT:LOG-LINE-SSL-PROTOCOL
  • ELB-LOG.STRUCT:ELB-LOG-REGION
  • ELB-LOG.STRUCT:LOG-LINE-BACKEND
  • ELB-LOG.STRUCT:LOG-LINE-CLIENT
  • ELB-LOG.STRUCT:LOG-LINE-ELB-STATUS-CODE
  • ELB-LOG.STRUCT:LOG-LINE-REQUEST-PROCESSING-TIME
  • ELB-LOG.STRUCT:ELB-LOG-CREDENTIALS
  • ELB-LOG.STRUCT:LOG-KEY-ELB-IP
  • ELB-LOG.STRUCT:LOG-LINE-BACKEND-PORT
  • ELB-LOG.STRUCT:LOG-LINE-BACKEND-STATUS-CODE
  • ELB-LOG.STRUCT:LOG-BUCKET-BUCKETS
  • ELB-LOG.STRUCT:LOG-BUCKET
  • ELB-LOG.STRUCT:LOG-BUCKET-ELB-LOG
  • ELB-LOG.STRUCT:LOG-LINE-RECEIVED-BYTES
  • ELB-LOG.STRUCT:LOG-KEY
  • ELB-LOG.STRUCT:LOG-KEY-KEY
  • ELB-LOG.STRUCT:LOG-KEY-ACCOUNT-ID
  • ELB-LOG.STRUCT:ELB-LOG-BUCKET-NAME
  • ELB-LOG.STRUCT:LOG-LINE-REQUEST-URI
  • ELB-LOG.STRUCT:ELB-LOG-ACCOUNT-ID
  • ELB-LOG.STRUCT:LOG-LINE
  • ELB-LOG.STRUCT:LOG-KEY-REGION
  • ELB-LOG.STRUCT:LOG-LINE-USER-AGENT
  • ELB-LOG.STRUCT:LOG-LINE-SENT-BYTES
  • ELB-LOG.STRUCT:LOG-LINE-REQUEST-PROTOCOL
  • ELB-LOG.STRUCT:ELB-LOG

elb-log-test

No packages.