I have a big deployment with hundreds of worker nodes. Is there an easy way to download a full list of worker nodes in json format?
Page 1 / 1
If you dont have access to the CLI to perform an API call, heres a JavaScript snippet that you can paste into your Browsers Developer Console. Once the Fetch (JavaScripts curl, essentially) resolves, it should download a JSON file with the results.
fetch(`${window.location.origin}/api/v1/master/workers`, { "headers": { "authorization": `Bearer ${localStorage.AUTH_TOKEN}`, }, "body": null, "method": "GET", "mode": "cors", "credentials": "include" }) .then(response => response.blob()) .then(blob => { let url = window.URL.createObjectURL(blob); let a = document.createElement('a'); a.href = url; a.download = 'worker_list.json'; document.body.appendChild(a); a.click(); a.remove(); });
I love it when you talk javascript to me.
You can also do this easily directly from the Cribl GUI. Navigate to the stream → workers page and select the button "Export list as" and choose JSON. You can also export as CSV.

Reply
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.