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!

Splunk Forwarders and Forced Time Based Load Balancing

Splunk customers use universal forwarders to collect and send data to Splunk. A universal forwarder can send ...

NEW! Log Views in Splunk Observability Dashboards Gives Context From a Single Page

Today, Splunk Observability releases log views, a new feature for users to add their logs data from Splunk Log ...

Last Chance to Submit Your Paper For BSides Splunk - Deadline is August 12th!

Hello everyone! Don't wait to submit - The deadline is August 12th! We have truly missed the community so ...