how to get customize metrics with node exporter from a container

798 views
Skip to first unread message

nina guo

unread,
Aug 4, 2022, 6:33:57 AM8/4/22
to Prometheus Users
Hi,

I'm running a cronjob as a container inside k8s cluster, at the same time a node exporter has been deployed on this node.

--collector.textfile.directory=/var/log/texfilecollector also has been defined from node export side. And the customize metrics are stored in defined directory /var/log/texfilecollector.

But now I failed to obtain the customized metrics with Prometheus UI.

Could some experts provide kind help?

Julius Volz

unread,
Aug 4, 2022, 7:34:43 AM8/4/22
to nina guo, Prometheus Users
Hi Nina,

Did you confirm that:

* Prometheus is scraping the Node Exporter
* When you manually go to the /metrics endpoint of the Node Exporter, it contains your custom metrics?
* The Node Exporter doesn't log any errors about the textfile collector failing? In that failure case, it should also expose a metric "node_textfile_scrape_error" with a value of 1.

--
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/0718b988-366f-4868-821b-0621e1343a88n%40googlegroups.com.


--
Julius Volz
PromLabs - promlabs.com
Reply all
Reply to author
Forward
0 new messages