mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
2.6 KiB
2.6 KiB
system.metric_log
Contains history of metrics values from tables system.metrics
and system.events
, periodically flushed to disk.
To turn on metrics history collection on system.metric_log
, create /etc/clickhouse-server/config.d/metric_log.xml
with following content:
<yandex>
<metric_log>
<database>system</database>
<table>metric_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
</metric_log>
</yandex>
Example
SELECT * FROM system.metric_log LIMIT 1 FORMAT Vertical;
Row 1:
──────
event_date: 2020-09-05
event_time: 2020-09-05 16:22:33
event_time_microseconds: 2020-09-05 16:22:33.196807
milliseconds: 196
ProfileEvent_Query: 0
ProfileEvent_SelectQuery: 0
ProfileEvent_InsertQuery: 0
ProfileEvent_FailedQuery: 0
ProfileEvent_FailedSelectQuery: 0
...
...
CurrentMetric_Revision: 54439
CurrentMetric_VersionInteger: 20009001
CurrentMetric_RWLockWaitingReaders: 0
CurrentMetric_RWLockWaitingWriters: 0
CurrentMetric_RWLockActiveReaders: 0
CurrentMetric_RWLockActiveWriters: 0
CurrentMetric_GlobalThread: 74
CurrentMetric_GlobalThreadActive: 26
CurrentMetric_LocalThread: 0
CurrentMetric_LocalThreadActive: 0
CurrentMetric_DistributedFilesToInsert: 0
See also
- system.asynchronous_metrics — Contains periodically calculated metrics.
- system.events — Contains a number of events that occurred.
- system.metrics — Contains instantly calculated metrics.
- Monitoring — Base concepts of ClickHouse monitoring.