Skip to content

Commit 6a0b451

Browse files
docs
1 parent 8413f30 commit 6a0b451

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

doc/README-ClickHouse-Grafana.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,21 @@ DB viewer (ClickLens):
4343
- ClickHouse host: `clickhouse`
4444
- ClickHouse port: `8123`
4545
- Use this to run ad-hoc SQL against ClickHouse without curl.
46+
- Hint: if `http://localhost:3000` does not open, verify the container is up with `docker compose -f docker-compose-clickhouse.yml ps`.
47+
48+
Browse tables in ClickLens:
49+
50+
1. Open `http://localhost:3000` and log in with `default` and an empty password.
51+
2. Open the ClickHouse connection and select database `default`.
52+
3. Expand `Tables` to see `jct_raw` (raw ingest) and `jct_events` (parsed events).
53+
4. Open a table and use the data preview, or run SQL in the query editor, for example:
54+
55+
```sql
56+
SELECT *
57+
FROM default.jct_events
58+
ORDER BY ingest_time DESC
59+
LIMIT 100;
60+
```
4661

4762
Dashboard provisioning:
4863

@@ -73,6 +88,8 @@ docker volume rm java-code-tracer_clickhouse-data java-code-tracer_grafana-data
7388

7489
Use a file-based config such as `doc/config-sample-application-file.yaml` and write to `/tmp/stacks`.
7590

91+
Important: make sure `processor.fullQualifiedClass` is set to `de.marcelsauer.profiler.processor.file.AsyncFileWritingStackProcessor`. This ClickHouse setup polls/tails log files from `/tmp/stacks`; UDP/TCP processors will not produce files for Vector to ingest.
92+
7693
## Verify ingestion quickly
7794

7895
```zsh
@@ -95,6 +112,14 @@ curl -s "http://localhost:8123/?query=<URL-encoded SQL>"
95112

96113
Or open the ClickHouse Play UI at `http://localhost:8123/play`.
97114

115+
All stacks that contain a class or method with name "someMethodA" (case-insensitive)
116+
117+
```sql
118+
SELECT *
119+
FROM default.jct_events
120+
WHERE arrayExists(frame -> lowerUTF8(frame) LIKE '%someMethodA%', stack);
121+
```
122+
98123
Top classes in the last 15 minutes:
99124

100125
```sql

0 commit comments

Comments
 (0)