Splunk Search

Can you help us format the y-axis to the Custom Time Format?

abhayneilam
Contributor

Hi,

I want to plot a column chart with time vs day. So day will be in X-axis and time will be in Y-axis.

I am using the following, but it's not working :

| inputlookup time.csv |eval DT=strftime(strptime(Time,"%H:%M:%S"), "%I:%M:%S %p") | chart values(DT) over Day by Time

But in the column visualization, it is not showing any data because the value is not in a numeric format for the Y-axis. Is there any way to plot the graph in the Y-axis as per our format, but Splunk would consider it numeric value i.e., number of seconds, etc internally ?

Kindly help urgently !!

Awaiting reply !!

0 Karma

niketn
Legend

@abhayneilam Charts expect y-axis data to be numeric.

1) So, if you need to depict Stats over time fields on x and y axis consider Punchcard - Custom Visualization
2) If you need to plot duration over time then consider Timeline Custom Visualization

If your requirement is something else please provide a mock with data and screenshot of your expected output.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

abhayneilam
Contributor

You have an image in this link and my problem is similar to this !!

https://answers.splunk.com/answers/564775/how-create-line-chart-using-time-hour-in-y-axis-an.html

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

Hi @abhayneilam

Give this a try: | inputlookup time.csv |eval DT=strftime(strptime(Time,"%H:%M:%S"), "%I:%M:%S %p") | chart count over Day by Time

I am happy to help you more if you supply a couple of rows of sample data.

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...