Skip to content
Snippets Groups Projects
Select Git revision
  • 9f9f51ce0a22071d0f5c7c1edbfc62f24a6335ff
  • master default
  • registry-mirror
  • nginx-default-site
  • acmeserver2
  • clickhouse
  • improve-dns-toplevel-probes
  • tabacco-in-container
  • rsyslog-modern-json
  • improve-service-discovery
  • prometheus-external-healthchecks
  • env-vars-in-include-paths
  • dns-resolver
  • service-turndown
  • use_proxy_protocol
  • loki
  • docs_operating
  • net-overlay_firewall_containers
  • webdiff
19 results

clickhouse.bootstrap.sql

Blame
  • clickhouse.bootstrap.sql 707 B
    CREATE DATABASE IF NOT EXISTS `logs`;
    
    SET allow_experimental_object_type=1;
    
    CREATE TABLE IF NOT EXISTS logs.syslog (
      timestamp DateTime,
      facility LowCardinality(String),
      severity LowCardinality(String),
      hostname LowCardinality(String),
      program String,
      tag String,
      message String,
      data JSON
    ) ENGINE = MergeTree()
      PARTITION BY toYYYYMMDD(timestamp)
      ORDER BY (timestamp);
    
    CREATE TABLE IF NOT EXISTS logs.http (
      timestamp DateTime,
      hostname LowCardinality(String),
      method LowCardinality(String),
      vhost String,
      uri String,
      status UInt16,
      bytes UInt64,
      referer String,
      user_agent String
    ) ENGINE = MergeTree()
      PARTITION BY toYYYYMMDD(timestamp)
      ORDER BY (timestamp);