1. Home
  2. FlexRule Server
  3. Introduction
  4. Monitoring in FlexRule Server

Monitoring in FlexRule Server

Print Friendly, PDF & Email

◷ Reading Time: 4 minutes

Monitoring is built into FlexRule Server. The monitoring capability allows your application to collect metrics from different nodes.

There are a couple of different stats for monitoring which then can be collected from /api/stats/metrics.

Metrics

There are couple of group of metrics that can be collected:

  1. Node usages (total memory, cpu time/usage, etc.)
  2. Resources (numbers of applications, accounts, roles, packages, services…)
  3. Licenses (number of available agent slots, total, used, etc.)
  4. Service Execution (total failed, successful calls, performance, etc.)

Prometheus

Prometheus is an open-source system monitoring and alerting toolkit. You can learn more about its overview. FlexRule Server /api/stats/metrics exposes the metrics in [prometheus.io] format.

To add the Prometheus monitoring planform to the FlexRule Server infrastructure you can simply:

  1. Download and install [prometheus.io]
  2. Configure the Prometheus to collect metrics
  3. Build a dashboard using Grafana

Download

Download a version for your OS. Installation is as simple as unzipping the package and you can see below files:

  • prometheus.exe
  • prometheus.yml

Configure

Prometheus, uses concept of Job to scrap information from different nodes.So the only thing you need to do is adding a new Job to Prometheus to collect the metrics from FlexRule Server API end point.

To add the Job, Open prometheus.yml and add below into scrape_configs section:

- job_name: 'frs'
   metrics_path: /api/stats/metrics
 
   basic_auth:
     username: 'admin'
     password: 'FlexRuleServer'
 
   scrape_interval: 5s
   scrape_timeout: 5s
 
   static_configs:
     - targets: ['192.168.10.10:9000']
  • basic_auth
    • username: Is the user that has access to call the API metrics
    • password: The password for user to authenticate
  • targets: the address of the node. This can be configured for all Master and Agent nodes of your clusters.

When Prometheus scrap the FlexRule Server the following metrics become available:

  • Memory and CPU
    • frs_dotnet_totalmemory
    • frs_gc_collection_count_total
    • frs_process_cpu_seconds_total
    • frs_process_start_time_seconds
    • frs_process_windows_num_threads
    • frs_process_windows_private_bytes
    • frs_process_windows_virtual_bytes
    • frs_process_windows_working_set
  • Execution:
    • frs_execution_failed
    • frs_execution_successful
    • frs_execution_successful_speed
    • frs_execution_successful_speed_count
    • frs_execution_successful_speed_sum
  • Resources
    • frs_license_allowed_total
    • frs_resources
    • frs_resources_application
    • frs_resources_package
    • frs_resources_service
    • frs_resources_user
    • frs_resources_workflow_instances_count

On the machine, you have installed Prometheus, simply navigate to its web address i.e. http://localhost:9090/graph and you can build your simple dashboard:

Prometheus allows building simple graphs for the metrics, but feel free to use any other product to do that so. For example, we use Grafana to create a wonderful dashboard for the FlexRule Server metrics.

Grafana

Grafana is an open source metric analytics & visualization suite. It is most commonly used for visualizing time series data for infrastructure and application analytics but many use it in other domains including industrial sensors, home automation, weather, and process control.

Once you installed the Grafana, you can connect it to FlexRule Server Prometheus instance that is monitoring the FlexRule Server and build a Dashboard like below:

Updated on August 9, 2019

Was this article helpful?

Related Articles