Type | Read/write | Author | Availability |
Read | Finbourne | Provided with LUSID |
The Lusid.Logs.Metrics.Entitlement
provider enables you to write a Luminesce SQL query that retrieves access requests to applications in the FINBOURNE platform. This enables you to troubleshoot failures related to policies (that is, access control permissions) and feature licenses.
Note: The LUSID user running the query must have sufficient access control permissions to both use the provider and read access request logs stored in LUSID. This should automatically be the case if you are the domain owner.
See also: Lusid.Logs.Request, Lusid.Logs.AppRequest
Basic usage
select * from Lusid.Logs.Metrics.Entitlement where <filter-expression>;
Query parameters
Lusid.Logs.Metrics.Entitlement
has parameters that enable you to filter or refine a query.
To list available parameters, their data types, default values, and an explanation for each, run the following query using a suitable tool:
select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Lusid.Logs.Metrics.Entitlement' and FieldType = 'Parameter';
Data fields
By default, Lusid.Logs.Metrics.Entitlement
returns a table of data populated with particular fields (columns). You can return a subset of these fields.
To list fields available to return, their data types, whether fields are considered 'main', and an explanation for each, run the following query using a suitable tool:
select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Lusid.Logs.Metrics.Entitlement' and FieldType = 'Column';
Note: Fields marked 'main' are returned by queries that use a caret character, for example
select ^ from Lusid.Logs.Metrics.Entitlement
.
Examples
Note: For more example Luminesce SQL queries, visit our Github repo.
Example 1: Retrieve all access requests between two dates
select * from Lusid.Logs.Metrics.Entitlement where StartAt = #2023-03-10T00:00:00Z# and EndAt = #2023-03-10T11:59:59Z#
Example 2: Retrieve information for a specific access request
select * from Lusid.Logs.Metrics.Entitlement where RequestId = '0HMPFIDVI79QE:00000087'
Example 3: Retrieve policy information for a failed access request
You can retrieve information on access requests that failed due to a missing policy and then read more on policies to discover how to resolve the issue.
select * from Lusid.Logs.Metrics.Entitlement where Result = 'NoGrantingPolicy'
Example 4: Retrieve information for access requests that failed due to missing licence
You can retrieve information on access requests that failed due to a missing licence and contact support to resolve the issue.
select * from Lusid.Logs.Metrics.Entitlement where Result = 'DoesNotHaveRequiredLicence'
Example 5: Retrieve all failed access requests by a certain user
select * from Lusid.Logs.Metrics.Entitlement where User = '00uyi6tvb4yDcFGjM2p8' and Result != 'Success'
Example 6: Retrieve all access requests for an application
select * from Lusid.Logs.Metrics.Entitlement where Application = 'Scheduler'
Example 7: Fetch failed access requests in the last three days
@@dt1 = select datetime('now', '-3 days');
@@dt2 = select datetime('now');
select * from Lusid.Logs.Metrics.Entitlement
where StartAt = @@dt1
and EndAt = @@dt2
and Result = 'DoesNotHaveRequiredLicence'
limit 100;