Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 

PSQL - Show recent policy installation details

Danny
MVP Platinum
MVP Platinum

🏆 PSQL wizardry!
👉 Directly queries the management database

PSQL query to show the 20 most recent policy installations on a Check Point Security Management (SmartCenter).
In expert mode run:


    psql_client cpm postgres -c "SELECT d.name AS domain, COALESCE(ap.name, tp.name, '—') AS policy_package, COALESCE(gw.name, '—') AS target, ws.username, ws.name AS session_name, ws.applicationname AS client, STRING_AGG(DISTINCT CASE WHEN ap.name IS NOT NULL THEN 'Access Cont
...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free

Disclaimer: Check Point does not provide maintenance services or technical or customer support for third party content provided on this Site, including in CheckMates Toolbox. See also our Third Party Software Disclaimer.




1 Reply

the_rock
MVP Platinum
MVP Platinum

Awesome!

 


[Expert@CP-MANAGEMENT:0]#
TRING_AGG(DISTINCT CASE WHEN ap.name IS NOT NULL THEN 'Access Control' WHEN tp.name IS NOT NULL THEN 'Threat Prevention' ELSE 'Unclassified' END, ', ') AS policy_types, ipr.statusdescription AS install_status, TO_CHAR(ipr.creationtime, 'YYYY-MM-DD HH24:MI:SS') AS install_time FROM installpolicyresponse ipr LEFT JOIN accesspolicy_data ap ON ipr.policyid = ap.objid LEFT JOIN threatpolicy_data tp ON ipr.policyid = tp.objid LEFT JOIN worksession ws ON

...;
TO ACCESS CHECKMATES TOOLBOX it's simple and free


0 Kudos