Enhancement #24375
closed
[feature request] Allow API for 'GET information about a node' to use hostname as well as UUID
Added by Jedd Rashbrooke 2 months ago.
Updated 18 days ago.
- Tracker changed from Bug to Enhancement
- Priority deleted (
0)
Hello,
You can use a search pattern for that (which is a bit awful to be gentle with us, but on the other hand you can get it from the group page URL)
For ex:
curl --globoff -k -X GET -H "X-API-TOKEN: XXXX" 'https://myserver/rudder/api/latest/nodes?where=[{"objectType":"node","attribute":"nodeHostname","comparator":"regex","value":"node.*"}]&include=minimal' | jq -r '.'
Will return all nodes hostname matching node.*
pattern.
You can of course math on "eq", or for list of exact hostnames, you can use the java-flavor regex for alternative:
curl --globoff -k -X GET -H "X-API-TOKEN: XXXX" 'https://myserver/rudder/api/latest/nodes?where=[{"objectType":"node","attribute":"nodeHostname","comparator":"regex","value":"node1.rudder.local|node2.rudder.local"}]&include=minimal' | jq -r '.'
Does it helps ?
Apologies for very slow response.
Yes, this works really well. It was a bit slow to run that query the first, but I think that's just my lab environment being under-resourced. A second call to the group API was very fast. I'll be experimenting with loading up ~ 10,000 nodes (not agent-registered) soon, and will get a better feel for performance there, but I'm optimistic this'll work well.
Thank you again.
- Status changed from New to Resolved
For the latency on first try: rudder being on the JVM, some path need to be warm-up a bit to let the jvm knows that you expect them to be quick. 10k nodes is OK (we have customers with that range), but it might be a bit challanging. Does hesitate to ask if you encounter specific problems regarding that.
(you can ask on chat.rudder.io for more interactive questions/answers sessions)
Hi Jedd,
To extend a bit on François's answer, we do have an internal test platform with 10k nodes - most aspect of Rudder are tested, including the API on this platform
The API does respond well and in a quickly with 10k (but may need a bit of memory) as long as you don't include softwares and processes in the output, as they tend to generate really large output (and can lead to OOM)
Also available in: Atom
PDF