This is my sink configuration
"sinks": {
"console_sink": {
"type": "console",
"inputs": [
"vector_http_test_transform"
],
"encoding": {
"codec": "json"
}
},
"my_http_sink": {
"type": "http",
"inputs": [
"vector_http_test_transform"
],
"method": "post",
"encoding": {
"codec": "json"
},
"request": {
"headers": {
"Content-Type": "application/json"
}
},
"uri": "http://myHost:myPort/logs"
}
}
My console print like this :
{"file":"/data/logs/n9e-logs/test.log","host":"host.novalocal","message":{"level":"INFO","lineNumber":"21","logDate":"2024-09-24 15:19:14.660963","message":"event(c695d938d8955d triggered) push_queue: rule_id=47 tags:[__name__=mem_used_percent data_group=tok_3dc2a5e1457744379dad ] 2024-09-20 15:19:14.000 ","method":"dispatch/log.go"},"source_type":"file","timestamp":"2024-09-26T02:19:30.405"}
And my sevice get correct request with curl:
curl -X POST http://myHost:myPort/logs -H "Content-Type: application/json" -d '{"key":"value"}'
But my service get no http request from vector http sink,what should i do?
New contributor
Rui Qin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.