Security

How can I display the current users metric index and their access permissions?

DATEVeG
Path Finder

Hi,

We created a new app, which is configured as the default app for most of the users.
The app contains a default view, which lists all splunk indexes including the metric indexes.

For each index, there is a column which indicates, if the current user has access permissions for the corresponding index.
Our method to list all indexes with access permissions for the current user is:
| eventcount summarize=false index=*

However, this method doesn't work for the new indextype metric.

How can I list all the indexes, which the currently logged in user has access to?
The list should include the indexes searched by default and also the indexes which must be specified explicitly.

Thanks!
- Lorenz

0 Karma
1 Solution

poete
Builder

Hello,

In case of metrics this does what you want:
| mstats count(_value) where index=someMetricsIndex AND metric_name=*

View solution in original post

0 Karma

poete
Builder

Hello,

In case of metrics this does what you want:
| mstats count(_value) where index=someMetricsIndex AND metric_name=*

0 Karma

DATEVeG
Path Finder

Hi,

your SPL-Statement will show all the metrics in one index.

What i want:
- List all metric indexes which exists
- List all metric indexes which the currently logged in user has access to

0 Karma

poete
Builder

OK. And what about this?

| mstats count(_value) where index=* AND metric_name=* by index

DATEVeG
Path Finder

This is working as expected.
Thanks!

0 Karma

slippenh
New Member

Try this "| eventcount summarize=false index=* | dedup index | fields index"

0 Karma

DATEVeG
Path Finder

This doesn't show any metric indexes.

0 Karma

felipesewaybric
Contributor

I don't get it, with the above, all you do is counting every index that 'summarize' is false?

What I would do is something like:

index=* | dedup index | table index

Can you give other example or something?

What is the name of that column?

0 Karma

DATEVeG
Path Finder

In the world of event indexes, your example with
index=* | dedup index | table index
will work. It is just ways slower than my solution above.

With the new metric indexes in Splunk 7.x, i don't know how to archive the same result.
So again my question:
How can I list all metric indexes, which the currently logged in user has access to?

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...