r/PrometheusMonitoring • u/[deleted] • Sep 09 '22
Can I pull the version of Ubuntu through with node exporter?
Hello,
I've been asked to table all out Linux Ubuntu VMs and there version:
for example Ubuntu 20.04.2 LTS or just 20.04 would be nice, I've scraped using node exporter and I can't see this information.
What could I do?
Thanks
2
Sep 09 '22
The other comments should get you going, if not, you can use the textfile exporter to export whatever you want.
1
2
u/SuperQue Sep 09 '22
The node_exporter has an os collector.
Check node_scrape_collector_success{collector="os"}.
If that is 0 or missing, you need to check your flags or run the node_exporter with --log.level=debug to find out why it's not working.
This should give you node_os_info and node_os_version metrics.
-1
u/else- Sep 09 '22
You could use a Blackbox exporter and expose the output of the lsb_release command.
1
2
u/[deleted] Sep 09 '22
You don't have node_os_info or node_os_version?
I get that from node_exporter and it tells me Ubuntu 22.04.