Use Registry

Update time: 2019-07-25

Use Registry

Different Registry integrations provide different ways to access Metrics.

1. LookoutRegistry

Provides the ability to count metrics by a time window. It is divided into two modes: “active” and “passive”. The passive mode is off currently.

(1) Active mode

     You can specify the IP address of the remote agent through [Client Configuration], that is, check when start reporting, and regularly report data.

(2) Passive mode

     This mode can be activated through [Client Configuration], and HTTP service is provided on port 19399.

2. Connect to Prometheus

The data of SOFALookout can be shared with Prometheus. In order to connect to Prometheus, you first need to add dependencies to your project:


After adding the dependencies, launch the application, and you can see the data by visiting http://localhost:9494, where 9494 is the default port, you can configure in to change the port.

Once you have the URL to access the data, you can edit a prometheus.yml to grab the project information. Assuming that the local IP address is, you can configure prometheus.yml as follows:

  - job_name:       'lookout-client'
    scrape_interval: 5s
      - targets: ['']

With the above configuration file, you can start Prometheus locally via Docker:

docker run -d -p 9090:9090 -v $PWD/prometheus.yml:/etc/prometheus/prometheus.yml  --name prom prom/prometheus:master

Then visit http://localhost:9090 through the browser, and you can query the corresponding Metrics through PromQL.

An example of connecting to Prometheus is also available in SOFALookout, so you can go and see it as a reference.

3. Connect to SpringBoot actuator

In addition to Prometheus, SOFALookout can be integrated with the Actuator of SpringBoot 1.x by adding the following dependency:


Then, start and visit http://localhost:8080/metrics to see the data of events logged by the SOFALookout API.