Skip to content

Commit 90a3a50

Browse files
committed
merge main and resolve conflicts
2 parents ee5f52f + 3ac1b9f commit 90a3a50

File tree

10,543 files changed

+412877
-251777
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

10,543 files changed

+412877
-251777
lines changed

contribute/autogenerated-documentation-from-source.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,16 @@ TO DO
6161
## Functions
6262

6363
Documentation for functions is autogenerated from the documentation in system tables (`system.functions`) which is
64-
registered along with the function registration in the C++ code.
64+
registered along with the function registration in the C++ code. ([Example](https://github.com/ClickHouse/ClickHouse/blob/a0216c8120f00479f50237e41c897c2bf244e1ef/src/Functions/FunctionChar.cpp#L116-L158))
6565

66-
To add a new page:
67-
- add SQL to generate the markdown from system tables
68-
- update `autogenerate-settings.sh` in the section which specifies which markdown file contents to
69-
copy to which file in between the `<!--AUTOGENERATED_START-->` and `<!--AUTOGENERATED_END-->`
66+
This [script](https://github.com/ClickHouse/clickhouse-docs/blob/main/scripts/settings/autogenerate-settings.sh) is used to generate
67+
the markdown docs for functions.
7068

71-
The following pages are autogenerated from the source code for functions:
72-
- [Arithmetic](/sql-reference/functions/arithmetic-functions) ([SQL](../scripts/settings/arithmetic-functions.sql))
73-
- [Arrays](/sql-reference/functions/array-functions) ([SQL](../scripts/settings/array-functions.sql))
74-
- [Bit](/sql-reference/functions/bit-functions) ([SQL](../scripts/settings/bit-functions.sql))
75-
- [Bitmap](/sql-reference/functions/bitmap-functions) ([SQL](../scripts/settings/bitmap-functions.sql))
76-
- [Comparison](/sql-reference/functions/comparison-functions) ([SQL](../scripts/settings/comparison-functions.sql))
77-
- [Conditional](/sql-reference/functions/conditional-functions) ([SQL](../scripts/settings/conditional-functions.sql))
69+
Adding a new page can be done by:
7870

71+
1. Adding the function [category](https://github.com/ClickHouse/ClickHouse/blob/85700c135ccad89d3651a7a92ca63bb989743ba6/src/Common/FunctionDocumentation.cpp#L222-L273) to the [list of function categories to generate](https://github.com/ClickHouse/clickhouse-docs/blob/c31d64bc5d71c6c3afc5b520dbb73386e303447b/scripts/settings/autogenerate-settings.sh#L253-L278).
72+
2. The docs are automatically generated for the categories defined above by [this SQL code](https://github.com/ClickHouse/clickhouse-docs/blob/main/scripts/settings/generate-functions.sql). It produces a temporary markdown file with convention: `category-functions.md`. If the category name contains spaces, e.g. "String Splitting" then the temporary file will be `string_splitting-functions.md`.
73+
3. Register the temporary file name [here](https://github.com/ClickHouse/clickhouse-docs/blob/c31d64bc5d71c6c3afc5b520dbb73386e303447b/scripts/settings/autogenerate-settings.sh#L372)
74+
4. Register the destination file you want to insert the markdown into [here](https://github.com/ClickHouse/clickhouse-docs/blob/c31d64bc5d71c6c3afc5b520dbb73386e303447b/scripts/settings/autogenerate-settings.sh#L399)
75+
76+
The script takes the content of the temporary markdown file and inserts it into the destination file between tags `<!--AUTOGENERATED_START-->` and `<!--AUTOGENERATED_END-->`. If those tags do not exist you will get a warning.

docs/_placeholders/api/_invitations-api-reference.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/_placeholders/api/_keys-api-reference.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/_placeholders/api/_members-api-reference.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/_placeholders/api/_organizations-api-reference.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/_placeholders/api/_services-api-reference.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/_placeholders/changelog/_index.md

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import Image from '@theme/IdealImage';
2+
import clickstackTagsSearch from '@site/static/images/use-cases/observability/clickstack-tags-search.png';
3+
import clickstackTagsDashboard from '@site/static/images/use-cases/observability/clickstack-tags-dashboard.png';
4+
5+
You can add tags to dashboards and saved searches to help organize them.
6+
Tags provide a flexible way to categorize and filter based on your needs.
7+
8+
#### How tags work {#how-tags-work}
9+
10+
- **Organization**: Tags appear in the left sidebar, where dashboards and saved searches are grouped by their assigned tags
11+
- **Multiple tags**: You can add one or more tags to a single item for better categorization
12+
- **Auto-creation**: If you assign a tag that doesn't exist yet, it will be automatically created
13+
- **Easy management**: You can add or remove tags at any time to adjust your organization structure
14+
15+
This makes it easy to find related items and maintain an organized workspace as your collection grows.
16+
17+
<Image img={clickstackTagsSearch} alt="Tags in saved search" size="md" border />
18+
19+
You can also select multiple tags to filter and view items across different categories:
20+
21+
<Image img={clickstackTagsDashboard} alt="Multiple tags selected in dashboard" size="md" border />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Community monitoring solutions {#community-monitoring}
2+
3+
The ClickHouse community has developed comprehensive monitoring solutions that integrate with popular observability stacks. [ClickHouse Monitoring](https://github.com/duyet/clickhouse-monitoring) provides a complete monitoring setup with pre-built dashboards. This open source project offers a quick-start approach for teams looking to implement ClickHouse monitoring with established best practices and proven dashboard configurations.
4+
5+
:::note
6+
Like other direct database monitoring approaches, this solution queries ClickHouse system tables directly, which prevents instances from idling and impacts cost optimization.
7+
:::
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import Image from '@theme/IdealImage';
2+
import AdvancedDashboard from '@site/static/images/cloud/manage/monitoring/advanced_dashboard.png';
3+
import NativeAdvancedDashboard from '@site/static/images/cloud/manage/monitoring/native_advanced_dashboard.png';
4+
5+
### Direct Grafana plugin integration {#direct-grafana}
6+
7+
The ClickHouse data source plugin for Grafana enables visualization and exploration of data directly from ClickHouse using system tables. This approach works well for monitoring performance and creating custom dashboards for detailed system analysis.
8+
For plugin installation and configuration details, see the ClickHouse [data source plugin](/integrations/grafana). For a complete monitoring setup using the Prometheus-Grafana mix-in with pre-built dashboards and alerting rules, see [Monitor ClickHouse with the new Prometheus-Grafana mix-in](https://clickhouse.com/blog/monitor-with-new-prometheus-grafana-mix-in).
9+
10+
### Direct Datadog Integration {#direct-datadog}
11+
12+
Datadog offers a Clickhouse Monitoring plugin for its agent which queries system tables directly. This integration provides comprehensive database monitoring with cluster awareness through clusterAllReplicas functionality.
13+
:::note
14+
This integration is not recommended for ClickHouse Cloud deployments due to incompatibility with cost-optimizing idle behavior and operational limitations of the cloud proxy layer.
15+
:::
16+
17+
### Using system tables directly {#system-tables}
18+
19+
Users can perform deep query performance analysis by connecting to ClickHouse system tables, particularly `system.query_log` and querying directly. Using either the SQL console or clickhouse client, teams can identify slow queries, analyze resource usage, and track usage patterns across the organization.
20+
21+
**Query Performance Analysis**
22+
23+
Users can use the system table query logs to perform Query Performance Analysis.
24+
25+
**Example query**: Find the top 5 long-running queries across all cluster replicas:
26+
27+
```sql
28+
SELECT
29+
type,
30+
event_time,
31+
query_duration_ms,
32+
query,
33+
read_rows,
34+
tables
35+
FROM clusterAllReplicas(default, system.query_log)
36+
WHERE event_time >= (now() - toIntervalMinute(60)) AND type='QueryFinish'
37+
ORDER BY query_duration_ms DESC
38+
LIMIT 5
39+
FORMAT VERTICAL
40+
```

0 commit comments

Comments
 (0)