In /var/lib/node_exporter --> In this folder, the scripts(custom metrics script) will be available.
On Tuesday, 28 February 2023 at 22:46:06 UTC+5:30 Stuart Clark wrote: > On 28/02/2023 17:12, BHARATH KUMAR wrote: > > Hello All, > > > > I want to calculate the pod age running on every server. I wrote a > > shell script. I added this script under the folder > /var/lib/node_exporter. > > > > I created a cronjob for this script to run every minute > > * * * * * root bash /var/lib/node_exporter/custom_metrics.sh > > > /var/lib/node_exporter/apt1-prom > > > > I store the above cronjob in the /etc/cron.d folder with filename: > > prom-apt1. > > > > But I am not able to see the metrics I created in Prometheus UI. > > > > > > > > But similarly, I created another shell script file to fetch some > > metrics. I followed the same procedure as above. > > > > * * * * * root bash /var/lib/node_exporter/custom1.sh > > > /var/lib/node_exporter/apt-prom > > > > I store the above cronjob in the /etc/cron.d folder with filename: > > prom-apt. > > > > The metrics which I mentioned in custom1.sh, I am able to see those > > metrics in Prometheus UI. > > > > > > Could anyone help me? > > > What is the contents of those files in /var/lib/node_exporter? > > -- > Stuart Clark > > -- 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/85673771-c5fb-45c1-bb27-f71cca079407n%40googlegroups.com.

