graphite-project / graphite-web

A highly scalable real-time graphing system
http://graphite.readthedocs.org/
Apache License 2.0
5.87k stars 1.26k forks source link

[Q] How to find the version of an ancient installed graphite server #2831

Open preetmyob opened 4 months ago

preetmyob commented 4 months ago

I have inherited a really old graphite server that was installed about 8-10 years ago. I'm trying to work out which version of graphite this is. We can access the main page, but we have no accounts or logins to the dashboard.

What would be the best way to discover this by looking at the installed folders, please?

$ curl -sv http://localhost/metrics/find?query=carbon.*
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET /metrics/find?query=carbon.* HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Date: Wed, 06 Mar 2024 11:25:52 GMT
* Server Apache/2.4.7 (Ubuntu) is not blacklisted
< Server: Apache/2.4.7 (Ubuntu)
< Content-Length: 284
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /metrics/find was not found on this server.</p>
<hr>
<address>Apache/2.4.7 (Ubuntu) Server at localhost Port 80</address>
</body></html>
* Connection #0 to host localhost left intact
deniszh commented 4 months ago

You can also try to call curl -sv http://localhost/version

Or look for WEBAPP_VERSION in webapp/graphite/settings.py

If it's < 1.2.0 - it's exact version. If 1.2.0-dev - it's installed from master and then it's hard to say.

preetmyob commented 4 months ago

curl -sv http://localhost/version

This gives 404

Or look for WEBAPP_VERSION in webapp/graphite/settings.py This is more promising, I grepped for this

grep --exclude-dir=storage -rnwi '/opt/graphite/' -e "WEBAPP_VERSION" and got /opt/graphite/webapp/graphite/settings.py:29:WEBAPP_VERSION = '0.9.12'

So it looks like this is 0.9.12. Would you agree?