Hi,
It seems I'm struggling to understand the purpose of the HTTP API for registering nodes. I try to use it in order to have nodes with an agent-less configuration. Basically, I want to check that a process is running on that node or that a specific port is open.
This is what I'm trying to do:
- Register a new node with a specific service (port 111).
- Create a health check - a script one, testing the port
"Datacenter": "dev",
"Node": "ServerName1",
"Address": "192.168.18.46",
"Service": {
"Service": "myservice",
"Address": "192.168.18.46",
"Port": 111
},
"check": {
"Node": "ServerName1",
"name": "mycheck",
"id": "mycheck",
"script": "/usr/bin/nc -z 192.168.18.46 111",
"interval": "10s"
}
}'
I haven't found a lot of curl examples using the HTTP API. The documentation is great but lack of "curl -X PUT" examples.
If someone could explain how can I use the HTTP API in order to check a process, that will be welcome.