HadesArchitect / GrafanaCassandraDatasource

Apache Cassandra Datasource for Grafana
MIT License
96 stars 32 forks source link

Unable to query data from cassandra using the plugin #183

Closed rincher closed 4 months ago

rincher commented 5 months ago

Hello, I have the following setup to pull data from cassandra to grafana using the plugin

Cassandra and Grafana is installed on seperate VPCs

below is modified part of cassandra.yaml to allow grafana connection

$ view /etc/cassandra/conf/cassandra.yaml 
authenticator: PasswordAuthenticator
authorizer: org.apache.cassandra.auth.CassandraAuthorizer
listen_address: localhost
rpc_address: 0.0.0.0
broadcast_rpc_address: <cassandra EC2 public IP>

스크린샷 2024-06-05 오전 9 46 57

Connection to cassandra seems to be working but query result is stuck at loading

스크린샷 2024-06-05 오후 1 57 39

and tailing /var/log/cassandra/debug.log, cassandra.log show nothing.

and below is the grafana.log when query starts

logger=secrets.kvstore t=2024-06-05T10:31:42.860502862+09:00 level=debug msg="got secret value" orgId=21 type=datasource namespace=hadesarchitect-cassandra-datasource
logger=plugin.hadesarchitect-cassandra-datasource t=2024-06-05T10:31:42.861471308+09:00 level=debug msg="Process 'keyspaces' request"logger=secrets.kvstore t=2024-06-05T10:31:42.893515787+09:00 level=debug msg="got secret value from cache" orgId=21 type=datasource namespace=hadesarchitect-cassandra-datasource
logger=plugin.hadesarchitect-cassandra-datasource t=2024-06-05T10:31:42.894796058+09:00 level=debug msg="Process 'keyspaces' request"

could you please help me with this issue?

Thank you

unflag commented 4 months ago

Hi @rincher, There doesn't seem to be a query to run, at least based on the log and screenshots. Could you provide more info on your schema and what exact query is? Did you test your query directly in cassandra(cqlsh etc)?

rincher commented 4 months ago

Hi @unflag Thank you for the reply.

I was collecting the AWS EventBridge events via AWS Lambda. Lambda sends the event detail to Backend and store it's event to Cassandra. cqlsh with select * from <table> works fine without an issue using "read_only" user, and able to pull data from local pc.

But now, I have switched to using AstraDB plugin. It is currently in testing phase, but at least query terminates with failed event logged in debug.log.

Thanks