All Apps and Add-ons

Splunk App for AWS: How to pass tags token with spaces for its key in dashboard?

sreedharmallemp
Explorer

Hi all,

We are using AWS App and the dashboard for EC2 Instances and in the Tags field where can select the key available we can pass the values available for that tag key. It works fine as long as the tag key is a single word without any spaces like below

aws-description-resource( (aws_account_id="0456789514") , (region="*") , "ec2_instances") |search tags.Name="splunk"
| stats count(id) as count by state
| eventstats sum(count) as total | where state!="running"
| nadefault count total
| eval _total_name="instances", _total_field=total

But we have some tag keys that has space like OS Type and it comes like below which doesn't work due to space.
aws-description-resource( (aws_account_id="0456789514") , (region="*") , "ec2_instances") |search tags.OS Type="windows"
| stats count(id) as count by state
| eventstats sum(count) as total | where state!="running"
| nadefault count total
| eval _total_name="instances", _total_field=total

Above search wont give any results as tags token becomes (tags.OS Type="windows") and it doesnt work due to space.
Can someone help me how to resolve this?

Thanks!
SM

0 Karma

oscar84x
Contributor

Very simple suggestion, so sorry if you already tried, but have you tried wrapping the tag with the spaces in quotes?
Could you also maybe provide a sample event(s) that contain this field?

0 Karma

sreedharmallemp
Explorer

hi Oscar , I have already tried manually passing the key with " " for the tag and it does works as expected. I'ts just am thinking of to have that quotations passed/appear from dashboard directly rather than manually entering them so it will be nice to have.

Thanks for your reply!

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...