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.tardownload latest source from gerrit and create tar by command
1tar example example.tardownload 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
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=falseupdate run property “classpath” of “drools.system.Main” in Eclipse
Prepare Postman for sending REST request to components during demo¶
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-routerdocker compose start other components API, PAP, APEX-PDP, XACML-PDP
1# docker-compose up -d pdp xacml pap apistart “drools.system.Main” in eclipse
verify PDPs are registered into the database
get pdp lists in database
curl –location –request GET ‘http://localhost:7979/policy/pap/v1/pdps’ –user ‘healthcheck:zb!XztG34’ | json_pp
get statistics
curl –location –request GET ‘http://localhost:7979/policy/pap/v1/pdps/statistics/’ –user ‘healthcheck:zb!XztG34’ | json_pp
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
input parameters
Fetch PdpLists
no Engine Worker started, we can only see healthcheck result when we click on the instance APEX 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 Policynow APEX PDP statistics data includes engine worker statistics, and shows the monitoring GUI updating automatically (every 2 minutes)
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