Splunk Search

How to edit my search to prevent my sparkline from displaying as a flat line with zeros for values?

briang67
Communicator

Hello,

I have the following search:

sourcetype=some_data | stats values(msg_type) first(_time) as start by id_field project_field interface_field | evals and lookups etc...

I would like to add a sparkline to count the individual occurrences of the project_field, however, the below results in a sparkline with a flat line with zeros for values:

sourcetype=some_data | stats values(msg_type) first(_time) as start by id_field project_field interface_field | evals and lookups etc... | stats sparkline count by project_field

When I try to add a sparkline to the beginning of the search, I'm seeing an error because the project_field is one of the grouped by fields.

Any ideas?

thanks!

Tags (3)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

A sparkline is inherently timestamp-based, yet the data you send into the sparkline has no _time field.
Think about what value you want as timestamp for the sparkline... might be the start field, might be something else... and put that into a field called _time.

0 Karma
Get Updates on the Splunk Community!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...