BeginMoh
BeginMoh

Reputation: 123

Get list of queries executed in a cassandra cluster

There's any way to get all executed queries in a cluster cassandra ?

Thanks for your help

Upvotes: 0

Views: 3124

Answers (4)

Rahul Singh
Rahul Singh

Reputation: 104

You don't necessarily have to have Cassandra 4.0, you can also look at the ecaudit plugin from Ericsson

https://github.com/Ericsson/ecaudit

Setup instructions

https://github.com/Ericsson/ecaudit/blob/release/c3.0.11/doc/setup.md

Example output

2019-02-28 15:18:14.089-> client=127.0.0.1, user=cassandra, status=ATTEMPT, operation='SELECT * FROM students'
2019-02-28 15:18:14.090-> client=127.0.0.1, user=cassandra, status=ATTEMPT, batch-id=6f3cae9b-f1f1-4a4c-baa2-ed168ee79f9d, operation='INSERT INTO ecks.ectbl (partk, clustk, value) VALUES (?, ?, ?)[1, '1', 'valid']'
2019-02-28 15:18:14.091-> client=127.0.0.1, user=cassandra, status=ATTEMPT, batch-id=6f3cae9b-f1f1-4a4c-baa2-ed168ee79f9d, operation='INSERT INTO ecks.ectbl (partk, clustk, value) VALUES (?, ?, ?)[2, '2', 'valid']'

Upvotes: 0

Alex Ott
Alex Ott

Reputation: 87329

In open source Cassandra it's possible only in version 4.0 (not yet released) via Audit logging. See this blog post about it.

This functionality is also available in DataStax Enterprise - you can enable it as described in documentation.

Upvotes: 1

M P
M P

Reputation: 300

Enable Tracing - Either in the Cassandra configuration or you can over ride this from the client as well,

https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlshTracing.html

Upvotes: 0

LetsNoSQL
LetsNoSQL

Reputation: 1538

If I am not wrong you are asking about batch execution? You can use "SOURCE" command in cqlsh.please refer below link. https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlshSource.html

Upvotes: 0

Related Questions