2013年12月3日火曜日

Clearpass SQL

ClearPass supports SQL query from external server. I usually use pgAdmin as SQL tool toward ClearPass. I made several queries such as below.


SELECT * FROM cppm_license WHERE (t1.timestamp >= '2012-01-01')

OK
SELECT t1.user_name, t1.framed_ip_address, t1.timestamp, t2.attr_value, t1.acct_status_type FROM tips_radius_accounting_log t1 LEFT OUTER JOIN tips_session_log_details t2 ON t1.id=t2.session_id WHERE (t1.timestamp >= --START-TIME--) AND (t1.timestamp <= --END-TIME--)

OK
SELECT t1.user_name, t1.framed_ip_address, t1.timestamp, t2.attr_value, t1.acct_status_type FROM tips_radius_accounting_log t1 RIGHT OUTER JOIN tips_session_log_details t2 ON t1.id=t2.session_id WHERE (t1.timestamp >= --START-TIME--) AND (t1.timestamp <= --END-TIME--)

OK
SELECT t1.user_name, t1.framed_ip_address, t1.timestamp, t2.attr_value, t1.acct_status_type FROM tips_radius_accounting_log t1 RIGHT OUTER JOIN tips_session_log_details t2 ON t1.id=t2.session_id WHERE (t2.attr_name='Authentication:OuterMethod') AND (t1.timestamp >= --START-TIME--) AND (t1.timestamp <= --END-TIME--)

OK
SELECT t1.user_name, t1.framed_ip_address, t1.timestamp, t2.attr_value, t1.acct_status_type FROM tips_radius_accounting_log t1 RIGHT OUTER JOIN tips_session_log_details t2 ON t1.id=t2.session_id WHERE (t2.attr_name='Radius:IETF:NAS-Identifier') AND (t1.timestamp >= --START-TIME--) AND (t1.timestamp <= --END-TIME--)

SELECT t1.user_name, t1.framed_ip_address, t1.timestamp, t2.attr_value, t1.acct_status_type FROM tips_radius_accounting_log t1 RIGHT OUTER JOIN tips_session_log_details t2 ON t1.id=t2.session_id WHERE (t2.attr_name='Certificate:Subject-CN') AND (t1.timestamp >= --START-TIME--) AND (t1.timestamp <= --END-TIME--)


t2.attr_name='Authentication:OuterMethod'
t2.attr_name='Radius:IETF:NAS-Identifier'
t2. attr_name='Certificate:Subject-CN'

SELECT node_ip, app_name, total_count, used_count, updated_at FROM cppm_license WHERE (t1.timestamp >= --START-TIME--) AND (t1.timestamp <= --END-TIME--)

SELECT * FROM cpg_application_log t1 WHERE (t1.timestamp >= --START-TIME--) AND (t1.timestamp <= --END-TIME--)


SELECT * FROM cpg_application_log t1 WHERE (t1.time >= --START-TIME--) AND (t1.time <= --END-TIME--)

0 件のコメント:

コメントを投稿