Re: Log application Queries
I implemented an audit query handler that archives the queries in ES here: https://github.com/ltagliamonte/cassandra-audit PRs are welcome! On Mon, May 28, 2018 at 1:55 AM, Horia Mocioi wrote: > Hello, > > Another way to do it would be to create your own QueryHandler: > >- create a class that would implement the QueryHandler interface and >make Cassandra aware of it >- in that class you can maintain a list of the queries (add to this >list when prepare method is being called) and the current query that >you will get from the list when getPrepared it's called; you can get >it from the list using the MD5Digest id >- when processPrepared is called you can replace the ? in the query >string with the values in the QueryOptions options.getValues(). > > > On fre, 2018-05-25 at 11:24 -0400, Nitan Kainth wrote: > > Hi, > > I would like to log all C* queries hitting cluster. Could someone please > tell me how can I do it at cluster level? > Will nodetool setlogginglevel work? If so, please share example with > library name. > > C* version 3.11 > >
Re: Log application Queries
Hello, Another way to do it would be to create your own QueryHandler: * create a class that would implement the QueryHandler interface and make Cassandra aware of it * in that class you can maintain a list of the queries (add to this list when prepare method is being called) and the current query that you will get from the list when getPrepared it's called; you can get it from the list using the MD5Digest id * when processPrepared is called you can replace the ? in the query string with the values in the QueryOptions options.getValues(). On fre, 2018-05-25 at 11:24 -0400, Nitan Kainth wrote: Hi, I would like to log all C* queries hitting cluster. Could someone please tell me how can I do it at cluster level? Will nodetool setlogginglevel work? If so, please share example with library name. C* version 3.11
Re: Log application Queries
this is awesome Jeff. Regards, Nitan K. Cassandra and Oracle Architect/SME Datastax Certified Cassandra expert Oracle 10g Certified On Fri, May 25, 2018 at 3:00 PM, Jeff Jirsawrote: > https://issues.apache.org/jira/browse/CASSANDRA-13983 was added to > cassandra 4.0 > > > > On Fri, May 25, 2018 at 8:24 AM, Nitan Kainth > wrote: > >> Hi, >> >> I would like to log all C* queries hitting cluster. Could someone please >> tell me how can I do it at cluster level? >> Will nodetool setlogginglevel work? If so, please share example with >> library name. >> >> C* version 3.11 >> > >
Re: Log application Queries
https://issues.apache.org/jira/browse/CASSANDRA-13983 was added to cassandra 4.0 On Fri, May 25, 2018 at 8:24 AM, Nitan Kainthwrote: > Hi, > > I would like to log all C* queries hitting cluster. Could someone please > tell me how can I do it at cluster level? > Will nodetool setlogginglevel work? If so, please share example with > library name. > > C* version 3.11 >
Re: Log application Queries
Thanks Alain Regards, Nitan K. Cassandra and Oracle Architect/SME Datastax Certified Cassandra expert Oracle 10g Certified On Fri, May 25, 2018 at 2:05 PM, Alain RODRIGUEZwrote: > Nate wrote a post about this exact topic. In case it is of some use: > http://thelastpickle.com/blog/2016/02/10/locking-down- > apache-cassandra-logging.html > > C*heers, > --- > Alain Rodriguez - @arodream - al...@thelastpickle.com > France / Spain > > The Last Pickle - Apache Cassandra Consulting > http://www.thelastpickle.com > > 2018-05-25 18:00 GMT+01:00 Nitan Kainth : > >> So settraceprobability is better option than nodetool :) >> >> >> Regards, >> Nitan K. >> Cassandra and Oracle Architect/SME >> Datastax Certified Cassandra expert >> Oracle 10g Certified >> >> On Fri, May 25, 2018 at 12:15 PM, Surbhi Gupta >> wrote: >> >>> nodeool setlogginglevel is only valid for below : >>> >>> >>>- org.apache.cassandra >>>- org.apache.cassandra.db >>>- org.apache.cassandra.service.StorageProxy >>> >>> >>> On 25 May 2018 at 09:01, Nitan Kainth wrote: >>> Thanks Surbhi. I found another way. I used nodetool settraceprobability 1 and it is logging in system_traces. How is it different from nodeool setlogginglevel? Regards, Nitan K. Cassandra and Oracle Architect/SME Datastax Certified Cassandra expert Oracle 10g Certified On Fri, May 25, 2018 at 11:41 AM, Surbhi Gupta < surbhi.gupt...@gmail.com> wrote: > If using dse then u can enable in dse.yaml. > > # CQL slow log settings > cql_slow_log_options: > enabled: true > threshold_ms: 0 > ttl_seconds: 259200 > > As far as my understanding says setlogginglevel is used for changing > the logging level as below but not for slow query . > >- ALL >- TRACE >- DEBUG >- INFO >- WARN >- ERROR >- OFF > > > > On 25 May 2018 at 08:24, Nitan Kainth wrote: > >> Hi, >> >> I would like to log all C* queries hitting cluster. Could someone >> please tell me how can I do it at cluster level? >> Will nodetool setlogginglevel work? If so, please share example with >> library name. >> >> C* version 3.11 >> > > >>> >> >
Re: Log application Queries
Nate wrote a post about this exact topic. In case it is of some use: http://thelastpickle.com/blog/2016/02/10/locking-down-apache-cassandra-logging.html C*heers, --- Alain Rodriguez - @arodream - al...@thelastpickle.com France / Spain The Last Pickle - Apache Cassandra Consulting http://www.thelastpickle.com 2018-05-25 18:00 GMT+01:00 Nitan Kainth: > So settraceprobability is better option than nodetool :) > > > Regards, > Nitan K. > Cassandra and Oracle Architect/SME > Datastax Certified Cassandra expert > Oracle 10g Certified > > On Fri, May 25, 2018 at 12:15 PM, Surbhi Gupta > wrote: > >> nodeool setlogginglevel is only valid for below : >> >> >>- org.apache.cassandra >>- org.apache.cassandra.db >>- org.apache.cassandra.service.StorageProxy >> >> >> On 25 May 2018 at 09:01, Nitan Kainth wrote: >> >>> Thanks Surbhi. I found another way. I used nodetool settraceprobability >>> 1 and it is logging in system_traces. >>> >>> How is it different from nodeool setlogginglevel? >>> >>> >>> Regards, >>> Nitan K. >>> Cassandra and Oracle Architect/SME >>> Datastax Certified Cassandra expert >>> Oracle 10g Certified >>> >>> On Fri, May 25, 2018 at 11:41 AM, Surbhi Gupta >> > wrote: >>> If using dse then u can enable in dse.yaml. # CQL slow log settings cql_slow_log_options: enabled: true threshold_ms: 0 ttl_seconds: 259200 As far as my understanding says setlogginglevel is used for changing the logging level as below but not for slow query . - ALL - TRACE - DEBUG - INFO - WARN - ERROR - OFF On 25 May 2018 at 08:24, Nitan Kainth wrote: > Hi, > > I would like to log all C* queries hitting cluster. Could someone > please tell me how can I do it at cluster level? > Will nodetool setlogginglevel work? If so, please share example with > library name. > > C* version 3.11 > >>> >> >
Re: Log application Queries
So settraceprobability is better option than nodetool :) Regards, Nitan K. Cassandra and Oracle Architect/SME Datastax Certified Cassandra expert Oracle 10g Certified On Fri, May 25, 2018 at 12:15 PM, Surbhi Guptawrote: > nodeool setlogginglevel is only valid for below : > > >- org.apache.cassandra >- org.apache.cassandra.db >- org.apache.cassandra.service.StorageProxy > > > On 25 May 2018 at 09:01, Nitan Kainth wrote: > >> Thanks Surbhi. I found another way. I used nodetool settraceprobability >> 1 and it is logging in system_traces. >> >> How is it different from nodeool setlogginglevel? >> >> >> Regards, >> Nitan K. >> Cassandra and Oracle Architect/SME >> Datastax Certified Cassandra expert >> Oracle 10g Certified >> >> On Fri, May 25, 2018 at 11:41 AM, Surbhi Gupta >> wrote: >> >>> If using dse then u can enable in dse.yaml. >>> >>> # CQL slow log settings >>> cql_slow_log_options: >>> enabled: true >>> threshold_ms: 0 >>> ttl_seconds: 259200 >>> >>> As far as my understanding says setlogginglevel is used for changing >>> the logging level as below but not for slow query . >>> >>>- ALL >>>- TRACE >>>- DEBUG >>>- INFO >>>- WARN >>>- ERROR >>>- OFF >>> >>> >>> >>> On 25 May 2018 at 08:24, Nitan Kainth wrote: >>> Hi, I would like to log all C* queries hitting cluster. Could someone please tell me how can I do it at cluster level? Will nodetool setlogginglevel work? If so, please share example with library name. C* version 3.11 >>> >>> >> >
Re: Log application Queries
nodeool setlogginglevel is only valid for below : - org.apache.cassandra - org.apache.cassandra.db - org.apache.cassandra.service.StorageProxy On 25 May 2018 at 09:01, Nitan Kainthwrote: > Thanks Surbhi. I found another way. I used nodetool settraceprobability 1 > and it is logging in system_traces. > > How is it different from nodeool setlogginglevel? > > > Regards, > Nitan K. > Cassandra and Oracle Architect/SME > Datastax Certified Cassandra expert > Oracle 10g Certified > > On Fri, May 25, 2018 at 11:41 AM, Surbhi Gupta > wrote: > >> If using dse then u can enable in dse.yaml. >> >> # CQL slow log settings >> cql_slow_log_options: >> enabled: true >> threshold_ms: 0 >> ttl_seconds: 259200 >> >> As far as my understanding says setlogginglevel is used for changing >> the logging level as below but not for slow query . >> >>- ALL >>- TRACE >>- DEBUG >>- INFO >>- WARN >>- ERROR >>- OFF >> >> >> >> On 25 May 2018 at 08:24, Nitan Kainth wrote: >> >>> Hi, >>> >>> I would like to log all C* queries hitting cluster. Could someone please >>> tell me how can I do it at cluster level? >>> Will nodetool setlogginglevel work? If so, please share example with >>> library name. >>> >>> C* version 3.11 >>> >> >> >
Re: Log application Queries
Thanks Surbhi. I found another way. I used nodetool settraceprobability 1 and it is logging in system_traces. How is it different from nodeool setlogginglevel? Regards, Nitan K. Cassandra and Oracle Architect/SME Datastax Certified Cassandra expert Oracle 10g Certified On Fri, May 25, 2018 at 11:41 AM, Surbhi Guptawrote: > If using dse then u can enable in dse.yaml. > > # CQL slow log settings > cql_slow_log_options: > enabled: true > threshold_ms: 0 > ttl_seconds: 259200 > > As far as my understanding says setlogginglevel is used for changing the > logging level as below but not for slow query . > >- ALL >- TRACE >- DEBUG >- INFO >- WARN >- ERROR >- OFF > > > > On 25 May 2018 at 08:24, Nitan Kainth wrote: > >> Hi, >> >> I would like to log all C* queries hitting cluster. Could someone please >> tell me how can I do it at cluster level? >> Will nodetool setlogginglevel work? If so, please share example with >> library name. >> >> C* version 3.11 >> > >
Re: Log application Queries
If using dse then u can enable in dse.yaml. # CQL slow log settings cql_slow_log_options: enabled: true threshold_ms: 0 ttl_seconds: 259200 As far as my understanding says setlogginglevel is used for changing the logging level as below but not for slow query . - ALL - TRACE - DEBUG - INFO - WARN - ERROR - OFF On 25 May 2018 at 08:24, Nitan Kainthwrote: > Hi, > > I would like to log all C* queries hitting cluster. Could someone please > tell me how can I do it at cluster level? > Will nodetool setlogginglevel work? If so, please share example with > library name. > > C* version 3.11 >
Log application Queries
Hi, I would like to log all C* queries hitting cluster. Could someone please tell me how can I do it at cluster level? Will nodetool setlogginglevel work? If so, please share example with library name. C* version 3.11