<dashboard oid="8f9f3d5f-a890-452b-8d2b-57b8644c1f04">
<name>system-status-dashboard</name>
<display>
<label>Number of active users</label>
</display>
<widget>
(1)
</widget>
<widget>
(2)
</widget>
</dashboard>
Create dashboards in midPoint
Dashboard feature
This page describes configuration of Dashboard midPoint feature.
Please see the feature page for more details.
|
This article guides you through the steps required to configure dashboards. Start with a simple dashboard showing one metric, such as number of active users, then continue adding more advanced pieces, such as percentage of failed resources or accounts violating segregation of duties.
From the data update perspective, dashboard widgets can be synchronous or asynchronous. In this guide, you first create a simple synchronous widget. After that, you will add an asynchronous widget to the dashboard.
We recommend using IntelliJ IDEA with the midPoint Studio plugin. Engineering midPoint with Studio is definitely much easier. |
Quick guides to create and deploy dashboards
Before we dive into details, here is a TL;DR version of this article. The points below summarize the steps to take when deploying dashboards.
How to deploy standard dashboards
-
Prepare and upload an object collection with an object filter definition.
-
Prepare and upload a dashboard with a widget using the object collection.
-
Add a
<configurableUserDashboard>
element toSystemConfiguration
and upload the configuration. -
Check the configuration:
-
Refresh the GUI (you may need to log out and back in) to apply the system configuration changes.
-
Go to Dashboards to see your new dashboard.
-
How to deploy dashboards with asynchronous widgets
-
Prepare and upload an object collection with an object filter definition.
-
Prepare and upload a dashboard with a widget using the object collection.
-
Prepare and upload a dashboard report.
-
Prepare and upload a report task.
-
Add a
<configurableUserDashboard>
element toSystemConfiguration
and upload the configuration. -
Check the configuration:
-
Refresh the GUI (you may need to log out and back in) to apply the system configuration changes.
-
Go to Dashboards to see your new dashboard. The asynchronous widget cannot show data yet.
-
Run the report task or wait until its scheduled run finishes.
-
Go to Dashboards again. The asynchronous widget should now display correct data.
-
When you upload a dashboard with asynchronous widgets, it displays an Unknown value until the report task runs for the first time and saves the computed data to the dashboard widgets.
You can get inspiration from midPoint configuration samples on GitHub:
|
Create your custom dashboard
To create a dashboard, you need to create a dashboard object with an OID, name, label, and widgets. The name and label are used for the graphical user interface (GUI).
1 | The widget code from the section on a simple widget goes here. |
2 | The widget code from the section on an asynchronous widget goes here. |
The dashboard with two widgets is ready but its widgets are not. Now is the time to create them.
Create a simple widget for the dashboard
Widgets are not separate configuration objects, they go directly into their parent dashboard object. The first widget we create here is a simple synchronous one; the data it shows are calculated every time a user loads the screen with the dashboard. You will see how to create an asynchronous widget in the example for the second widget below.
The first simple widget shows the number of users that are active; for example, active employees as opposed to those on long-term leave.
The widget itself does not query the users.
That is what the object collection is for (see the collectionRef
element in the code below).
<widget>
<identifier>active-users</identifier>
<display>
<label>Number of active users</label>
<color>#229911</color>
<icon>
<cssClass>fa fa-user</cssClass>
</icon>
</display>
<data>
<sourceType>objectCollection</sourceType>
<collection>
<collectionRef
oid="0ac5f62a-1d0c-4b0c-afbf-d19bfb1f6112" (1)
type="ObjectCollectionType"
/>
</collection>
</data>
<presentation>
<dataField>
<fieldType>value</fieldType>
<expression>
<proportional>
<style>value-only</style>
</proportional>
</expression>
</dataField>
<dataField>
<fieldType>unit</fieldType>
<expression>
<value>active</value>
</expression>
</dataField>
</presentation>
</widget>
1 | The object collection OID from the section below goes here. |
The dashboard now has one widget. However, it still has no data to show, because we do not have the object collection yet.
Define object collection to count objects of interest
Object collections, as their name suggests, collect or enumerate objects based on a query you define. Object collections are standalone midPoint objects.
To go with the example of counting active users, create a collection that enumerates objects of the UserType
type (i.e., users) for which the activation/effectiveStatus
equals to enabled
.
<objectCollection oid="0ac5f62a-1d0c-4b0c-afbf-d19bfb1f6112">
<name>All enabled users</name>
<type>UserType</type>
<filter>
<q:text>activation/effectiveStatus = "enabled"</q:text>
</filter>
</objectCollection>
And this is it. You are getting closer to your goal:
-
Add the OID of the collection above to the
collectionRef
in the widget. -
Move the widget code to the dashboard object.
-
Upload both the collection and the dashboard objects to your midPoint instance.
The only step that remains is to display the dashboard in the midPoint graphical user interface.
Add the dashboard to the main menu
To have the new dashboard displayed in the main midPoint menu, you need to add it to the system configuration:
<systemConfiguration>
...
<adminGuiConfiguration>
<configurableUserDashboard id="999"> (1)
<identifier>enabled-users-dashboard</identifier>
<configurableDashboardRef
oid="8f9f3d5f-a890-452b-8d2b-57b8644c1f04" (2)
relation="org:default"
type="c:DashboardType"
>
</configurableDashboardRef>
</configurableUserDashboard>
(3)
</adminGuiConfiguration>
...
</systemConfiguration>
1 | Create a unique integer ID. If you leave out the ID, midPoint generates it automatically for you. |
2 | The OID of your dashboard goes here. |
3 | More configurableUserDashboard elements can follow here, one for each dashboard. |
Now, you can refresh the GUI (you may need to log out and back in) and go to Dashboards to see your new dashboard.

Create asynchronous widget to reduce system load
Simple widgets like the one above are easy to deploy, but you may want to use asynchronous widgets instead.
An asynchronous widget uses a task to recompute the data at an interval of your choosing and holds the result in the widget object. You can use the same object collection as you do with the synchronous widget above.
Report tasks for asynchronous dashboard update are not to be confused with asynchronous update tasks which are used for updating data from resources. |
Configure your widget for asynchronous loading
To configure a widget as asynchronous, you need to adjust the widget data source and create two new pieces of configuration:
-
A report which takes the dashboard configuration, triggers the data computation, and saves the results into the dashboard widget objects.
-
Note that a dashboard report always computes the data for all the widgets in the linked dashboard.
-
-
A report task which runs the report at scheduled intervals to refresh the data.
First, modify the widget configuration to include the displaySourceType
element, allowing the widget to utilize the data that the report has stored in it.
<widget>
<identifier>active-users</identifier>
<display>
<label>Number of active users</label>
<color>#883399</color>
<icon>
<cssClass>fa fa-user</cssClass>
</icon>
</display>
<data>
<sourceType>objectCollection</sourceType>
<displaySourceType>widgetData</displaySourceType> (1)
<collection>
<collectionRef
oid="0ac5f62a-1d0c-4b0c-afbf-d19bfb1f6112" (2)
type="ObjectCollectionType"
/>
</collection>
</data>
<presentation>
<dataField>
<fieldType>value</fieldType>
<expression>
<proportional>
<style>value-only</style>
</proportional>
</expression>
</dataField>
<dataField>
<fieldType>unit</fieldType>
<expression>
<value>active</value>
</expression>
</dataField>
</presentation>
</widget>
1 | Enable the widget to utilize the data that the report has stored in it. |
2 | The object collection OID goes here. |
Create a report connected to your dashboard
Secondly, you need a dashboard report that "runs" the dashboard as if a user has visited it and makes midPoint compute the data in the dashboard.
If you display the dashboard with an asynchronous widget before you create and run the report for the first time, the widget will show Unknown instead of a meaningful value because midPoint has not yet computed the data to show. |
See Report from Dashboard for instructions on creating a dashboard report.
When configuring the report, use your dashboard as the configuration basis of the report. After you create the report, you can run it manually to compute the data and verify your configuration.
Create a scheduled recurring task to refresh dashboard data regularly
To have the data on the dashboard refreshed regularly, you need a recurring task.
See Report Task Definition for instructions on creating an export report task.
When configuring the task, you need to use the report export activity and use the OID of the dashboard report you want the task to run. In most cases, it makes sense to schedule this task to run at regular intervals in order to have the data in the dashboard updated automatically.
Once you have all the pieces in place, upload them to your midPoint instance, refresh the GUI (possibly log out and back in), and see the updated dashboard under Dashboards.
Dashboard widget configuration attributes
This section contains details on possible widget configuration options.
The widget element contains three configuration attributes: display
,data
, and presentation
.
Display attribute
The display
attribute contains configuration of the widget visual side in the GUI.
Name | Type | Description |
---|---|---|
|
|
Displayed name of widget. |
|
|
Default color of background for widget. |
|
|
CSS class for widget icon; for example, |
|
|
CSS style for the widget; for example, |
Data attribute
The data
attribute represents the data source that the widget displays.
Name | Type | Description |
---|---|---|
|
|
Type of widget content data source. Specify the type of input data, which midPoint uses for generating a message shown in the widget. This is an enumeration type and possible values are: * |
|
|
This attribute is an identifier that overrides |
|
|
Specification of an explicit or implicit object collection that is used as a data source for the view.
Contains variable |
|
|
Specifies a single object as a data source for the widget. |
|
|
Specifies a string data as a widget data source. This data can be stored by a report task. This configuration is used in asynchronous widgets. |
Using sourceType and displaySourceType
When you configure a simple widget, you can set the sourceType
to either objectCollection
, auditSearch
or object
.
The displaySourceType
is important for asynchronous widgets.
In the case of asynchronous widgets, you set widgetData
as displaySourceType
and use objectCollection
as sourceType
.
This means that the widget shows stored data from the storedData
attribute, but when you click the widgets, the redirection for object details uses sourceType
.
sourceType
is also use by the export report task for generating content in storedData
.
When you use objectCollection
or auditSearch
as a source, midPoint needs a reference to the object collection which contains a filter for the reported data.
The following is an example of widget data source for an object collection:
<widget>
...
<data>
<sourceType>objectCollection</sourceType>
<collection>
<collectionRef oid="15de186e-1d8c-11e9-a469-8f5d9cfc0259" type="c:ObjectCollectionType"/>
</collection>
</data>
</widget>
Another option is to define a specific object
as a source.
In this case, a part of the configuration is a reference to the object which is used as a source.
The configuration contains a path to the attribute which is presented in the widget.
An example of a widget data source for an object type:
<widget>
...
<data>
<sourceType>object</sourceType>
<objectRef oid="00000000-0000-0000-0000-000000000005" type="c:TaskType"/>
</data>
</widget>
A widget in the GUI with an object
as a source.
In this case, it is a cleanup task with the path set to the state
attribute:

In the case when you want to set up an asynchronous widget, you can use an objectCollection
, auditSearch
or object
as a source.
However, you have to also use the widgetData
attribute value for the displaySourceType
attribute.
An example of a widget data source for widget data (asynchronous widget):
<widget>
...
<data>
<sourceType>objectCollection</sourceType>
<displaySourceType>widgetData</displaySourceType>
<collection>
<collectionRef oid="15de186e-1d8c-11e9-a469-8f5d9cfc0259" type="c:ObjectCollectionType"/>
</collection>
<storedData>25/25 runnable</storedData>
</data>
</widget>
Presentation of widget data
presentation
is a container attribute used to define how to present the data.
There are four presentation options:
-
percentage (50%)

-
separated with slash (5/10)

-
separated with "of" (5 of 10)

-
only value (5)

The presentation
container contains three attributes: dataField
, variation
and view
.
The widget data field
The attribute dataField
describes the properties of a specific widget data field.
Note that the order in the dataField
elements is not significant.
The field order is given by specific presentation style.
The attributes for dataField
:
Name | Type | Description |
---|---|---|
|
|
Type of the field.
MidPoint currently supports * For example, in a message 5/9 up is 5/9 the |
|
|
Expression that produces the value to display in the widget. |
For the fieldType
attribute, when set to value
, a special type of expression is defined.
In this expression, the attribute proportional
must be defined along with the attribute style
.
The attribute style
is an enumeration type with the following values:
-
percentage
(for example, 50%) -
value-slash-domain
(for example, 5/10) -
value-of-domain
(for example, 5 of 10) -
value-only
(for example, 5)
Variation of Widget Data
The next presentation attribute is variation
.
This attribute allows for conditional variation in how the widget is displayed.
Variations may change the colors or icons of the widget based on specific conditions.
The attributes for variation
are as follows:
Name | Type | Description |
---|---|---|
|
|
Condition for the variation. The variation will be active if the condition evaluates to true. |
|
|
Display properties are applied when the condition evaluates to true. These display properties specify only the presentation aspects that differ from the usual presentation. For example, if the variation only changes the widget color, only the color needs to be specified here. Icons and other styles are taken from the primary widget display properties. |
You can use four variables for condition
:
Name | Type | Description | sourceType in data of widget |
---|---|---|---|
|
|
Integer stat (statistic) entry. This entry contains stat value, together with domain value. |
|
|
|
Collection of policy situations. |
|
|
Based on the displayed object in the widget |
Processed object. |
|
|
|
Data stored in the widget. |
|
View
The last variable of the presentation container is view
.
This variable is also processed when creating reports.
The main reason to configure a view is to customize the reported or presented object collection that the dashboard widget is based on.
The widget object collection can be accessed via the GUI btn:[More info] button.
Example of presentation
:
<widget>
...
<presentation>
<dataField>
<fieldType>value</fieldType>
<expression>
<proportional xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="c:ProportionalExpressionEvaluatorType">
<style>percentage</style>
</proportional>
</expression>
</dataField>
<dataField>
<fieldType>unit</fieldType>
<expression>
<value>up</value>
</expression>
</dataField>
<variation>
<condition>
<script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="c:ScriptExpressionEvaluatorType">
<code>
policySituations.contains("#resourceHealthDanger")
</code>
</script>
</condition>
<display>
<color>#dd4b39</color>
</display>
</variation>
</presentation>
</widget>
Configuration details for object collections
You can see the basic configuration for objectCollection
in Object Collections and Views Configuration.
For the dashboard, you can use policyRule
with policyThreshold
to define a policySituation
.
Here is an example of objectCollection
for a resource that has the status set to "UP":
Example Object Collection
<objectCollection xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
oid="15de186e-1d8c-11e9-a469-8f5d9cfc0259">
<name>Resources Up</name>
<assignment>
<policyRule>
<policyConstraints>
<collectionStats>
<collection>
<interpretation>explicit</interpretation>
</collection>
</collectionStats>
</policyConstraints>
<policySituation>#resourceHealthDanger</policySituation>
<policyThreshold>
<highWaterMark>
<percentage>99.9</percentage>
</highWaterMark>
</policyThreshold>
</policyRule>
</assignment>
<type>ResourceType</type>
<filter>
<q:text>operationalState/lastAvailabilityStatus = 'up'</q:text>
</filter>
<domain>
<collectionRef oid="00000000-0000-0000-0001-000000000006" type="c:ObjectCollectionType"/>
</domain>
</objectCollection>
The variable (collection) domain is a set of objects that represents "all the objects" used in a collection. For example, for a collection of "up resources", the domain is "all resources." The domain is filtered using the filter to contain only the specific set of objects needed.
In this example, use policyRule with policySituation, which can be leveraged in the variation of widget presentation. When the policyThreshold is met, the policySituation from policyRule triggers the widget variation. The policyThreshold has two important variables: lowWaterMark and highWaterMark.
lowWaterMark is the lower bound of the threshold, representing the lowest value for which the policy rule is activated. The policy rule will trigger for all values starting from this value up to the highWaterMark (closed interval). If no lowWaterMark is specified, the policy rule activates for all values up to the highWaterMark. A policy rule with a threshold that does not have any water marks will never activate.
highWaterMark is the upper bound of the threshold, representing the highest value for which the policy rule is activated. The policy rule will trigger for all values starting from the lowWaterMark up to this value (closed interval). If no highWaterMark is specified, the policy rule activates for all values greater than or equal to the highWaterMark.
Both variables are of the type WaterMarkType, which contains the variables count and percentage.
More configuration examples
Simple Example for "Enabled Users Widget"
This section presents a very simple example of an enabled users widget that displays the number of enabled users.
First, create an object collection with a filter for users for which the attribute activation/effectiveStatus
equals to enabled
.
Example Object Collection
<objectCollection xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
oid="00000000-0000-0000-0001-000000147896">
<name>All enabled users</name>
<type>UserType</type>
<filter>
<q:text>activation/effectiveStatus = "enabled"</q:text>
</filter>
</objectCollection>
And next, create dashboard with one widget for enabled users.
Example Dashboard Configuration
<dashboard xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
oid="f89709f9-7313-494f-a600-69ea75d95106">
<name>Example one widget for enabled users</name>
<display>
<label>Enabled users</label>
</display>
<widget>
<identifier>enabled-users</identifier>
<display>
<label>Enabled users</label>
<color>#00a65a</color>
<icon>
<cssClass>fa fa-user</cssClass>
</icon>
</display>
<data>
<sourceType>objectCollection</sourceType>
<displaySourceType>widgetData</displaySourceType>
<collection>
<collectionRef oid="00000000-0000-0000-0001-000000147896" type="ObjectCollectionType"/>
</collection>
</data>
<presentation>
<dataField>
<fieldType>value</fieldType>
<expression>
<proportional>
<style>value-only</style>
</proportional>
</expression>
</dataField>
<dataField>
<fieldType>unit</fieldType>
<expression>
<value>enabled</value>
</expression>
</dataField>
</presentation>
</widget>
</dashboard>
Lastly, add the new dashboard to the GUI in system configuration.
After accessing the new dashboard in GUI, you can see your new widget.

effectiveStatus
is enabled
.Asynchronous widget
To configure an asynchronous widget, use the displaySourceType
attribute in the widget configuration and set it to widgetData
.
Set sourceType
to objectCollection
to handle redirects to a details page when clicking on the widget details.
Next, configure a dashboard report task to generate and store data in the widget.
Use a dashboard report with the element storeExportedWidgetData
.
You can use the same collection as in the previous example for enabled users.
Example Object Collection
<objectCollection xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
oid="00000000-0000-0000-0001-000000147896">
<name>All enabled users</name>
<type>UserType</type>
<filter>
<q:text>activation/effectiveStatus = "enabled"</q:text>
</filter>
</objectCollection>
Next, create a dashboard.
Add the attribute displaySourceType
with the value widgetData
.
Example Dashboard Configuration
<dashboard xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
oid="f89709f9-7313-494f-a600-69ea75d95106">
<name>Example one widget for enabled users</name>
<display>
<label>Enabled users</label>
</display>
<widget>
<identifier>enabled-users</identifier>
<display>
<label>Enabled users</label>
<color>#00a65a</color>
<icon>
<cssClass>fa fa-user</cssClass>
</icon>
</display>
<data>
<sourceType>objectCollection</sourceType>
<displaySourceType>widgetData</displaySourceType>
<collection>
<collectionRef oid="00000000-0000-0000-0001-000000147896" type="ObjectCollectionType"/>
</collection>
</data>
<presentation>
<dataField>
<fieldType>value</fieldType>
<expression>
<proportional>
<style>value-only</style>
</proportional>
</expression>
</dataField>
<dataField>
<fieldType>unit</fieldType>
<expression>
<value>enabled</value>
</expression>
</dataField>
</presentation>
</widget>
</dashboard>
Finally, create a report for the dashboard.
Example Report Configuration
<report oid="3ae6eed9-531b-45ca-9561-0863f109a3ac">
<name>Enabled users report</name>
<assignment>
<targetRef oid="00000000-0000-0000-0000-000000000170" type="ArchetypeType"/>
</assignment>
<dashboard>
<dashboardRef oid="f89709f9-7313-494f-a600-69ea75d95106" type="DashboardType"/>
<showOnlyWidgetsTable>true</showOnlyWidgetsTable>
<storeExportedWidgetData>onlyWidget</storeExportedWidgetData>
</dashboard>
</report>
Now run the report, and midPoint processes the source data for the dashboard. The resulting data are written to the widget in the dashboard.
It makes sense to run the task for an asynchronous widget as a reoccurring task. Yet there is no way how to pre-configure the task before you actually "run" the report. Because of this, the only way is to run the report and afterwards modify the task, so it runs periodically. There is a work package regarding this at MID-9646 |
Next time you open the widget in the GUI, midPoint does not need to process the source data; it shows the saved data present in the widget object.

effectiveStatus
is enabled
.Dashboard views
A dashboard can provide additional info when users click the btn:[More info] button.
In this case, should you use an objectCollection
as the data sourceType
, you would see a table of objects in the collection.
The table can be configured and customized.
This is done via the view
container.
The screenshot below is from the example dashboard in dashboard-system-status.xml:

See also
Compliance
This feature is related to the following compliance frameworks:
-
ISO/IEC 27001 5.2: Information security roles and responsibilities
-
ISO/IEC 27001 5.8: Information security in project management
-
ISO/IEC 27001 5.9: Inventory of information and other associated assets
-
ISO/IEC 27001 5.26: Response to information security incidents
-
ISO/IEC 27001 5.36: Compliance with policies, rules and standards for information security