Search code examples
azure-service-fabricservice-fabric-stateful

Handle Node Down (being disabled) in Service Fabric


Is there a way to handle the event of a Service Fabric Node going down (NodeStatus change) in C#. Possibly an event I can listen for?


Solution

  • Assuming that you're running in Azure, you can use Azure Monitor Alerts to call a webhook, or a logic app to accomplish this.

    For example:

    In the Monitor - Alerts (classic) pane, select +Add activity log alert. On the Add activity log alert page, select or enter the requested information. In Criteria, make sure that you set the following values: Event category: Select Service Health. Services: Select Virtual Machine Scale Sets and Virtual Machines. Type: Select Planned maintenance.

    More info here and here.