Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1. Entity::Webhook object added to Connec database with correct tenant credentials, impac api endpoint, and `:subcribed_entities => ['Journals']`.

...

To active the KPIs & Alerting feature on your app, all the configuration steps described below must completed. 



Table of Contents
maxLevel2
minLevel2


1. Configuring MnoHub!

  1. The app must be connected to a KPI enabled tenant. A KPI enabled tenant with the following metadata attribute:

    Code Block
    languageruby
    tenant[:metadata][:kpi_enabled] = true


2. Configuring Connec!

  1. A Connec! Webhook needs to be created, this can be done by /wiki/spaces/DEV/pages/90439768 or by directly creating one via the Rails Console. Below is an example of the Connec Webhook object, for the Impac! KPIs & Alerting feature. It is important that this object is configured with the correct tenant credentials (as api_key & api_secret), Impac! API endpoint, and must be subscribed to receive 'Journals'.

    Code Block
    languageruby
    {
        api_key: 'AN_API_KEY', 
        api_secret: 'AN_API_SECRET', 
        endpoint: 'ENDPOINT_URL', 
        name: 'NAME', 
        subscribed_entities: ['ARRAY_OF_ENTITIES'],
        detailed_notifications: false
    }


3. Configuring Impac!

  1. Pusher (websockets service) & Sparkpost (email delivery service) keys are configured in Impac! API (config/application.yml):

    Code Block
    SPARKPOST_API_KEY: 'CHANGEME'
    PUSHER_APP_ID: 'CHANGEME'
    PUSHER_KEY: 'CHANGEME'
    PUSHER_SECRET: 'CHANGEME'

...


  1. Add Maestrano Master Tenant (SystemIdentity) credentials to Impac! API (config/application.yml).

...

  1. This is used as the basic authentication when Impac! queries MnoHub

...

  1. to retrieve KPIs.

    Code Block
    ROOT_KEY: 

...

  1. YOUR_ROOT_KEY
    ROOT_SECRET: 

...

  1. YOUR_ROOT_SECRET


4.

...

Code Block
mnohub:
	...
	paths:
		alerts: /api/mnoe/v1/alert/:alert_id
		kpis: /api/mnoe/v1/organizations/:organization_id/kpis

5. Impac Angular needs to be provided (via the `ImpacLinkingSvc`) with the Pusher Client Key. (NOTE: mno-enterprise-angular now provides this automatically through an Express env variable configured in Nex!)

...

Configuring the Frontend (Express / MnoEnterprise Angular)

  1. Impac! Angular needs to be provided with a Pusher Key to connect to the Pusher websockets service from the client. There are 2 ways to do this:
    1. MnoEnterprise Angular now provides this automatically to Impac! Angular by passing an environment variable configured in Nex! or the MnoEnterprise Express application.

      Code Block
      languageruby
      impac_pusher_key: PUSHER_KEY


    2. Manually by configuring the Impac! Angular ImpacLinkingSvc

      Code Block
      languagejs
      // Link required and optional data in on sweep.
      ImpacLinkingSvc.linkData({ user: ..., organizations: ..., pusher_key: 'KEY' })
      // OR:
      ImpacLinkingSvc.linkOptionalData({pusher_key: 'KEY'})

6. The tenant in Maestrano's database needs to be set with `tenant.metadata[:kpi_enabled] = true` or the feature will be disabled



  1. Configured Impac! Angular's Theming Provider,

...

  1. enabling the feature.

    Code Block
    languagejs
    options = {
      	dhbKpisConfig:
        	enableKpis: true
    	alertsConfig:
    		enableAlerts: true
    }

...

  1. 
    
    ImpacTheming.configure(options)