Prometheus Integration
At the front of the TSE, there is a Prometheus-compatible adapter. Without a separate Prometheus server, you can use collection (remote_write) and visualization (PromQL) exactly as in the Prometheus ecosystem.
[Prometheus · Grafana Agent] --remote_write--> TSE --> Cassandra
[Grafana (Prometheus 데이터소스)] --PromQL--> TSE
The adapter runs as the same process inside the TSE's Jetty. There is nothing to launch and no extra port to open — paths are simply split at /prometheus (the TSE native API is at /api/v1/*).
Authentication also uses the TSE's Basic Auth as-is.
1. Pushing data in — remote_write
Write this in prometheus.yml or in your Grafana Agent configuration.
remote_write:
- url: http://<TSE 호스트>:7800/prometheus/api/v1/write
basic_auth:
username: tse
password: "<PP_TSE_PASSWORD>"
The payload is snappy-compressed + protobuf (remote_write 1.0), and Prometheus and Agent handle it automatically. On success you get 204, on a malformed payload 400 (no retry), and on a temporary failure 500 (with retry). NaN and ±Inf are discarded at the storage stage.
2. Viewing in Grafana
Choose Prometheus as the datasource type and fill it in like this.
| Item | Value |
|---|---|
| URL | http://<TSE 호스트>:7800/prometheus |
| Access | Server (proxy) |
| Auth | Basic auth — tse / <PP_TSE_PASSWORD> |
| HTTP Method | POST recommended |
When you click "Save & Test", Grafana recognizes it as Prometheus via /prometheus/api/v1/status/buildinfo. From then on, you can use PromQL as-is in panels.
TSE also has a bundled PlantPulse Dashboard that uses a dedicated datasource plugin. You can choose either one — if you're comfortable with PromQL, use this one; if you want ready-made dashboards, use the bundled one.
3. How it maps
| Prometheus | TSE |
|---|---|
__name__ label | Metric name |
| Other labels | Tags |
Sample (ts_ms, float64) | DataPoint (double, ms) |
Prometheus's naming rules ([a-zA-Z_:][a-zA-Z0-9_:]*) are compatible with TSE's, so everything moves over without loss.
4. Endpoints
All are under /prometheus and follow the Prometheus HTTP API conventions ({"status":"success","data":…}).
| Method·Path | Purpose |
|---|---|
POST /prometheus/api/v1/write | remote_write reception |
GET·POST /prometheus/api/v1/query | Instant query |
GET·POST /prometheus/api/v1/query_range | Range query (start·end·step) |
GET /prometheus/api/v1/labels | Label names list |
GET /prometheus/api/v1/label/{name}/values | Label values list |
GET·POST /prometheus/api/v1/series | Series matching (match[]) |
GET /prometheus/api/v1/status/buildinfo | Grafana recognition |
Time is in Unix seconds (fractional allowed) or RFC3339, and step is 15s·1m·1h·500ms or unitless seconds. Timestamps in responses are in seconds, and values are strings (per the Prometheus convention).
5. Supported PromQL
| Category | Supported |
|---|---|
| Selectors | bare · matchers (= != =~ !~) · __name__ matcher · range selectors ([5m], unit ms s m h d w y) |
| Arithmetic | numeric literals · unary - · parentheses · + - * / (scalar∘scalar, vector∘scalar, vector∘vector 1-to-1) |
| Comparison | == != > < >= <= (+ bool) |
| Functions | rate irate increase delta · abs clamp_min clamp_max · histogram_quantile |
| Aggregation | sum avg min max count + by/without · topk bottomk |
rate(errors[5m]) / rate(total[5m])
topk(5, sum(rate(req_total[5m])) by (path))
histogram_quantile(0.95, rate(latency_seconds_bucket[5m]))
6. Not supported — rejected with 400, not silently wrong
| Category | Not supported |
|---|---|
| Vector matching | on(…) · ignoring(…) · group_left · group_right |
| Set operations | and · or · unless |
| Time functions | *_over_time · predict_linear · holt_winters |
| Transformations | subquery(expr[5m:1m]) · @ modifier · offset |
| Others | scalar() vector() label_replace() label_join() sort() sort_desc() absent() |
| Protocol | remote_read · remote_write 2.0 · exemplars · native histogram |
Unsupported syntax is rejected with 400 {"status":"error","errorType":"bad_data",…}.
This means it never silently provides plausible-looking numbers, so your dashboards will not lie without a word.
7. Subtle differences
This is not a full Prometheus, but a compatible adapter. In practice this is usually not an issue, but you should be aware of it when you need to compare values precisely.
| What | How it differs |
|---|---|
rate·increase extrapolation | It linearly extrapolates over the entire observed range (Prometheus's boundary extrapolation cap is not implemented) — slight differences at range boundaries |
| range window | [t-range, t] includes both endpoints (Prometheus uses left-open intervals). The lookback for instant selectors is the same as (t-5m, t], with a default of 5 minutes |
/label/<name>/values | __name__ is accurate, but other labels are over-approximated with global tag values — sufficient for autocompletion |
| scalar comparison | Always evaluates to 0 or 1 (Prometheus requires bool). 3 > 2 maps directly to 1 |
See also
- TQL and JDBC driver — the TSE native path
- Creating dashboards in PlantPulse Dashboard — bundled PlantPulse Dashboard
- Time series engine overview — differences from a database