Hello,
I am using an Elastic Cloud instance and I was wondering if there was the possibility to send data via MQTT from a Linux system device in the cloud.
How can I do?
Thank you
Hi
I'd use
Thanks for the response.
If i would send data to Elastic from any device via HTTP / HTTPS?
Can I interact with a CURL call?
Yes.
curl -X POST "localhost:9200/indexname/_doc" -H 'Content-Type: application/json' -d'
{
"foo": "bar"
}
'
Sorry,
I said "Elastic Cloud" in my first post....not localhost.
What should I use? Cluster ID?Endpoint? There is some autenthication?
Thanks
What should I use? Cluster ID?Endpoint? There is some autenthication?
The elasticsearch endpoint yes.
There is authentication yes. When you created the deployment you got your password for the elastic
account which you need to use.
Or better, create a new user with limited privileges from Kibana and use this user.
I tried:
curl -v -X POST -u XXX:XXX -H "Content-Type: application/json" "https://XXX.es.europe-west3.gcp.cloud.es.io:9243/test/_doc " -d' { "foo": "bar" }'
with response "Content-Type header [multipart/form-data; boundary=--------------------------841656771037045464898756] is not supported".
Any idea?
Nope. But it's always easier to run all that from Kibana Dev Console.
Just paste this and click run:
POST /test/_doc
{
"foo": "bar"
}
BTW this is not related to the initial question so you should create a new thread as I will park this one as solved.
Ok, but I have to do this call from outside Kibana console.
Anyway, Ok, close the topic
Thanks
But do you have to run that from a shell script or an application ?
Now I'm trying from Postman, but I would use a POST call from differente application (NodeJS, python...etc)
Postman or Kibana dev console are quite similar. But kibana dev console is easier to use.
When you will use the JS or Python client, it contains all the headers you need.
I'd really encourage you to make your life easier by starting with the Kibana console
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.