There are probably at least three ways to do that.
- Inspect the main binary to determine version.
- Inspect DB logs, usually there is version info in them.
- Run a SQL to query version and output that to a file. Then scoop up the output in an analysis.
There are probably at least three ways to do that.