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!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...