Hi, I used the following way to output the metrics and values to a file, and let node exporter to scrape it.
I have a question here, how to let the next metrics value overide the previous'? I checked .prom file, there are some metrics with same labels and same values of labels but different value of the metrics. It is not correct. The next value of the metrics should override the previous old value. But how to implement this? print (" # HELP ldap_query_success LDAP query command", file=open("/var/log/node_exporter/filecollector/ldap_query.prom", "a+")) print (" # TYPE ldap_query_success gauge", file=open("/var/log/node_exporter/filecollector/ldap_query.prom", "a+")) print ('ldap_query_success'+'{'+'ldap_uri'+'='+service+','+'ldap_search_base'+'='+ldap_search_base+','+'} '+str(query_check), file=open("/var/log/node_exporter/filecollector/ldap_query.prom", "a+")) -- 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-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/dcc22492-559a-49b6-ab93-a39f426c259en%40googlegroups.com.