If you followed Service Fabric a bit since it's announcement, you surely saw the Cluster Monitor in one or several public events. Beside being extremely fun to watch when your services are moving around the cluster or when a node is down for example, it gives you the ability to learn more about the Management API of Service Fabric in a realistic scenario.

Cluster Monitor Sample

To test it yourself, you can download a zip file containing the Service Fabric samples from GitHub (See the References section) or clone the Service Fabric samples repository in Visual Studio, I'll show the later.

Cloning the repository

Fire up a version of Visual Studio that have support for Git (I'll use VS 2015, but you can clone a Git repository with 2012 or later - UI will change a little though)

  • Open the Team Explorer tab, in the Local Git Repositories section, click Clone link.
  • Enter the repository url: https://github.com/Azure/servicefabric-samples.git
  • Choose the path where the repository is gonna be cloned on your local computer.
  • Click the Clone button
    Clone Service Fabric samples repository

Build the Cluster Monitor sample

  • Open the solution located at {Repo}\samples\Services\VS2015\ClusterMonitor\ClusterMonitor.sln where {Repo} is the folder where you cloned your repository.
  • Build the solution. it should automatically download the required NuGet packages.

Deploy the Cluster Monitor sample

  • Right-click the ClusterMonitorApplication project in Solution Explorer and click Deploy

Wait for the deployment to complete and here you go. You can now browse the Cluster Monitor by entering http://localhost:8081/cluster/index.html in your web browser.

Happy visualization!

In a future article, I'll dig with you in the code of this sample, stay tuned!