All Apps and Add-ons

Eventgen frustrations

npgandlove
Observer

I am working with eventgen. I have my eventgen.conf file and some sample files. I am working with the toke and regex commands in the eventgen.conf. I can get all commands to work except mvfile. I tried several ways to create the sample file but eventgen will not read the file and kicks errors such as file doesn't exist or "0 columns". I created a file with a single line of items separated by a comma and still no go. If i create a file with a single item in it whether it be a word or number, eventgen will find it and add it to the search results. If i change it to mvfile and use :1, it will not read the same file and will kick an error. Anyone please give me some guidance on why the mvfile doesn't work. Any help would be greatly appreciated.

Search will pull results from (random, file, timestamp) commands, just not mvfile

snip from eventgen.conf

"token.4.token = nodeIP=(\w+)

token.4.replacementType = mvfile

token.4.replacement = $SPLUNK_HOME/etc/apps/SA-Eventgen/samples/nodename.sample:2"

snip from nodename.sample

host01,10.11.0.1

host02,10.12.0.2

host03,10.13.0.3

Infrastructure

ubuntu server 24.04

Splunk 9.4.3

eventgen 8.2.0

 

I have tried to create a file from scratch with Notepad++, notepad, excel, and directly on the linux server in the samples folder.  I have validated that file as a csv file with "goteleport" and "csvlint" sites

Labels (2)
0 Karma

npgandlove
Observer

I have taken the file and deleted and repopulated it.  I have used a new file created in notepad++ and another file created in excel.  still no luck.  I am beyond frustrated because I know it is something simple somewhere just cannot figure out where. 

0 Karma

livehybrid
Super Champion

Hi @npgandlove 

The mvfile replacementType in Eventgen expects the sample file to be a valid CSV with at least two columns, and the column index in your replacement (:2) must refer to the correct column (1-based index). The error "0 columns" usually means Eventgen can't parse the file as CSV or the column index is out of range.

You mentioned that you "created a file with a single line of items separated by a comma" - perhaps try the following nodename.sample:

host01,10.11.0.1
host02,10.12.0.2
host03,10.13.0.3

Then eventgen should take column 2 (the IP) for your substitutions.

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma
Get Updates on the Splunk Community!

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...

From Alert to Resolution: How Splunk Observability Helps SREs Navigate Critical ...

It's 3:17 AM, and your phone buzzes with an urgent alert. Wire transfer processing times have spiked, and ...