I just installed node_exporter, prometheus and grafana in that way. On the first EC2 instance with Jenkins i installed Prometheus and Grafana and in the second instance with Tomcat i installed node_exporter.I have some errors. When i try to query for example node_cpu_seconds_total in prometheus i get this error:
Error executing query: Expected ‘,’ or ‘]’ after array element in JSON at position 530 (line 1 column 531)
Also in grafana for node exporter full i have these errors :
Templating
Failed to upgrade legacy queries e.replace is not a function
Templating [job] Error updating options: e.replace is not a function
Templating [node] Error updating options: e.replace is not a function
I will attach photos too. Any help?enter image description here
2
Answers
For me, the problem was when going over the guide at https://prometheus.io/docs/prometheus/latest/getting_started/, I’ve encountered the same error when typing only
prometheus_target_interval_length_seconds
.When looking at
http://localhost:9090/metrics
I’ve noticed that indeedprometheus_target_interval_length_seconds
has 5 metrics,Once I’ve changed to any of the typed above examples, e.g.
prometheus_target_interval_length_seconds{quantile="0.99"}
it workedThere is some issue with 2.52.0-rc.1. I reverted back to older version 2.45.5 and it works fine