A Simple Status Page for Monitoring Application EnviornmentsPosted: June 14, 2018
I was looking for a simple way to set up a status page or dashboard to monitor a REST Service and Web UI for teams to know the current status of application environments and health of the service. There are numerous ways and tools that you can use to achieve this but in this post, I’ll show you a really simple open source tool named greenyet.
greenyet is developed in Clojure and available as standalone JAR file. It polls the configured services for status information and gives a traffic light overview on the service health and availability.
You can dig the source code or simply use the JAR file with a minimal configuration.
Let’s see how to use greenyet to monitor a REST endpoint and Web UI. I have a demo app called das-boot and I want to set up a monitor for teams to monitor the Dev and QA environments.
The first step is to download the JAR file from https://github.com/cburgmer/greenyet/releases
Next, we need to setup couple of YAML configuration files –
This file lists all the hosts that you want to monitor. The list includes a name of the system or application, environment and hostname or IP. Here’s hosts.yaml for das-boot application:
- hostname: 192.168.10.101 environment: QA system: das-boot-service - hostname: 192.168.0.101 environment: QA system: das-boot-ui - hostname: 192.168.10.102 environment: Dev system: das-boot-service - hostname: 192.168.0.102 environment: Dev system: das-boot-ui
This file lists all the matching system entries from the host file and the endpoints. Here’s status_url.yaml for the das-boot application:
- system: das-boot-service url: http://%hostname%:9999/api/v1/ping - system: das-boot-ui url: http://%hostname%:9999/
Create these files in the same directory along with the downloaded JAR file and run following command:
java -jar greenyet-2.0.0-standalone.jar
This will launch the greenyet with default polling interval and port
Open a browser window and navigate to the greenyet. This will display a page similar to below screenshot
You can add more systems and configure additional options. Share this with the team or display on a TV monitor. Here is Raspberry Pi Touch displaying the greenyet monitor: