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: TESTING.md
+111Lines changed: 111 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,117 @@ Potential causes:
121
121
# This is ignored
122
122
```
123
123
124
+
### Metrics Endpoint Testing
125
+
126
+
The metrics testing suite validates InfluxDB 3 Core and Enterprise metrics in two phases:
127
+
128
+
1.**Phase 1: Direct metrics validation** - Validates metric format, existence, and types by directly querying InfluxDB endpoints
129
+
2.**Phase 2: Prometheus integration** - Validates Prometheus configuration, scraping, and relabeling work as documented
130
+
131
+
#### Phase 1: Direct Metrics Validation
132
+
133
+
The `test/influxdb3/metrics_endpoint_test.py` suite validates that InfluxDB 3 metrics endpoints expose all documented metrics in correct Prometheus format.
134
+
135
+
**Basic Usage:**
136
+
137
+
```bash
138
+
# Using the wrapper script (recommended)
139
+
./test/run-metrics-tests.sh
140
+
141
+
# Direct execution with Docker Compose
142
+
docker compose run --rm influxdb3-core-pytest test/influxdb3/metrics_endpoint_test.py
143
+
144
+
# Run specific test
145
+
docker compose run --rm influxdb3-core-pytest test/influxdb3/metrics_endpoint_test.py -k test_http_grpc_metrics
146
+
```
147
+
148
+
**Verbose Output:**
149
+
150
+
Set `VERBOSE_METRICS_TEST=true` to see detailed output showing which metrics are searched and the actual matching lines from the Prometheus endpoint:
The `test/influxdb3/prometheus_integration_test.py` suite validates that Prometheus can scrape InfluxDB metrics and that the documented relabeling configuration works correctly.
179
+
180
+
**What it validates:**
181
+
- Prometheus service discovers InfluxDB targets
182
+
- Scrape configuration works with authentication
183
+
- Relabeling adds `node_name` and `node_role` labels correctly
184
+
- Regex patterns in relabel_configs match documentation
185
+
- PromQL queries using relabeled metrics work
186
+
- Example queries from documentation execute successfully
0 commit comments