[ https://issues.apache.org/jira/browse/CASSANDRA-14572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17792804#comment-17792804 ]
Stefan Miklosovic commented on CASSANDRA-14572: ----------------------------------------------- By the way, when I do this {code} cqlsh> select * from system_views.metrics_table where scope = 'system_auth.roles' and type = 'counter'; name | scope | type | value --------------------------------------------------------------------------------------+-------------------+---------+------- org.apache.cassandra.metrics.Table.AdditionalWrites.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.BytesAnticompacted.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.BytesFlushed.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.BytesMutatedAnticompaction.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.CasCommitTotalLatency.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.CasPrepareTotalLatency.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.CasProposeTotalLatency.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.CompactionBytesWritten.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.LiveDiskSpaceUsed.system_auth.roles | system_auth.roles | counter | 15632 org.apache.cassandra.metrics.Table.MemtableSwitchCount.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.PendingFlushes.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.RangeTotalLatency.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.ReadTotalLatency.system_auth.roles | system_auth.roles | counter | 1047 org.apache.cassandra.metrics.Table.RepairJobsCompleted.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.RepairJobsStarted.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.RowCacheHit.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.RowCacheHitOutOfRange.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.RowCacheMiss.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.SpeculativeFailedRetries.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.SpeculativeInsufficientReplicas.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.SpeculativeRetries.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.TombstoneFailures.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.TombstoneWarnings.system_auth.roles | system_auth.roles | counter | 0 org.apache.cassandra.metrics.Table.TotalDiskSpaceUsed.system_auth.roles | system_auth.roles | counter | 15632 org.apache.cassandra.metrics.Table.UncompressedLiveDiskSpaceUsed.system_auth.roles | system_auth.roles | counter | 15602 org.apache.cassandra.metrics.Table.WriteTotalLatency.system_auth.roles | system_auth.roles | counter | 0 {code} I think that 'scope' being 'keyspace.table' is just fine. virtual tables are by default queryable without ALLOW FILTERING > Expose all table metrics in virtual table > ----------------------------------------- > > Key: CASSANDRA-14572 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14572 > Project: Cassandra > Issue Type: New Feature > Components: Legacy/Observability, Observability/Metrics > Reporter: Chris Lohfink > Assignee: Maxim Muzafarov > Priority: Low > Labels: virtual-tables > Fix For: 5.x > > Attachments: systemv_views.metrics_dropped_message.png > > Time Spent: 10m > Remaining Estimate: 0h > > While we want a number of virtual tables to display data in a way thats great > and intuitive like in nodetool. There is also much for being able to expose > the metrics we have for tooling via CQL instead of JMX. This is more for the > tooling and adhoc advanced users who know exactly what they are looking for. > *Schema:* > Initial idea is to expose data via {{((keyspace, table), metric)}} with a > column for each metric value. Could also use a Map or UDT instead of the > column based that can be a bit more specific to each metric type. To that end > there can be a {{metric_type}} column and then a UDT for each metric type > filled in, or a single value with more of a Map<Text, Text> style. I am > purposing the column type though as with {{ALLOW FILTERING}} it does allow > more extensive query capabilities. > *Implementations:* > * Use reflection to grab all the metrics from TableMetrics (see: > CASSANDRA-7622 impl). This is easiest and least abrasive towards new metric > implementors... but its reflection and a kinda a bad idea. > * Add a hook in TableMetrics to register with this virtual table when > registering > * Pull from the CassandraMetrics registery (either reporter or iterate > through metrics query on read of virtual table) -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org