Splunk Enterprise

EventGen: : 'HTTPEventOutputPlugin' object has no attribute 'serverPool'

khayamgondal
Engager

EventGen v7.2.1 throws the following exception - Python 3.9.2 DockerImage: nginx

eventgen        2022-04-06 15:08:42 eventgen        ERROR    MainProcess Unexpected character in found when decoding object value
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/splunk_eventgen/lib/plugins/output/httpevent_core.py", line 136, in updateConfig
    self.httpeventServers = json.loads(config.httpeventServers)
ValueError: Unexpected character in found when decoding object value
2022-04-06 15:08:42 eventgen        ERROR    MainProcess 'HTTPEventOutputPlugin' object has no attribute 'serverPool'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/splunk_eventgen/lib/plugins/output/httpevent_core.py", line 250, in _sendHTTPEvents
    self._transmitEvents(stringpayload)
  File "/usr/local/lib/python3.9/dist-packages/splunk_eventgen/lib/plugins/output/httpevent_core.py", line 261, in _transmitEvents
    targetServer.append(random.choice(self.serverPool))
AttributeError: 'HTTPEventOutputPlugin' object has no attribute 'serverPool'
2022-04-06 15:08:42 eventgen        ERROR    MainProcess failed indexing events, reason: 'HTTPEventOutputPlugin' object has no attribute 'serverPool'

.conf file

[cyclical.csv]
mode=sample
interval=60
count=1
outputMode=httpevent
httpeventServers = {"servers": [{"protocol": "https", "port": "8088", "key": "0617eea5-87a9-4d18-8ed4-6dc085ddbe2c"", "address": "172.19.15.140"}]}
index=main
sourcetype=eventgen
sampletype=csv
source=eventgen_cyclical

I am running it like this

v7.2.1 throws the following exception. Python:3.9.2 DockerImage:nginx

eventgen        2022-04-06 15:08:42 eventgen        ERROR    MainProcess Unexpected character in found when decoding object value
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/splunk_eventgen/lib/plugins/output/httpevent_core.py", line 136, in updateConfig
    self.httpeventServers = json.loads(config.httpeventServers)
ValueError: Unexpected character in found when decoding object value
2022-04-06 15:08:42 eventgen        ERROR    MainProcess 'HTTPEventOutputPlugin' object has no attribute 'serverPool'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/splunk_eventgen/lib/plugins/output/httpevent_core.py", line 250, in _sendHTTPEvents
    self._transmitEvents(stringpayload)
  File "/usr/local/lib/python3.9/dist-packages/splunk_eventgen/lib/plugins/output/httpevent_core.py", line 261, in _transmitEvents
    targetServer.append(random.choice(self.serverPool))
AttributeError: 'HTTPEventOutputPlugin' object has no attribute 'serverPool'
2022-04-06 15:08:42 eventgen        ERROR    MainProcess failed indexing events, reason: 'HTTPEventOutputPlugin' object has no attribute 'serverPool'

EventGen conf file

[cyclical.csv]
mode=sample
interval=60
count=1
outputMode=httpevent
httpeventServers = {"servers": [{"protocol": "https", "port": "8088", "key": "0617eea5-87a9-4d18-8ed4-6dc085ddbe2c"", "address": "172.19.15.140"}]}
index=main
sourcetype=eventgen
sampletype=csv
source=eventgen_cyclical

Running it using
python3 -m splunk_eventgen -v generate -s cyclical.csv eventgen.conf

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...