Using Monitoring Gui

Here is an example running Monitoring Gui on a Native Windows Computer.

Environment setup

create and run docker images about the following tar packages

1
2
3
4
5
6
docker load-i pdp.tar
docker load-i mariadb.tar
docker load-i api.tar
docker load-i apex.tar
docker load-i pap.tar
docker load-i xacml.tar

download latest source from gerrit and create tar by command

1
tar example example.tar

download drools-pdp latest source from gerrit

prepare eclipse for starting drools-pdp

config drools-pdp dependency in eclipse

  • create config folder inside drools-pdppolicy-management, copy feature-lifecycle.properties into this folder

    Create the Folder Arc

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    lifecycle.pdp.group=${envd:POLICY_PDP_PAP_GROUP:defaultGroup}
    
    dmaap.source.topics=POLICY-PDP-PAP
    dmaap.sink.topics=POLICY-PDP-PAP
    
    dmaap.source.topics.POLICY-PDP-PAP.servers=localhost:3904
    dmaap.source.topics.POLICY-PDP-PAP.managed=false
    
    dmaap.sink.topics.POLICY-PDP-PAP.servers=localhost:3904
    dmaap.sink.topics.POLICY-PDP-PAP.managed=false
    
  • update run property “classpath” of “drools.system.Main” in Eclipse

    Update run Property

    Lifecycle classpath setting

Prepare Postman for sending REST request to components during demo

import “demo.postman_collection.json” into PostMan

Import JSON in PostMan

“demo.postman_collection.json”, “link

clean docker environment

1
# docker rm $(docker ps-aq)

Demo steps

docker compose start mariadb and message-router. Mariadb must be started in a seperate console because it needs several seconds to finish startup, and other docker startups depends on this

1
# docker-compose up -d mariadb message-router

docker compose start other components API, PAP, APEX-PDP, XACML-PDP

1
# docker-compose up -d pdp xacml pap api

start “drools.system.Main” in eclipse

verify PDPs are registered into the database

  • start PAP statistics monitoring GUI

    java -jar client/client-monitoring/target/client-monitoring-uber 2.2.0-SNAPSHOT.jar

  • open monitor in browser

    curl localhost:18999

set up pap parameter

Pap parameter

input parameters

Set up pap parameter

Fetch PdpLists

Fetch Pdp Lists

no Engine Worker started, we can only see healthcheck result when we click on the instance APEX statistics

No engine worker started

XACML statistics

XACML statistics

use PostMan to send request to API to create policy type/create policy/ deploy policy

1
2
3
API_Create Policy Type
API_Create Policy
Simple Deploy Policy

now APEX PDP statistics data includes engine worker statistics, and shows the monitoring GUI updating automatically (every 2 minutes)

Engine worker started

use PostMan to send a request to DMAAP, add one xacml-pdp statistics message manually, show that the monitoring GUI updates the PostMan API

xacml-pdp statistics update

Update XACML statistics