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!

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Get More Out of Your Security Practice With a SIEM

Get More Out of Your Security Practice With a SIEMWednesday, July 31, 2024  |  11AM PT / 2PM ETREGISTER ...