1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
.. _param-omhttp-errorfile:
.. _omhttp.parameter.input.errorfile:
errorfile
=========
.. index::
single: omhttp; errorfile
single: errorfile
.. summary-start
Specifies a file where omhttp records HTTP requests that return error responses.
.. summary-end
This parameter applies to :doc:`../../configuration/modules/omhttp`.
:Name: errorfile
:Scope: input
:Type: word
:Default: input=none
:Required?: no
:Introduced: Not specified
Description
-----------
Here you can set the name of a file where all errors will be written to. Any request that returns a 4XX or 5XX HTTP code is recorded in the error file. Each line is JSON formatted with ``"request"`` and ``"response"`` fields, example pretty-printed below.
.. code-block:: text
{
"request": {
"url": "https://example.com:443/path",
"postdata": "mypayload"
},
"response" : {
"status": 400,
"message": "error string"
}
}
It is intended that a full replay of failed data is possible by processing this file.
Input usage
-----------
.. _omhttp.parameter.input.errorfile-usage:
.. code-block:: rsyslog
module(load="omhttp")
action(
type="omhttp"
errorFile="/var/log/rsyslog/omhttp.error"
)
See also
--------
See also :doc:`../../configuration/modules/omhttp`.
|