2014-02-05 15:53:22 +01:00
|
|
|
## <a id="compat-logging"></a> Compat Logging
|
2013-10-18 20:05:08 +02:00
|
|
|
|
|
|
|
The Icinga 1.x log format is considered being the `Compat Log`
|
|
|
|
in Icinga 2 provided with the `CompatLogger` object.
|
|
|
|
|
2014-03-09 22:30:56 +01:00
|
|
|
These logs are not only used for informational representation in
|
2013-10-18 20:05:08 +02:00
|
|
|
external web interfaces parsing the logs, but also to generate
|
2014-02-05 15:53:22 +01:00
|
|
|
sla reports and trends in Icinga 1.x Classic UI. Futhermore the
|
|
|
|
`Livestatus` feature uses these logs for answering queries to
|
|
|
|
historical tables.
|
2013-10-18 20:05:08 +02:00
|
|
|
|
|
|
|
The `CompatLogger` object can be enabled with
|
|
|
|
|
2013-10-18 22:11:40 +02:00
|
|
|
# icinga2-enable-feature compatlog
|
2013-10-31 14:18:20 +01:00
|
|
|
|
2013-10-18 20:05:08 +02:00
|
|
|
By default, the Icinga 1.x log file called `icinga.log` is located
|
|
|
|
in `/var/log/icinga2/compat`. Rotated log files are moved into
|
|
|
|
`var/log/icinga2/compat/archives`.
|
|
|
|
|
|
|
|
The format cannot be changed without breaking compatibility to
|
|
|
|
existing log parsers.
|
|
|
|
|
|
|
|
# tail -f /var/log/icinga2/compat/icinga.log
|
|
|
|
|
|
|
|
[1382115688] LOG ROTATION: HOURLY
|
|
|
|
[1382115688] LOG VERSION: 2.0
|
|
|
|
[1382115688] HOST STATE: CURRENT;localhost;UP;HARD;1;
|
|
|
|
[1382115688] SERVICE STATE: CURRENT;localhost;disk;WARNING;HARD;1;
|
|
|
|
[1382115688] SERVICE STATE: CURRENT;localhost;http;OK;HARD;1;
|
|
|
|
[1382115688] SERVICE STATE: CURRENT;localhost;load;OK;HARD;1;
|
|
|
|
[1382115688] SERVICE STATE: CURRENT;localhost;ping4;OK;HARD;1;
|
|
|
|
[1382115688] SERVICE STATE: CURRENT;localhost;ping6;OK;HARD;1;
|
|
|
|
[1382115688] SERVICE STATE: CURRENT;localhost;processes;WARNING;HARD;1;
|
|
|
|
[1382115688] SERVICE STATE: CURRENT;localhost;ssh;OK;HARD;1;
|
|
|
|
[1382115688] SERVICE STATE: CURRENT;localhost;users;OK;HARD;1;
|
|
|
|
[1382115706] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;localhost;disk;1382115705
|
|
|
|
[1382115706] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;localhost;http;1382115705
|
|
|
|
[1382115706] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;localhost;load;1382115705
|
|
|
|
[1382115706] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;localhost;ping4;1382115705
|
|
|
|
[1382115706] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;localhost;ping6;1382115705
|
|
|
|
[1382115706] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;localhost;processes;1382115705
|
|
|
|
[1382115706] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;localhost;ssh;1382115705
|
|
|
|
[1382115706] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;localhost;users;1382115705
|
|
|
|
[1382115731] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;localhost;ping6;2;critical test|
|
|
|
|
[1382115731] SERVICE ALERT: localhost;ping6;CRITICAL;SOFT;2;critical test
|
|
|
|
|
2013-10-31 14:18:20 +01:00
|
|
|
> **Note**
|
|
|
|
>
|
2014-03-09 22:30:56 +01:00
|
|
|
> Semicolons in the check result output are replaced with colons because
|
2013-10-31 14:18:20 +01:00
|
|
|
> they are used as attribute separators.
|