File: loggers.rst

package info (click to toggle)
simplemonitor 1.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,520 kB
  • sloc: python: 8,725; sh: 258; makefile: 74; javascript: 69
file content (85 lines) | stat: -rw-r--r-- 1,974 bytes parent folder | download | duplicates (2)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Logger Configuration
=====================

Loggers record the state of every monitor after each interval.

Loggers are defined in the main configuration file, which by default is :file:`monitor.ini`. The section name is the name of your logger, which you should then add to the ``loggers`` configuration value.

.. contents::

Common options
--------------

These options are common to all logger types.

.. confval:: type

    :type: string
    :required: true

    the type of the logger; one of those in the list below.

.. confval:: depend

    :type: comma-separated list of string
    :required: false
    :default: none

    a list of monitors this logger depends on. If any of them fail, no attempt will be made to log.

.. confval:: groups

    :type: comma-separated list of string
    :required: false
    :default: ``default``

    list of monitor groups this logger should record. Use the special value ``_all`` to match all groups. See the :ref:`group<monitor-group>` setting for monitors.

.. _logger-tz:

.. confval:: tz

    :type: string
    :required: false
    :default: ``UTC``

    the timezone to convert date/times to

.. confval:: dateformat

    :type: string
    :required: false
    :default: ``timestamp``

    the date format to write for log lines. (Note that the timezone is controlled by the :ref:`tz<logger-tz>` configuration value.) Accepted values are:

    * ``timestamp`` (UNIX timestamp)
    * ``iso8601`` (``YYYY-MM-DDTHH:MM:SS``)

.. confval:: heartbeat

    :type: bool
    :required: false
    :default: false

    if set, the logger only logs for monitors which executed on an iteration. Intended to be combined with the :ref:`gap<gap>` property of a Monitor.

.. confval:: enabled

    :type: boolean
    :required: false
    :default: true

    Set to false to turn off the logger

.. _loggers-list:

Loggers
-------

.. note:: The ``type`` of the logger is the first word in its heading.

.. toctree::
   :glob:

   loggers/*