Hi, We are trying to build Grafana dashboards usin...
# issues
d
Hi, We are trying to build Grafana dashboards using promql. Thing is - we ingest metrics in greptime using opentelemetry and vector.dev, so they end up looking like this:
Copy code
CREATE TABLE IF NOT EXISTS "kubelet_volume_stats_inodes" (
  "ts" TIMESTAMP(3) NOT NULL,
  "endpoint" STRING NULL,
  "k8s_cluster" STRING NULL,
  "metrics_path" STRING NULL,
  "namespace" STRING NULL,
  "node" STRING NULL,
  "persistentvolumeclaim" STRING NULL,
  "resource.http.scheme" STRING NULL,
  "resource.k8s_cluster" STRING NULL,
  "resource.namespace" STRING NULL,
  "resource.net.host.name" STRING NULL,
  "resource.net.host.port" STRING NULL,
  "resource.server.address" STRING NULL,
  "resource.server.port" STRING NULL,
  "resource.service.instance.id" STRING NULL,
  "resource.service.name" STRING NULL,
  "resource.url.scheme" STRING NULL,
  "scope.name" STRING NULL,
  "scope.version" STRING NULL,
  "service" STRING NULL,
  "val" DOUBLE NULL,
  TIME INDEX ("ts"),
  PRIMARY KEY ("endpoint", "k8s_cluster", "metrics_path", "namespace", "node", "persistentvolumeclaim", "resource.http.scheme", "resource.k8s_cluster", "resource.namespace", "resource.net.host.name", "resource.net.host.port", "resource.server.address", "resource.server.port", "resource.service.instance.id", "resource.service.name", "resource.url.scheme", "scope.name", "scope.version", "service")
)

ENGINE=mito
;
How can we query these metrics using labels with periods. Something like
kubelet_volume_stats_inodes{resource.http.scheme="http"}
is not valid query. And replacing
.
with
_
or
__
is not working either. May I ask - how should we query those metrics using promql? Thank you in advance. Greoptimedb v1.0.0-beta1
r
Are those tables come from an older version of greptimedb?
.
are considered an special character for metric name in promql (docs), that’s a common mis-alignment of querying promql over otel data source. For those scenarios, we’ve introduced an “compatible mode” starting from `v0.16`(docs) but that won’t help with tables created prior to it. A quick workaround would be
ALTER TABLE … RENAME
(docs), it can remove
.
from the table name while keep other things working.
If you have tons of table in that format, we can come up with an easier way to tackle them suits your environment best, depends on whether you need to keep old data, if pipeline/changing vector config is an option etc