Skip to main content
Solved

How can I download a list of worker nodes in JSON format?

  • March 11, 2025
  • 3 replies
  • 6 views

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?

Best answer by Jeremy Prescott

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();  });

3 replies

  • Employee
  • 26 replies
  • Answer
  • March 11, 2025

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();  });

  • Author
  • Employee
  • 10 replies
  • March 11, 2025

I love it when you talk javascript to me. <3


  • Employee
  • 27 replies
  • March 11, 2025

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