Blame man/container-exception-logger.1.asciidoc

Packit Service 0a6029
container-exception-logger(1)
Packit Service 0a6029
=============================
Packit Service 0a6029
Packit Service 0a6029
NAME
Packit Service 0a6029
----
Packit Service 0a6029
container-exception-logger - log from a container to a host
Packit Service 0a6029
Packit Service 0a6029
SYNOPSIS
Packit Service 0a6029
--------
Packit Service 0a6029
'container-exception-logger' [--no-tag | --tag TAG | --help]
Packit Service 0a6029
Packit Service 0a6029
DESCRIPTION
Packit Service 0a6029
-----------
Packit Service 0a6029
A tool designed to run inside of a container which can get its input
Packit Service 0a6029
outside of the container.
Packit Service 0a6029
Packit Service 0a6029
--no-tag::
Packit Service 0a6029
   do not add tag 'container-exception-logger' at the beginning of log message
Packit Service 0a6029
Packit Service 0a6029
--tag TAG::
Packit Service 0a6029
   define your own tag which will be added at the beginning of log message
Packit Service 0a6029
Packit Service 0a6029
Input format specification
Packit Service 0a6029
--------------------------
Packit Service 0a6029
It's possible to use whatever format of a message you want. Openshift logging
Packit Service 0a6029
system (fluentd) and ABRT use JSON. For this reason, we recommend using JSON
Packit Service 0a6029
too.
Packit Service 0a6029
Packit Service 0a6029
Mandatory elements
Packit Service 0a6029
~~~~~~~~~~~~~~~~~~
Packit Service 0a6029
Tools which parse container-exception-logger messages expecting the messages
Packit Service 0a6029
contain following elements:
Packit Service 0a6029
Packit Service 0a6029
'type'::
Packit Service 0a6029
   string - exception type - Python, Python3, Ruby, etc.
Packit Service 0a6029
Packit Service 0a6029
'executable'::
Packit Service 0a6029
   string - the executable which caused the problem
Packit Service 0a6029
Packit Service 0a6029
'reason'::
Packit Service 0a6029
   string - the reason for the problem
Packit Service 0a6029
Packit Service 0a6029
'backtrace'::
Packit Service 0a6029
   string - the backtrace of the problem
Packit Service 0a6029
Packit Service 0a6029
'time'::
Packit Service 0a6029
   int - seconds since 1970-01-01 00:00:00 UTC
Packit Service 0a6029
Packit Service 0a6029
Optional elements
Packit Service 0a6029
~~~~~~~~~~~~~~~~~
Packit Service 0a6029
Additional elements can be added without any limitation. For instance 'pid', 'uid',
Packit Service 0a6029
'msg', etc.
Packit Service 0a6029
Packit Service 0a6029
EXAMPLES
Packit Service 0a6029
--------
Packit Service 0a6029
Example of an input message:
Packit Service 0a6029
Packit Service 0a6029
   {"type": "Python3", "executable": "/usr/bin/will_python3_raise", "reason":
Packit Service 0a6029
   "will_python3_raise:3:<module>:ZeroDivisionError: division by zero",
Packit Service 0a6029
   "backtrace": "will_python3_raise:3:<module>:ZeroDivisionError: division by
Packit Service 0a6029
   zero\n\nTraceback (most recent call last):\n  File
Packit Service 0a6029
   \"/usr/bin/will_python3_raise\", line 3, in <module>\n", "time": 1521454815,
Packit Service 0a6029
   "pid": 23}
Packit Service 0a6029
Packit Service 0a6029
Example of the tool usage (MSG variable represents the message above):
Packit Service 0a6029
Packit Service 0a6029
   Container:
Packit Service 0a6029
    $ echo $MSG | container-exception-logger
Packit Service 0a6029
   Host's log:
Packit Service 0a6029
    Mar 19 14:59:04 localhost dockerd-current[981]: container-exception-logger - $MSG
Packit Service 0a6029
Packit Service 0a6029
   Container:
Packit Service 0a6029
    $ echo $MSG | container-exception-logger --no-tag
Packit Service 0a6029
   Host's log:
Packit Service 0a6029
    Mar 19 15:00:27 localhost dockerd-current[981]: $MSG
Packit Service 0a6029
Packit Service 0a6029
   Container:
Packit Service 0a6029
    $ echo $MSG | container-exception-logger --tag new-tag
Packit Service 0a6029
   Host's log:
Packit Service 0a6029
    Mar 19 15:00:27 localhost dockerd-current[981]: new-tag - $MSG
Packit Service 0a6029
Packit Service 0a6029
AUTHORS
Packit Service 0a6029
-------
Packit Service 0a6029
* ABRT team