help with "expected timestamp or new record, got \"MNAME\"

294 views
Skip to first unread message

Bob

unread,
Aug 7, 2020, 12:48:26 PM8/7/20
to Prometheus Users
hello - I am struggling to resolve a problem with a new prometheus custom scrape target.  The following scrape configuration results in the following being logged:

Aug  7 12:39:19 prom1 prometheus: level=warn ts=2020-08-07T16:39:19.457Z caller=scrape.go:937 component="scrape manager" scrape_pool=lip target=https://auth.leagueapps.io:443/status msg="append failed" err="expected timestamp or new record, got \"MNAME\""

Prometheus version:  2.11.1

The scrape configuration:
- job_name: 'lip'
  scheme: 'https'
  scrape_interval: 12s
  static_configs:
   - targets: ['auth.leagueapps.io']
   metrics_path: '/status'

The promtool utility does not indicate a problem when doing:

wget https://auth.leagueapps.io/status | ./promtool check metrics

Thank you

Matthias Rampke

unread,
Aug 8, 2020, 8:23:10 AM8/8/20
to Bob, Prometheus Users
I think Prometheus is expecting the TYPE and HELP lines that are part of the exposition format. Which client library are you using?

/MR

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/a2fce622-bd27-4b38-be4d-a22a8a9ce335n%40googlegroups.com.

Julien Pivotto

unread,
Aug 8, 2020, 8:42:02 AM8/8/20
to Bob, Prometheus Users
You content type is not correct.

When you scrape it with OpenMetrics, the output is not Openmetrics
compatible.

You should advertise only support for the Prometheus text format.
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/a2fce622-bd27-4b38-be4d-a22a8a9ce335n%40googlegroups.com.


--
Julien Pivotto
@roidelapluie

Bob

unread,
Aug 8, 2020, 8:57:39 AM8/8/20
to Prometheus Users
hi - I appreciate the responses.
A client library is not being used.  
The scrape target is returning a single metric.

How does one go about determining what exactly is incorrect about the content type?
And how would one explain the promtool test failing to indicate a problem?

thank you!

Julien Pivotto

unread,
Aug 8, 2020, 9:04:03 AM8/8/20
to Bob, Prometheus Users
On 08 Aug 05:57, Bob wrote:
> hi - I appreciate the responses.
> A client library is not being used.
> The scrape target is returning a single metric.
>
> How does one go about determining what exactly is incorrect about the
> content type?

OpenMetrics is different from Prometheus.

The content type should be:
text/plain; version=0.0.4

Prometheus DOES support OpenMetrics but your page is not OpenMetrics
Compatible.

Promtool checks for the Prometheus Exposition format, not OpenMetrics.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/786ac0db-5978-4b17-be54-59d01d632959n%40googlegroups.com.


--
Julien Pivotto
@roidelapluie
Reply all
Reply to author
Forward
0 new messages