Post Install Setup

Hi,

I would like to configure System/Inputs section without using a browser. Is this possible? Is there a cli or api that can be used to do this?

Regards

Matthew

If you check out the api-browser section, you can do this via API using System/Inputs section. You can also query the endpoint api/system/inputs/types for the different types available on the node.

This is example using curl to create UDP Syslog Input on port 12514. Use your node-id.

curl -i -X POST -u admin:admin -H 'Content-Type: application/json' -H 'X-Requested-By: cli' http://172.28.128.18:9000/api/system/inputs --data-raw '{"title":"UDP3","type":"org.graylog2.inputs.syslog.udp.SyslogUDPInput","configuration":{"bind_address":"0.0.0.0","port":12514,"recv_buffer_size":262144,"number_worker_threads":2,"override_source":null,"force_rdns":false,"allow_override_date":true,"store_full_message":true,"expand_structured_data":true},"global":false,"node":"e849b299-2e6e-4fe2-95da-7d91ba0bcb7d"}'

Thanks for the replies and examples. Exactly what I was looking for.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.