expected equal, got "INVALID"

78 views
Skip to first unread message

Maksim Podbereznov

unread,
Jun 16, 2020, 5:56:48 AM6/16/20
to Prometheus Users
Hey.
I got an error, maybe filter it or fix it

curl --header 'Host: "exemple.com' 10.10.10.8

curl -s http://**********:9927/metrics | promtool check metrics 2 error while linting: text format parsing error in line 177: unexpected end of label value ""

Build Information
Version 2.15.2
Revision d9613e5
Branch HEAD
BuildUser root@688433cf4ff7
BuildDate 20200106-14:50:51
GoVersion go1.13.5

177 nginx_vts_server_bytes_total{host=""exemple.com",direction="in"} 76 
178 nginx_vts_server_bytes_total{host=""exemple.com",direction="out"} 396 
179 nginx_vts_server_requests_total{host=""exemple.com",code="1xx"} 0 
180 nginx_vts_server_requests_total{host=""exemple.com",code="2xx"} 0 
181 nginx_vts_server_requests_total{host=""exemple.com",code="3xx"} 1 
182 nginx_vts_server_requests_total{host=""exemple.com",code="4xx"} 0 
183 nginx_vts_server_requests_total{host=""exemple.com",code="5xx"} 0 
184 nginx_vts_server_requests_total{host=""exemple.com",code="total"} 1 
185 nginx_vts_server_request_seconds_total{host=""exemple.com"} 0.000 
186 nginx_vts_server_request_seconds{host=""exemple.com"} 0.000 
187 nginx_vts_server_cache_total{host=""exemple.com",status="miss"} 0 
188 nginx_vts_server_cache_total{host=""exemple.com",status="bypass"} 0 
189 nginx_vts_server_cache_total{host=""exemple.com",status="expired"} 0 
190 nginx_vts_server_cache_total{host=""exemple.com",status="stale"} 0 
191 nginx_vts_server_cache_total{host=""exemple.com",status="updating"} 0 
192 nginx_vts_server_cache_total{host=""exemple.com",status="revalidated"} 0

is it possible to implement a filter?

Brian Candler

unread,
Jun 16, 2020, 7:35:10 AM6/16/20
to Prometheus Users
I suspect the error is on one of the previous lines, possibly 176, which you didn't show.

Here's an approach you can try:

1. write the metrics to a file
2. divide the file into two parts
3. run promtool check metrics on the two parts. Presumably one half is OK and one gives an error.
4. take the half which gives an error
5. go back to step 2

Eventually you'll find the bad line.
Reply all
Reply to author
Forward
0 new messages