Getting Data In

splunk forwarder not send data to python socket.io

hammad_yasir
Loves-to-Learn Everything

Hi i hope everyone will be fine.i am facing issue .I am forwarding logs to third party like port of any system.i seen error message at port i am using python third party library scoket.io i face error "code 400, message Bad request version ('nCurrent=0')".help me to solve my issue.with python standard libraray name socket work fine with splunk.when i use with scoket.io libraray its crate error bad request.

 

 

eroor.png

Labels (3)
0 Karma

hammad_yasir
Loves-to-Learn Everything

/opt/splunkforwarder/etc/system/local

 

[tcpout]
defaultGroup = default-autolb-group

[tcpout:default-autolb-group]
server = 192.168.20.185:4845
sendCookedData = false
[tcpout-server://192.168.20.185:4845]

0 Karma

PickleRick
SplunkTrust
SplunkTrust

Now it's more like it. So you're trying to send events via tcpout output which uses proprietary s2s protocol to your wsgi app which expects http.

With sufficiently new forwarder you could try to set up http forwarding.

https://docs.splunk.com/Documentation/Forwarder/8.2.2/Forwarder/Configureforwardingwithoutputs.conf#...

0 Karma

PickleRick
SplunkTrust
SplunkTrust

What exactly are you trying to do?

How do you have it configured?

0 Karma

hammad_yasir
Loves-to-Learn Everything

at python side i have write code

 

import eventlet
import socketio

sio = socketio.Server()
app = socketio.WSGIApp(sio, static_files={
    '/': {'content_type': 'text/html', 'filename': 'index.html'}
})

@sio.event
def connect(sid, environ):
    print('connect ', sid)

@sio.event
def my_message(sid, data):
    print('message ', data)

@sio.event
def disconnect(sid):
    print('disconnect ', sid)

if __name__ == '__main__':
    eventlet.wsgi.server(eventlet.listen(('192.168.20.185', 4848)), app)
0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...