Hi Tomas, as far as I see, the class name of the input is wrong. The correct class name is org.graylog2.inputs.gelf.tcp.GELFTCPInput, as org.graylog2.inputs.gelf.tcp2.* only existed very briefly during the development of Graylog2 0.92.0.
Cheers, Jochen On Friday, 12 December 2014 18:46:46 UTC+1, Tomas Neme wrote: > > I'm trying to create an input using the REST API, but I keep getting 400s, > I'm not sure what I'm doing wrong, and there seems to be no documentation. > I've been looking at the source, but I can't quite follow the java class > maze. Could someone please just advice about the correct content of the > request body? This is the request I'm sending: > > Headers (as a dictionary): > > { > 'Content-Length': '230', > 'Accept-Encoding': 'gzip, deflate, compress', > 'Accept': '*/*', > 'User-Agent': 'python-requests/2.2.1 CPython/2.7.5+ > Linux/3.11.0-26-generic', > 'content-type': 'application/json', > 'Authorization': 'Basic bGFj******''} > > and the content, a JSON string: > > { > "node": "4eb268d1-df15-40a6-8ff3-ec3114182844", > "global": false, > "type": "org.graylog2.inputs.gelf.tcp2.GELFTCPInput", > "configuration": { > "bind_address": "0.0.0.0", > "port": 12202, > "recv_buffer_size": 1048576}, > "title": "gelf tcp" > } > > I've tried several different ways of putting the configuration data, with > and without the node id, with global with either value, also naming > configuration 'attributes' (like GET returns) and changing the fields > inside 'configuration' to 'configuration_*' instead, and putting them at > the root of the object, to no avail. Can't figure this one out. Please help? > -- You received this message because you are subscribed to the Google Groups "graylog2" group. To unsubscribe from this group and stop receiving emails from it, send an email to graylog2+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.