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

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

download latest source from gerrit and create tar by command

1tar 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

     1lifecycle.pdp.group=${envd:POLICY_PDP_PAP_GROUP:defaultGroup}
     2
     3dmaap.source.topics=POLICY-PDP-PAP
     4dmaap.sink.topics=POLICY-PDP-PAP
     5
     6dmaap.source.topics.POLICY-PDP-PAP.servers=localhost:3904
     7dmaap.source.topics.POLICY-PDP-PAP.managed=false
     8
     9dmaap.sink.topics.POLICY-PDP-PAP.servers=localhost:3904
    10dmaap.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

1API_Create Policy Type
2API_Create Policy
3Simple 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