Skip to content

Setup

Choose your statistics source

Insights can gather data from multiple sources. Currently, you can gather data from both the Onegini Customer Identity Manager, and the Token Server.

In order to see any results you must configure at least one source. For each component you need to specify the base url, API username, and API password so that the app can make requests to the source to gather data.

Onegini Customer Identity Manager,

  • IDP_API_STATISTICS_SOURCE_BASE_URI
  • IDP_API_STATISTICS_SOURCE_USERNAME
  • IDP_API_STATISTICS_SOURCE_PASSWORD

Token Server

  • TS_API_STATISTICS_SOURCE_BASE_URI
  • TS_API_STATISTICS_SOURCE_USERNAME
  • TS_API_STATISTICS_SOURCE_PASSWORD

Please refer to the sources configuration for more details.

Set up web interface credentials

To be able to view the graphs generated by statistics engine, you first need to authenticate. In order to do that the following environmental variables need to be set:

For basic auth:

  • SPRING_SECURITY_USER_NAME
  • SPRING_SECURITY_USER_PASSWORD

For JWT token auth (disabled by default):

  • SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI
  • SECURITY_OAUTH2_JWT_AUDIENCE (default: insights)
  • SECURITY_OAUTH2_JWT_SCOPE (default: insights)

Set up database connection details

Insights uses a database to store its data. Use following properties for database setup:

  • SPRING_DATASOURCE_USERNAME
  • SPRING_DATASOURCE_PASSWORD
  • SPRING_DATASOURCE_URL
  • SPRING_DATASOURCE_DRIVER_CLASS_NAME - should be determined by SPRING_DATASOURCE_URL in most cases
  • DATABASE_TYPE

Please refer to the database configuration for more details.

Set up Insights port

Insights needs to be set up on a specific port. You can stick with default value or change it by setting following property:

  • SERVER_PORT

Launch Insights

You have now configured Insights. Start Insights and check if application started correctly by executing a http GET on:

http://SERVER_HOST:SERVER_PORT/actuator/health

If the retrieved status is UP, you can now go to web interface by going to http://SERVER_HOST:SERVER_PORT and log in with the web interface credentials defined above.

After the initial launch of the application, there will likely be no data available as it has not yet been generated or fetched. The generation job must run successfully before there will be any data to fetch. Please see the scheduling setup of the cron job in the properties.

Insights in Admin panel

It is possible to view Insights graphs in Admin panel in the sources you have configured. Please refer to source documentation for the specific configuration.