You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-guide/deployments-administration/monitoring/standalone-monitoring.md
+1-46Lines changed: 1 addition & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,52 +7,7 @@ description: Guide to monitor GreptimeDB standalone instance using Prometheus me
7
7
8
8
GreptimeDB standalone provides a `/metrics` endpoint on the HTTP port (default `4000`) that exposes [Prometheus metrics](/reference/http-endpoints.md#metrics).
9
9
10
-
## Monitoring configuration
11
-
12
-
You can configure GreptimeDB to export metrics to GreptimeDB itself or to an external Prometheus instance.
13
-
14
-
### Internal Metrics Storage
15
-
16
-
Configuring GreptimeDB to store its own metrics internally is convenient and recommended for self-monitoring,
17
-
it also enables SQL-based querying and analysis.
18
-
19
-
To enable self-monitoring, configure the `export_metrics` section in your TOML configuration file:
20
-
21
-
```toml
22
-
[export_metrics]
23
-
enable = true
24
-
# Metrics collection interval
25
-
write_interval = "30s"
26
-
[export_metrics.self_import]
27
-
db = "greptime_metrics"
28
-
```
29
-
30
-
This configuration:
31
-
- Collects and writes metrics every 30 seconds.
32
-
- Exports metrics to the `greptime_metrics` database within GreptimeDB. Ensure the `greptime_metrics` database [is created](/reference/sql/create.md#create-database) before exporting metrics.
33
-
34
-
### Export metrics to Prometheus
35
-
36
-
For environments with existing Prometheus infrastructure,
37
-
GreptimeDB can export metrics via the Prometheus remote write protocol.
38
-
39
-
To do this, configure the `export_metrics` section in your TOML configuration file with the `remote_write` option:
40
-
41
-
```toml
42
-
[export_metrics]
43
-
enable=true
44
-
write_interval = "30s"
45
-
[export_metrics.remote_write]
46
-
# URL specified by Prometheus Remote-Write protocol
47
-
url = "https://your/remote_write/endpoint"
48
-
# Some optional HTTP parameters, such as authentication information
49
-
headers = { Authorization = {{Authorization}} }
50
-
```
51
-
52
-
This configuration:
53
-
- Sets the export interval to 30 seconds
54
-
- Specifies the Prometheus remote write URL, which should point to your Prometheus instance
55
-
- Optionally includes HTTP headers for the remote write URL, such as authentication information
10
+
You can use Prometheus to scrape these metrics and Grafana to visualize them.
0 commit comments