Yes... it was...
the NULL values.
Now all return run properly.

I've fixed with a classic ISNULL(field, 0) on my query....
THANKS

Il giorno martedì 21 giugno 2022 alle 13:50:59 UTC+2 Brian Candler ha 
scritto:

> Here are a couple of cases from the prometheus test suite which show bad 
> metrics that give exactly the error you see:
>
>
> https://github.com/prometheus/prometheus/blob/v2.36.2/model/textparse/promparse_test.go#L220-L223
>
> https://github.com/prometheus/prometheus/blob/v2.36.2/model/textparse/promparse_test.go#L264-L267
>
> A metric name with no value is one of those, so your NULL theory looks 
> likely to be correct.  You could try returning "NaN" for null values.
>
> "promtool check metrics" gives a different error:
>
> # echo "a" | /opt/prometheus/promtool check metrics
> error while linting: text format parsing error in line 1: expected float 
> as value, got ""
>
> On Tuesday, 21 June 2022 at 11:47:25 UTC+1 [email protected] wrote:
>
>> Thanks Brian for your reply...
>> I see no error on collector log or on prometheus log...
>> only from the TARGET (error) page on Prometheus.
>>
>> I got 7 SQL endpoint.. and I isolate the one with the err.
>> I see directly from the DB query that 2 row have NULL values?
>> Could be this?
>> Now I try with a REPLACE NULL value directly on the query.... but your 
>> advise... "If you save the scrape output, you can validate it with 
>> "promtool check metrics", it's a good point of view.
>>
>> I'll be back
>> Thanks, ALEN
>>
>> Il giorno martedì 21 giugno 2022 alle 11:47:23 UTC+2 Brian Candler ha 
>> scritto:
>>
>>> Where *exactly* do you see that error?
>>>
>>> What do you see if you scrape your collector directly using curl?
>>>
>>> If you save the scrape output, you can validate it with "promtool check 
>>> metrics"
>>>
>>> On Tuesday, 21 June 2022 at 10:14:24 UTC+1 [email protected] wrote:
>>>
>>>> Hi all, I got this strange error...
>>>> I don't see any error on  my collector (it run from 6 month).
>>>> I've just downloaded on my docker app, last version of Prometheus...
>>>> but it's the same.
>>>>
>>>> The strange think is that my metric page give me output of data..
>>>> So I'm a little bit confused... could be a collector error? Or a 
>>>> prometheus internal err?
>>>>
>>>>
>>>>    - expected value after metric, got "MNAME"
>>>>
>>>> THANKS; Alen
>>>>
>>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/d73d83af-a024-4cce-80d2-cb271b1916d9n%40googlegroups.com.

Reply via email to