Security

Reply
Contributor I
Posts: 44
Registered: ‎03-10-2014

How to write Clearpass : Authentication Source : Insight Repository : Filter Query

Hi Guys, I'm using Clearpass 6.2.5 and right now i'm trying to add more filters in "insight repository". However it asked me to fill in "Filter Query" too. I tried to find out the information or manual teach me to write down the filter query for any more filters. But i didn't found. So could you please advice me for these information resources that can study how to write "Filter query" for any more filters.

 

MVP
Posts: 226
Registered: ‎03-03-2011

Re: How to write Clearpass : Authentication Source : Insight Repository : Filter Query

Filter queries are SQL statements which lookup information from the InsightDB tables.

I tend to use the pgAdmin III tool to manually connect to the database and find out all the fields but you generally need some SQL knowledge to write the queries.

 

What information do you need to gather from the Insight repository?

David
ACDX #98 | ACMP | ACCP
Contributor I
Posts: 44
Registered: ‎03-10-2014

Re: How to write Clearpass : Authentication Source : Insight Repository : Filter Query

Thanks a lot for your help. I want to add session-count from insight repository. However when i tried to add , it asked me to fill in Filter query too. But i don't know how to write down it. So suppose if i use PGAdmin tool, it will give me for these syntax right?

MVP
Posts: 226
Registered: ‎03-03-2011

Re: How to write Clearpass : Authentication Source : Insight Repository : Filter Query

Not exactly. The pgAdmin tool just allows you to find the fields in the tables you want to use.

You could try the following:

 

select count(*) as active_sessions from radius_acct where (username = '%{Authentication:Username}') AND end_time is null AND termination_cause is null;

 

Add active_sessions as the 'Name' and set the Data Type to integer. You can use whatever AliasName you want and that is then the field you refer to in your policies.

This will be a count of all active sessions based on the authenticating username.

Is this what you want?

 

David
ACDX #98 | ACMP | ACCP
Search Airheads
Showing results for 
Search instead for 
Did you mean: