How to check self-hosted integration runtime status using az cli command?

Viewed 128

I'm using below command to get the Self-Hosted Integration Runtime status

az datafactory integration-runtime get-status

But it returns all the content and I want to check the node status. How to further filter the only the node status?

1 Answers

You can filter the json results by using the global query parameter. The query parameter uses JMESPath to query the results for the specified filter. If you just want to get the status for a node it would look something like this:

az datafactory integration-runtime get-status --factory-name "exampleFactoryName" --name "exampleIntegrationRuntime" --resource-group "exampleResourceGroup" --query "properties.nodes[?nodeName == 'my-node'].status"

In this example we are asking to return the status attribute of the nodes array of the properties object where the nodeName attribute is equal to 'my-node'. You could specify whatever node name is appropriate and it should return the status. You can do more complicated json result shaping by following some of the examples on the website linked above.

Related