- Notifications
You must be signed in to change notification settings - Fork19
Navigate and explore all of the microservices in your application in real time using the real application connections.
License
hootsuite/microservice-graph-explorer
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The "Microservice Graph Explorer" (aka MGE) is a web application that lets users browse a microservice graph in real time. It is adebugging/visualization tool for microservices that implement theHealth Checks API.
The Microservice Graph Explorer gives you the ability to monitor the health of all your microservices in real time, and providesa dashboard with debugging information that can help you discover the source of outages quickly. It also works as a greatlearning / exploration tool so that the DevOps peeps in your organization can understand all the different dependencies of your application.
Watch demo video
To test the Microservice Graph Explorer with a pre-made service graph:
- Clone the repo athttps://github.com/hootsuite/microservice-graph-explorer-test and follow theinstructions toRun the Services.
The Microservice Graph Explorer provides a dashboard for each service in your service graph. These dashboardshave static deep linksthat you can save and link to from your documentation. The dashboards will automatically refresh with the current info / health every 1 minute (configurable).All dashboards stay in sync across all viewers because the data is pushed from the host server to the browser using websockets and has an event driven backend.This is great because it means all users will always have a consistent view of your microservices health.
The root dashboard for each application that is monitored, has the complete service graph health. Because the Health Checks API links servicestogether as external dependencies, it means that if you check the health of the top node in a microservices graph, this health check propagates over the wholegraph giving you a snapshot in time of the overall graphs health. It truly allows you to see your applications health from the perspective of a user.
The Microservice Graph Explorer also provides a "Health Widget" that you can embed on other web applicationsvia an iFrame.Embed it in your build pipeline or on a health status page, this ensures that everyone sees the current health of your applications. The widget is also clickableand opens to the applicable dashboard.
Ex. Embed in iFrame monitorhttp://demo-app:8080 with:
<iframesrc="http://localhost:9000/widget#/status-indicator/http/demo-app:8080"width="20"height="20"frameborder="0"></iframe>
When a user opens a browser to view the MGE app, a new websocket connection is opened which connects to the backend MGE app. This connectionis used to push front end app state and receive events from the backend status poller. As a user navigates around the app, the front end sendsapplication state to the backend so that the backend can poll the correct services via theHealth Checks API and report back with its health status and its dependencies. This allows the UI to synchronize statebetween all users.
We have published a blessed 1.0.0 version of The Microservice Graph Explorer to Docker hub athttps://hub.docker.com/r/hootsuite/microservice-graph-explorer/.
To pull and run the blessed image:
docker pull hootsuite/microservice-graph-explorer:1.0.0...docker run -p 9000:9000 hootsuite/microservice-graph-explorer:1.0.0
Lastly, openhttp://localhost:9000
microservice-graph-explorer {traverse {applications = [# The URLs to monitor by default# format: "protocol(http|https),Application URL to check,Friendly Name for homepage"# The default config below points at our test service graph that you can run locally. See http://github.com/hootsuite/microservice-graph-explorer-test"http,localhost:8080,Test Service Graph"]}status-poller {poll-interval = 60 seconds# The interval between polling in the Status Polling Actor.remove-router-delay = 1 hour# How long the Status Polling Actor will poll a non default application for before unsubscribing it.}}
The above settings can be changed inapplication.conf or per environment in dev.conf, staging.confand production.conf
You can overwrite the default config in docker by mounting a configuration file into the container using the docker run -v flag. Ex.
docker run -v [absolute path to local application.conf file]:/opt/docker/conf/application.conf -p 9000:9000 hootsuite/microservice-graph-explorer:1.0.0If you want to make custom changes or want to build the code from scratch you need the following dependencies installed:
The backend server code for MGE is written in Scala, a functional programming language built on top of the JVM. To make changes / buildthe code, you will need to install SBT, the Simple Build Tool for Scala fromhttps://www.scala-sbt.org/1.0/docs/Setup.html.
The frontend of the MGE is written in JavaScript using React. To build the JavaScript bundles to run the app locally, you need to install NPM,the Node Package Manager for JavaScript fromhttps://www.npmjs.com/get-npm.
If you want to run/deploy the MGE using Docker, install Docker fromhttps://docs.docker.com/install/.The MGE project uses an SBT plugin calledSBT Native Packager to packagethe app using docker to make running/deployment easier.
Install all the necessary node modules by running
npm install
Run
npm run build
to build the JavaScript bundles
sbt run
to run the dev web server on port 9000. Lastly, openhttp://localhost:9000
SeeDemo section.
Build the docker container locally
sbt docker:publishLocal....[info] Successfully tagged microservice-graph-explorer:1.0.1-SNAPSHOT[info] Built image microservice-graph-explorer:1.0.1-SNAPSHOT
Run the container using the image from the previous step (Ex. microservice-graph-explorer:1.0.1-SNAPSHOT) mapping yourthe 9000 port with the same port in the container. This will use the default configuration that is shipped with the code.
docker run -p 9000:9000 microservice-graph-explorer:1.0.1-SNAPSHOTLastly, openhttp://localhost:9000
Contribute by submitting a PR and a bug report in GitHub.
About
Navigate and explore all of the microservices in your application in real time using the real application connections.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.


