Ok so if I understand this right in the command the https://hec.example.com is the name of the splunk server? And the port is what's used when logging in thru the browser, which I have at 8000, or should it be 8088? Then I need to specify the token name and token value as well where it says Splunk B5A79AAD-D822-46CC-80D1-819F80D7BFB0? Here's what I get when I try this:
curl -k http://mysplunk.server:8000/services/collector/event -H "Authorization: Rancher " -d '{"event": "hello world"}' {"text": "Success", "code": 0}
I get this:
See Other The resource has moved temporarily here.
curl: (3) [globbing] unmatched brace at pos 7
curl: (6) Could not resolve host: Success,; Unknown error
curl: (6) Could not resolve host: code; Unknown error
curl: (3) [globbing] unmatched close brace/bracket at pos 2
If I try it like this:
curl -k http://mysplunk.server:8088/services/collector/event -H "Authorization: Rancher " -d '{"event": "hello world"}' {"text": "Success", "code": 0}
I get this:
curl: (52) Empty reply from server
curl: (3) [globbing] unmatched brace at pos 7
curl: (6) Could not resolve host: Success,; Unknown error
curl: (6) Could not resolve host: code; Unknown error
curl: (3) [globbing] unmatched close brace/bracket at pos 2
If I make the command https and use this:
curl -k https://mysplunk.server:8000/services/collector/event -H "Authorization: Rancher " -d '{"event": "hello world"}' {"text": "Success", "code": 0}
I get this:
curl: (35) SSL received a record that exceeded the maximum permissible length.
curl: (3) [globbing] unmatched brace at pos 7
curl: (6) Could not resolve host: Success,; Unknown error
curl: (6) Could not resolve host: code; Unknown error
curl: (3) [globbing] unmatched close brace/bracket at pos 2
And finally if I use the same command but change the port to 8088 I get this:
{"text":"Invalid authorization","code":3}curl: (3) [globbing] unmatched brace at pos 7
curl: (6) Could not resolve host: Success,; Unknown error
curl: (6) Could not resolve host: code; Unknown error
curl: (3) [globbing] unmatched close brace/bracket at pos 2
So what am I doing wrong here?
... View more