Hi Julian,
You are running into the somewhat dangerous issue
https://github.com/prometheus/node_exporter/issues/1885, where if the same
metric name is mentioned in multiple files and does not have an explicit
HELP string set, then the Node Exporter will auto-generate the HELP string
with the textfile name in the name, which then leads to conflicting HELP
strings for the same metric across files, and only the first file's metrics
are reported. You can work around this by adding an explicit same HELP
string, like so:
File A:
# HELP jms_queue My metric help string
jms_queue{product="NGSSP",qdomain="OSBD1",qname="NGSSP_JMS_Logger!OSB2JMSServer@NGSSP_Logger_Q"}
0
jms_queue{product="NGSSP",qdomain="OSBD1",qname="NGSSP_JMS_Logger!OSB1JMSServer@NGSSP_Logger_Q"}
0
jms_queue{product="NGSSP",qdomain="OSBD1",qname="NGSSP_JMS_Logger!OSB4JMSServer@NGSSP_Logger_Q"}
0
jms_queue{product="NGSSP",qdomain="OSBD1",qname="NGSSP_JMS_Logger!OSB3JMSServer@NGSSP_Logger_Q"}
0
jms_queue{product="NGSSP",qdomain="OSBD11",qname="NGSSP_JMS_Logger!OSB1JMSServer@NGSSP_Logger_Q"}
0
jms_queue{product="NGSSP",qdomain="OSBD11",qname="NGSSP_JMS_Logger!OSB3JMSServer@NGSSP_Logger_Q"}
0
jms_queue{product="NGSSP",qdomain="OSBD12",qname="NGSSP_JMS_Logger!OSB2JMSServer@NGSSP_Logger_Q"}
0
jms_queue{product="NGSSP",qdomain="OSBD12",qname="NGSSP_JMS_Logger!OSB1JMSServer@NGSSP_Logger_Q"}
0
jms_queue{product="NGSSP",qdomain="OSBD12",qname="NGSSP_JMS_Logger!OSB3JMSServer@NGSSP_Logger_Q"}
0
File B:
# HELP jms_queue My metric help string
jms_queue{product="STANDALONE",qdomain="StandAlone",qname="IOMFPA_JMS_Module!IOM_FPA_JMSServer5@ConFPATargetQueue"}
0
jms_queue{product="STANDALONE",qdomain="StandAlone",qname="IOMFPA_JMS_Module!IOM_FPA_JMSServer2@ConFPATargetQueue"}
0
jms_queue{product="STANDALONE",qdomain="StandAlone",qname="IOMFPA_JMS_Module!IOM_FPA_JMSServer1@ConFPATargetQueue"}
0
jms_queue{product="STANDALONE",qdomain="StandAlone",qname="IOMFPA_JMS_Module!IOM_FPA_JMSServer4@ConFPATargetQueue"}
0
jms_queue{product="STANDALONE",qdomain="StandAlone",qname="IOMFPA_JMS_Module!IOM_FPA_JMSServer3@ConFPATargetQueue"}
0
As I understand it, there is otherwise currently neither an error being
logged, nor a metric indicating that some metrics were dropped :O
(e.g. node_scrape_collector_success{collector="textfile"} is still set to
1).
Regards,
Julius
On Sun, Jan 24, 2021 at 4:28 AM Julian Ade Putra <[email protected]> wrote:
> Hi Stuart,
>
> There is no error i found in log. Below is content of both files :
>
> *ngssp.jms.queue.prom :*
>
> jms_queue{product="NGSSP",qdomain="OSBD1",qname="NGSSP_JMS_Logger!OSB2JMSServer@NGSSP_Logger_Q"}
> 0
>
> jms_queue{product="NGSSP",qdomain="OSBD1",qname="NGSSP_JMS_Logger!OSB1JMSServer@NGSSP_Logger_Q"}
> 0
>
> jms_queue{product="NGSSP",qdomain="OSBD1",qname="NGSSP_JMS_Logger!OSB4JMSServer@NGSSP_Logger_Q"}
> 0
>
> jms_queue{product="NGSSP",qdomain="OSBD1",qname="NGSSP_JMS_Logger!OSB3JMSServer@NGSSP_Logger_Q"}
> 0
>
> jms_queue{product="NGSSP",qdomain="OSBD11",qname="NGSSP_JMS_Logger!OSB1JMSServer@NGSSP_Logger_Q"}
> 0
>
> jms_queue{product="NGSSP",qdomain="OSBD11",qname="NGSSP_JMS_Logger!OSB3JMSServer@NGSSP_Logger_Q"}
> 0
>
> jms_queue{product="NGSSP",qdomain="OSBD12",qname="NGSSP_JMS_Logger!OSB2JMSServer@NGSSP_Logger_Q"}
> 0
>
> jms_queue{product="NGSSP",qdomain="OSBD12",qname="NGSSP_JMS_Logger!OSB1JMSServer@NGSSP_Logger_Q"}
> 0
>
> jms_queue{product="NGSSP",qdomain="OSBD12",qname="NGSSP_JMS_Logger!OSB3JMSServer@NGSSP_Logger_Q"}
> 0
>
> *standalone.jms.queue.prom :*
>
> jms_queue{product="STANDALONE",qdomain="StandAlone",qname="IOMFPA_JMS_Module!IOM_FPA_JMSServer5@ConFPATargetQueue"}
> 0
>
> jms_queue{product="STANDALONE",qdomain="StandAlone",qname="IOMFPA_JMS_Module!IOM_FPA_JMSServer2@ConFPATargetQueue"}
> 0
>
> jms_queue{product="STANDALONE",qdomain="StandAlone",qname="IOMFPA_JMS_Module!IOM_FPA_JMSServer1@ConFPATargetQueue"}
> 0
>
> jms_queue{product="STANDALONE",qdomain="StandAlone",qname="IOMFPA_JMS_Module!IOM_FPA_JMSServer4@ConFPATargetQueue"}
> 0
>
> jms_queue{product="STANDALONE",qdomain="StandAlone",qname="IOMFPA_JMS_Module!IOM_FPA_JMSServer3@ConFPATargetQueue"}
> 0
>
> Regards,
> Julian
> On Thursday, 21 January 2021 at 22:38:31 UTC+7 Stuart Clark wrote:
>
>> It should work with multiple files. Are there any errors logged by the
>> node exporter?
>>
>> What are the command line options in use, and what is the content of both
>> files?
>>
>> On 21 January 2021 14:48:20 GMT, Julian Ade Putra <[email protected]>
>> wrote:
>>>
>>> Hi Expert,
>>>
>>> Currently, i have 2 shell script using textfile collector. Each script
>>> will throw different name of prom file like below :
>>>
>>> [middleware@XXXXX collector]$ ll
>>> total 12
>>> -rw-r--r-- 1 middleware middleware 4368 Jan 21 21:24
>>> *ngssp.jms.queue.prom*
>>> -rw-r--r-- 1 middleware middleware 590 Jan 21 21:24
>>> standalone.jms.queue.prom
>>>
>>> But only first prom file (*ngssp.jms.queue.prom*) can retrieve in node
>>> exporter metrics. Please advise how can i retrieve multiple prom file using
>>> textfile collector.
>>>
>>> Regard,
>>> Julian.
>>>
>>>
>> --
>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>>
> --
> 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/5d2aa332-c291-4cdf-adf9-0127a0c6e76en%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/5d2aa332-c291-4cdf-adf9-0127a0c6e76en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
Julius Volz
PromLabs - promlabs.com
--
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/CAObpH5x_f6Y6%2Be0q7a13XEsEvqataJULYGjT%3Dx4OP-FH%2BcpVHA%40mail.gmail.com.