All Apps and Add-ons

Why is strptime not working with Calendar - Custom Visualization?

kiran331
Builder

Hi

I want to show the Logon time and logoff time and duration in calendar customization in human readable format but its not working when I convert epoch time in to readable format.

search i'm using:

index=cisco_wsa user=abcdk| eval time=_time | timechart span=1d min(time) as "LogonTime", max(time) as "LogoffTime"|eval Duration=(LogoffTime - LogonTime)/3600 |convert  timeformat="%m/%d/%y %H:%M:%S" ctime(*)
0 Karma

jconger
Splunk Employee
Splunk Employee

The calendar custom visualization is expecting numerical data for the values which is similar to a line chart. Basically, if it works on a line chart, it should work on the calendar as well.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Have you tried using fieldformat?

index=cisco_wsa user=acdkn002 | eval time=_time | timechart span=1d min(time) as "LogonTime", max(time) as "LogoffTime"|eval Duration=(LogoffTime - LogonTime)/3600 |fieldformat LogonTime=strftime(LogonTime,"%m/%d/%y %H:%M:%S") |fieldformat LogoffTime =strftime(LogoffTime ,"%m/%d/%y %H:%M:%S")
---
If this reply helps you, Karma would be appreciated.
0 Karma

kiran331
Builder

I tried, its not working.

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...