6

I'm running two servers with Ubuntu and one of them has grafana and prometheus running on it. I'm trying to rebuild the same environment on the other server however I fail to find the version of it. Searching with find / prometheus* also didn't have any result.

What should I do?

David Foerster
  • 36,264
  • 56
  • 94
  • 147

3 Answers3

6

If you're trying to find the version from within prometheus (or grafana or similar) you can query the metric: prometheus_build_info:

enter image description here

Matthew
  • 924
4

As suggested, with the command find / -iname '*prometheus*', the result included among other things:

/opt/prometheus/prometheus-0.20.0.linux-amd64
/opt/prometheus/prometheus-0.20.0.linux-amd64/prometheus.yml
/opt/prometheus/prometheus-0.20.0.linux-amd64/prometheus

Which shows the version is 0.20.0. Thanks a lot for the help.

Also, you can use ./prometheus -version in the folder to find the detail of the version:

prometheus, version 0.20.0 (branch: master, revision: aeab25c)
  build user:       root@77050118f904
  build date:       20160616-08:38:14
  go version:       go1.6.2
2

Perhaps it has changed in the last few years but I had to use two hyphens before version:

./prometheus --version

not

./prometheus -version
00fruX
  • 1,271
  • 1
  • 16
  • 32