All Apps and Add-ons

Display the selected month data using dropdown in Splunk dashboard

Nith1
Path Finder

Hi,

Im new to Splunk and my task is to built a Splunk Dashboard where i must have a dropdown and have 12 months listed in it and the dashboard must populate data only for the selected month. Can someone let me know the splunk query to build the same.

Also how to set the field for value and field for label.

My logs contains fields like 
IssueCreated, Key,  Project Id, Project Name, IssueType, Status, Summary, Assigned to ,Assigned By

Thanks

 

 

Labels (2)
Tags (1)
0 Karma

manjunathmeti
Champion

Hi @Nith1,

Below works for months in the current year. Create a dropdown like below.

<input type="dropdown" token="month">
      <label>Select Month</label>
      <choice value="earliest=@y latest=@y+1mon">January</choice>
      <choice value="earliest=@y+1mon latest=@y+2mon">February</choice>
      <choice value="earliest=@y+2mon latest=@y+3mon">March</choice>
      <choice value="earliest=@y+3mon latest=@y+4mon">April</choice>
      <choice value="earliest=@y+4mon latest=@y+5mon">May</choice>
</input>


And use the token month in your base search.

index=INDEXNAME $month$ | table IssueCreated, Key, "Project Id", "Project Name", IssueType, Status, Summary

 

If this reply helps you, an upvote/like would be appreciated.



Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...