Hi,
I need to send data/logs by API from a (linux) monitoring server.
I did not find a Graylog API do achieve this in the Graylog documentation.
“Inputs” are data sources, but what i really want to do is push log data to Graylog.
However, there is an Elasticsearch API to achieve this:
curl -X POST http://myserver:9200/idx_name/type_name -H ‘cache-control: no-cache’ -H ‘content-type: application/json’ -d ‘@’./output.json
Elasticsearch then responds somthing pretty optimistic:
{"_index":“idx_name”,"_type":“type_name”,"_id":“AWSUOuGL_gV_qsok9N3w”,"_version":1,“result”:“created”,"_shards":{“total”:2,“successful”:2,“failed”:0},“created”:true}
However I don’t find my log when searching in the stream in Graylog.
So my questions are:
- Is there a Graylog API to push log data ?
- Is is (ro NOT) recommended to use Elasticsearch API (and therefore bypassing Graylog) ?
Thanks,
Guillaume