Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to get cassandra active, idle, inUse connection #1774

Open
md-robiul-hassan-kr opened this issue Jun 24, 2024 · 2 comments
Open

Trying to get cassandra active, idle, inUse connection #1774

md-robiul-hassan-kr opened this issue Jun 24, 2024 · 2 comments

Comments

@md-robiul-hassan-kr
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Cassandra are you using?

Apache Cassandra 4.1

What version of Gocql are you using?

1.6.0

What version of Go are you using?

go version go1.22.3 darwin/arm64

What did you do?

Trying to get cassandra active, idle, inUse connection.

What did you expect to see?

get cassandra active, idle, inUse connection.

What did you see instead?

Nothing found.

If you are having connectivity related issues please share the following additional information

Describe your Cassandra cluster

please provide the following information

  • Get active connections
  • Get Idle connections
  • Get in-use connection.
@testisnullus
Copy link

Hello, @md-robiul-hassan-kr! Could you please add some context to the issue?

I assume that you want to be able to query the Cassandra active connections using the gocql driver, specifically the client connections, including IP addresses and connection times, am I right?

If we are going to think about idle connections, we can assume that these are established network connections between clients and Cassandra nodes that are not currently being used for read or write operations.

Also, in-use connections are established network connections between clients and a Cassandra node that are actively being used for executing read or write operations for the measured period of time.

Could you please explain what feature you want gocql to have to accomplish your request, please?

@md-robiul-hassan-kr
Copy link
Author

hi @testisnullus, your assumption is correct. I want to be able to know how many active, in-use, or idle connect I have to the database at a given time, so that I can use those metrics.

A good example is here where those metrics are available through JVM, and I was wondering if there could be possibility to use from the gocql lib.

datastax-java-driver.advanced.metrics {
  session.enabled = [ connected-nodes, cql-requests ]
  node.enabled = [ pool.open-connections, pool.in-flight ]
}

I would like to get the information for the connection pool mostly, so that can be used in grafana with prometheus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants