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