Is it possible to get the OS Cassandra is installed on using CQL?
For example in PostgreSQL you can run the query select version();
which will return:
PostgreSQL 11.12 (Debian 11.12-0+deb10u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
Essentially, it returns the version of PostgreSQL and the OS type installed on.
2
Answers
Unfortunately, it isn’t possible to do this in Cassandra through CQL.
It isn’t particularly relevant since some deployments are serverless like K8ssandra.io where Cassandra is deployed in Kubernetes.
There are also some architectures where the coordinators are Stargate.io nodes which are not Cassandra nodes in the cluster. Astra DB is an example of this where it’s serverless and truly cloud-native. Cheers!
Are you using Cassandra 4.0? If so, you should be able to query the
os.name
key from thesystem_views.system_properties
table:Although, as Erick pointed out the info isn’t terribly useful. You could be running in an Alpine Linux container on an Ubuntu host, but Cassandra would only have visibility to Alpine.