Hygieia Basics: Metrics, Monitoring, and Observability

Hygeia is a free open source Dashboard for monitoring DevOps activities, end-to-end. I first heard about Hygeia in mid 2017, we didn’t get to work with it until a whole year later. My friend Venae put together a clear and simple document on how to start using it. It’s a great way to incorporate observability into your DevOps practices. With this tool, Capital One continues to demonstrate its industry leadership in DevOps. The fact that they made it open source is all the more impressive.

By Venae Sidhu


Prerequisites

Install Git: http://git-scm.com/download/win

Install Java: https://java.com/en/download/

Install Maven: http://apache.claz.org/maven/maven-3/3.5.3/source/apache-maven-3.5.3-src.zip

Install JDK 1.8: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Ensure JAVA_HOME environment variable is set and points to your JDK installation

Add the path to the bin\ directory of the Maven installation to the PATH environment variable

Install MongoDB: https://www.mongodb.com/download-center#community

Create a database using the mongo shell by running the “mongo” command or using Robo which can be downloaded here: https://robomongo.org/download


Download Hygieia

Clone the following repo: https://github.com/capitalone/Hygieia

> git clone https://github.com/capitalone/Hygieia


Build Hygieia, API, and UI

  1. Open a terminal and change to the \Hygieia directory of your source code installation and run the maven build using the following command:
    1. > mvn clean install package
    2. Change to the \api directory and set the configurable parameters (dbname, dbpassword, etc.) in the .properties file to connect to each component.
    3. If using a private repo, follow the steps in the section ‘Encryption for Private Repos’ before continuing.
  2. Change directory to \api\target and run the executable file for API module using the following command:
    1. > java -jar api.jar –spring.config.location=C:\[path to]\Hygieia\api\api.properties
  3. Change to the \UI directory and run the UI module using the following command:
    1. > gulp serve

Building each collector

  1. Navigate to the directory of the collector you wish to configure
  2. Run the maven build to package the collector into a .jar file
    1. > mvn install
  3. Set the .properties file with the database and collector properties
  4. Change to the collector’s \target directory and execute the following command:
    1. > java -jar collector.jar –spring.config.name=collectorname –spring.config.location=[path to application.properties file]

Supported Collectors: bamboo, sonar, versionone, artifactory, bitbucket, hipchat, jenkins


Encryption for Private Repos

  1. Navigate to the \core directory and enter the following command to generate a secret key:
    1. > java -jar <path-to-jar>/core-2.0.5-SNAPSHOT.jar com.capitalone.dashboard.util.Encryption
  2. Change to the\api directory and add the key to your api.properties file:
    1. key=<your-generated-key>
  3. Change to the the directory of your source control collector and add the key to your application.properties file:
    1. git.key=<your-generated-key>



Starting Up Hygieia

Each time you start Hygieia back up, you need to run the following commands:

  1. Navigate to the \api\target directory and run the following command:
    1. > java -jar api.jar –spring.config.location=C:\[path to]\Hygieia\api\api.properties
  2. Navigate to the \UI directory and run the following command
    1. > gulp serve
  3. Navigate to each of the collector’s \target directories and run the following command for each collector:
    1. > java -jar collector.jar –spring.config.name=collectorname –spring.config.location=[path to application.properties file]

Using the UI

  1. Open up localhost:3000/ to access the dashboard UI.
  2. Click the power button on the top right to go to the sign-in page. Enter your credentials to log in or create a new account.
  3. Click Signup to create a new account. If there is no admin account yet, create one with the username “admin” and any password.
  4. Click the gear button on the top right to access admin settings. You can edit/delete dashboards, add/remove admins, generate api tokens, create/manage dashboard templates, and edit collector configurations.

Creating Dashboards

  1. Click the plus button to create a new dashboard.
  2. Choose to either create a Team Dashboard (Steps 3 – 6) or Product Dashboard (Steps 7 – 8).
  3. If creating a Team Dashboard, enter the ‘Dashboard Title’, ‘Application Name’, and optionally the Business Service and Business Application.
  4. Select the appropriate radio button to either add widgets or choose from a template.
  5. Select a template from the dropdown if selecting ‘Select Templates’.
  6. Click ‘Create’ to create the dashboard, if choosing ‘Select Widgets’ you will be prompted to select the widgets for your dashboard.
  7. If creating a Product Dashboard, enter the ‘Dashboard Title’, ‘Application Name’, and optionally the Business Service.
  8. Click ‘Create’ to create the dashboard.

Managing Dashboards

 

Source: http://capitalone.github.io/Hygieia/getting_started.html

 

Leave a Reply

Your email address will not be published. Required fields are marked *