All Apps and Add-ons

How to get eventgen (installed as an App) to continuously replay 3 events just replacing the timestamp?

ilya_resh
Engager

Hi,

I want eventgen (installed as an App) to continuously reply 3 events just replacing the timestamp

 

 

 

# etc/apps/my_app/local/eventgen.conf
[host_perf_monitor.sample]
mode = replay
interval = 15
earliest = -15s
latest = now

outputMode = file
fileName = /opt/tmp/host_cpu.log

token.0.token = \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}
token.0.replacementType = replaytimestamp
token.0.replacement = %Y-%m-%d %H:%M:%S


# etc/apps/my_app/samples/host_perf_monitor.sample

2022-03-24 01:01:10 host=linux_server_01 status=WARNING object=cpu_used_pct value=66
2022-03-24 01:01:12 host=linux_server_01 status=ERROR object=cpu_used_pct value=85
2022-03-24 01:01:14 host=linux_server_01 status=GOOD object=cpu_used_pct value=44

 

 

 

 

if the eventgen would run at 08:38:45 I would expect that the output will be

 

 

2022-03-25 08:38:41 host=linux_server_01 status=WARNING object=cpu_used_pct value=66
2022-03-25 08:38:43 host=linux_server_01 status=ERROR object=cpu_used_pct value=85
2022-03-25 08:38:45 host=linux_server_01 status=GOOD object=cpu_used_pct value=44

 

 

but it is (first and second event are at the same time)

 

 

2022-03-25 08:38:43 host=linux_server_01 status=WARNING object=cpu_used_pct value=66
2022-03-25 08:38:43 host=linux_server_01 status=ERROR object=cpu_used_pct value=85
2022-03-25 08:38:45 host=linux_server_01 status=GOOD object=cpu_used_pct value=44

 

 

Tried with other event "spreads" as well (for example on 01, 34, 45 seconds) and will still always get 1st and 2nd events with the same timestamp.

Thanks

 

Labels (1)
Tags (1)
0 Karma
Get Updates on the Splunk Community!

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Splunk App for Anomaly Detection End of Life Announcement

Q: What is happening to the Splunk App for Anomaly Detection?A: Splunk is officially announcing the ...