Skip to main content

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?

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. <3


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.

189_312e20dfce0440c1baa42e83eebfaae3.png

Reply