Getting StartedLocal Development

Local Development

To get the project up and running on your local machine, follow these steps:

Clone the repository

git clone https://github.com/duyet/clickhouse-monitoring

Install dependencies

bash npm install

Setup env

Create a .env.local file by copying the .env.example file and filling in the required environment variables:

  • CLICKHOUSE_HOST: ClickHouse host, for example http://localhost:8123
  • CLICKHOUSE_USER: ClickHouse user with permission to query the system database.
  • CLICKHOUSE_PASSWORD: ClickHouse password for the specified user.
  • CLICKHOUSE_MAX_EXECUTION_TIME: max_execution_time timeout in seconds. Default is 10.
  • CLICKHOUSE_TZ: ClickHouse server timezone. Default: ''.
  • NEXT_QUERY_CACHE_TTL: TTL of unstable_cache - cache the results of most charts to speed up and reuse them across multiple requests. Default: 86400.
  • NEXT_PUBLIC_LOGO: (Optional) HTTP path to logo image.
  • EVENTS_TABLE_NAME: The table name for storing dashboard self-tracking events. Default: system.monitoring_events

Config ClickHouse

Run the development server

bash npm run dev

Final

Open http://localhost:3000 in your browser to see the dashboard.