Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fix style and prepare publication
Info
titleInstructions

We need to:

  • Explain what is the MnoEnterprise::EventLogger and how it works in mnoe (In Layman's Terms! / Business Terms)
  • Present the different Listeners/Dispatcher available (MnoHub, Intercom, DIY)
  • List all the events that are being logged and what metadata is logged with them (You can see a partial list here:
    Jira Legacy
    serverJIRA (maestrano.atlassian.net)
    serverId3d83fe94-11e5-3cc6-9136-e6d1d99d1367
    keyCR-24
    )

A separate section needs to be about using the Mnoe API for events retrieval

The audit log is managed by an event logger provided by MnoEnterprise (MnoEnterprise::EventLogger). 




Table of Contents
stylenone



1 - What is the MnoEnterprise::EventLogger?

The MnoEnterprise::EventLogger is responsible for the following:

  • Processing of various actions performed by end users (eg: signing in, adding an application, etc.). 
    • The actions or events that the event logger tracks are pre-defined and listed in the events section below. 
  • Creating a notification for each event and dispatching those notifications to various listeners.
    • Listeners are responsible for processing the events as they see fit. 

How it works: 

  1. A user does something that triggers a logged event. 
  2. As the action is processed by MnoEnterprise the event logger is notified.
  3. Each action or event is then sent to various listeners. 
  4. Each listener is responsible for processing the event/s as they see fit. 

1.1 - Listeners

Listeners are implemented in MnoEnterprise to process the events dispatched by the MnoEnterprise::EventLogger

  1. Audit Events Listener
    • The audit events listener creates a record or audit trail of events that can be accessed via the MnoEnterprise API.
  2. Intercom Events Listener
    • The Intercom events listener creates intercom events. 
  3. DIY Listeners
    • Listeners can be created and added to the event logger to adopt custom behaviors. 

                   

Status
colourBlue
titleToDo:
 Technical article on DIY listeners coming soon. 

1.2 - Events 

The following events and metadata are logged via the MnoEnterprise::EventLogger

App Events 

EventDescriptionMetadata
'app_add'Application added to dashboard


Code Block
languagejs
{
  id: 2,
  uid: 'cld-7y9h',
  name: 'AccountingPro',
  app_nid: 'account-pro-us'
}


'app_destroy'Application deleted from dashboard


Code Block
languagejs
{
  id: 7,
  uid: 'cld-89r7',
  name: 'DemoApplication',
  app_nid: 'demo-app'
}


'app_launch'Application launched/started


Code Block
languagejs
{
  id: 4,
  uid: 'cld-8y7f',
  name: 'Inventory Tracker',
  app_nid: 'inv-track'
}



Dashboard Events

EventDescriptionMetadata
'dashboard_create'Dashboard created


Code Block
languagejs
{
  name: 'Sales Dashboard'
}


'dashboard_delete'Dashboard deleted


Code Block
languagejs
{
  name: 'Sales Dashboard'
}



Organization Events

EventDescriptionMetadata
'organization_create'Organization created



Code Block
{
id: 4,
uid: "org-fbjz",
name: "abc motors"
}



'organization_destroy'Organization deleted


Code Block
{
id: 4,
uid: "org-fbjz",
name: "Example Financial"
}



User Events

EventDescriptionMetadata
'user_invite'User invited to team/organization


Code Block
{
user_email: 'sample@example.com',
account_name: 'Example Company'
}


'user_login'User logged into platform


Code Block
{
user_name: 'John Doe',
user_email: 'john.doe@example.com'
}


'user_logout'User logged out of platform


Code Block
{
user_name: 'John Doe',
user_email: 'john.doe@example.com'
}


'user_update'User attributes changed


Code Block
title*metadata contains updated user attributes*
{
name: ['old name', 'new name'],
surname: ['old name', 'new name']
}


'user_confirm'Confirmed user account


Code Block
{
user_name: 'Johnny Doe',
user_email: 'JD5575@example.com'
}


'user_timeout'User session expired


Code Block
{
user_name: 'Johnny Doe',
user_email: 'JD5575@example.com'
}


'user_update_password'User changed password


Code Block
{
user_name: 'John Doe',
user_email: 'john.doe@example.com'
}


'register_developer'User registered as a developer


Code Block
{
user_name: 'John Doe',
user_email: 'john.doe@example.com'
}



Widget Events

EventDescriptionMetadata
'widget_create'Widget added to dashboard


Code Block
{
name: 'Account Balance'
}


'widget_delete'Widget removed from dashboard


Code Block
{
name: 'Invoices List'
}




Info
titleEvents Not Currently Logged

Status
colourBlue
titleTodo:
The following events are coming soon to the Audit Log

The following events are not currently tracked by the MnoEnterprise::EventLogger

About users:
Actions not tracked:

  • change of role
  • users accepted invitations
  • users removed from an org

About sign-up:
Information missing:

  • user sign-up
  • company created through sign-up

About teams:
Actions not tracked:

  • team created
  • team deleted
  • user assigned to team
  • user removed from team
  • app assigned to team
  • app removed from team

About apps:
Actions not tracked

  • App connected to the platform

About Impac!™:
Information not tracked for Impac!

  • missing name of company for all changes
  • missing name of widget when it is deleted

Actions not tracked for Impac!

  • there is not information for "name changed" for widgets


1.2.1 - Intercom Events 

If /wiki/spaces/UKB/pages/58065026 is enabled, the MnoEnterprise::EventLogger will also create Intercom events.

Status
colourYellow
titleNote:
 Some events are named differently when being sent to Intercom. The following table illustrates the naming differences between MnoEnterprise and Intercom.

MnoEnterpriseIntercom
'user_confirm''finished-sign-up'
'dashboard_create''added-dashboard'
'dashboard_delete''removed-dashboard'
'widget_delete''removed-widget'
'widget_create''added-widget'
'app_launched'

'launched-app-{app_nid}'

Ex:

'launched-app-inv-tracker'

'app_destroy''deleted-app-{app_nid}'
'app_add''added-app-{app_nid}'


1.2.2 - Retrieving Events via the MnoHub API 

MnoHub API Documentation (Audit Events)

The Audit Log can be viewed from the admin panel: (Note: The 'Description' field can be customized; See Below)

The 'Description' field can be set to display custom messages via a config file: 

Code Block
titleconfig/audit_log.yml
linenumberstrue
default: &DEFAULT
  events:
    app_add: "%{name} added"
    user_invite: "%{user_email} invited"
    dashboard_create: Dashboard '%{dashboard_name}' created
    dashboard_delete: Dashboard '%{dashboard_name}' deleted
    widget_create: Widget '%{widget_name}' added
    widget_delete: Widget '%{widget_name}' deleted

development:
  <<: *DEFAULT

uat:
  <<: *DEFAULT

production:
  <<: *DEFAULT

test:
  <<: *DEFAULT

The variables are the one from the event metadata.