Admin panel

General description

Admin panel is an application for:

  1. creating, managing, and publishing bots
  2. analysis of existing bots
  3. configuring Knowledge Base
  4. creating and running tests for bots
  5. managing users and permissions (via roles)

API

Default port: 5750

Application has got public HTTP API which is secured by OTP mechanism. It also has an UI portal that is secured by an internal users mechanism (login page).

There are default endpoints for monitoring purposes. They are described in Components monitoring section.

Databases

SQL

The component has its own SQL Database for storing data. Main tables:

  • users - table with all users (related tables: companies, roles - for permissions management)
  • projects - table for all bots (related tables: flows, contexts, nlu_models, integrations)
  • knowledgebase* - tables for storing and managing Knowledge Base
  • conversationtest* - tables for managing and running tests for bots

RabbitMQ

The component writes to queues:

  • automate.tests.conversation.execute - used for scheduling conversation tests
  • automate.knowledge.update - used for informing that Knowledge Base has changed

The component reads data from the queues:

  • automate.tests.conversation.execute - used for executing conversation tests
  • automate.train.completed - used for getting NLU training status

Redis

Application is using Reddis for PubSub solutions used for WebSockets synchronization between all nodes (channel name: chatbots-admin-websockets)

Communication

This service communicates with the following services:

ApplicationConfig to URLAuth
bot-integrationchatbots.senti-one-api.urlOTP
nlu-facadechatbots.nlu-facade-api.urlnone
gateway-apichatbots.gateway-api.urlnone
dialogschatbots.dialog-manager-api.urlnone
analyticschatbots.analytics-api.urlnone

Config

Application's config:

chatbots.admin {  
  host: "chatbots.sentione.com" # publicly visible admin's URL for generating links  
  is-https\: true # is admin available under SSL  
  nlu-client-timeout: 60m # NLU client request timeout (excluding training time)  
  password-confirmation-duration: 5m # how long password confirmation is valid (default 5m)  
  initial-sqls-path: /init.db # path for initial SQL script (adding user/company)  
  login-tries-per-hour: 10 # number of login tries per IP before blocking IP  
  language {  
    # available languages for bots (need to match NLU services)  
    available-bot-languages: ["pl", "de", "en", "multi"]  
  }  
  connectors {  
    # ath for Knowledge Base connectors to look for new import files  
    root-file-path: /var/kb  
  }  
  web-chat-demo-url: #(optional) URL to WebChat demo  
  expose-exception: true  
}


# SQL connection details
chatbots.admin.db {  
  url: "jdbc:postgresql://db:5432/chatbots-admin",  
  user: "postgres",  
  password: "root"  
  max-connections: 20  
}          

# Public API OTP Base32 keys
chatbots.admin.one-time-password {
  # OTP Base32 key for public API (aka ProjectsAPI, KnowledgeBaseAPI)  
  key: "KNSWG4TFORIGC43T"  
  # OTP Base32 key for public ADMIN APi (for creating companies)  
  admin-key: "KNSWG4TFORIGC43T"  
}          

# configuration section for Conversation Analytics module
# more information should be provided with module documentation
chatbots.admin.conversation-analytics {  
  custom-label-types: \[]  
  metadata-filters: \[]  
}          

# NLU training configuration
chatbots.admin.nlu {  
	# time for RabbitMQ to accept the train message  
  train-request-message-timeout: 30s
  # time for sync-training to finish (used only in Cross Validation)
  # for "normal" training timeout check _MarkNluTimeout_ Cron Job  
  train-response-message-timeout: 2h
  # Limit number of Complex NLU models on env (optional)
  # https://automate.help.sentione.com/docs/comparison-of-available-intentizer-types
  # complex-models-limit: Integer 
}

# SSO configuration (optional)
chatbots.admin.sso-server {  
	# SSO Server's external URL (visible to the end-user)  
  public-url: "<http://host:port>"  
  # SSO Server's internal URL (visible to the admin application)  
  url: "<http://host:port>"  
  # client id and secret have to be added to SSO Server's config (chatbots.sso-server.clients)  
  client-id: "123"  
  client-secret: "234"  
  # default company, to which new users will be added  
  company-id: 1  
}          

# White-label configuration (optional)
chatbots.admin.white-label {  
	# Remember to add `play.filters.csp.directives.style-src` with proper domain
  # URL to custom CSS (optional)  
  custom-css: ""  
  # White label name supported by the platform (optional)  
  name: ""  
}

Other required configurations:

# Reddis server connection details
chatbots.admin.redis {  
  host: "172.16.2.110"  
  port: 6379  
}

# RabbitMQ configuration  
chatbots.messaging {  
  rabbit {  
    hosts: ["HOST:PORT"]  
    username: "USER"  
    password: "PASSWORD"  
  }  
}          

# Other APIs URLs
chatbots.nlu-facade-api.url: "<http://host:port>"  
chatbots.gateway-api.url: "<http://host:port>"  
chatbots.dialog-manager-api.url: "<http://host:port>"  
chatbots.analytics-api.url: "<http://host:port>"          

# Bot Integration configuration
chatbots.senti-one-api {  
  url: "<http://bot-integration:9010">, # actual address for bot-integration service  
  secret: "KNSWG4TFORIGC43T" # same secret as defined in bot-integration service  
}

Play Framework config

More information about Play Framework could be found in Play Framework configuration section

Job execution

RunKnowledgeBaseConnectors

This cron job checks if any from created connectors (table knowledge_base_connectors) need to run right now (the next execution date is in the past) and executes it.

Default schedule: every 5 minutes

RefreshLicense

This cron job validates and extends (if necessary) all online licenses (table licenses)

Default schedule: every hour

DeleteOldUnusedProjects

This cron job removes projects that have been created more than one week ago and does not have a user tag prefix (e.g. [Blant]). This cron is designed to be used only on staging ENVs.

Default schedule: never (manual trigger only)

MarkNluTimeout

This cron job marks long-running (60min+) NLU training as failed.

Default schedule: every hour

Troubleshooting

NLU Training or Classify request (check phrase) failed

Check nlu-pipeline logs and look for "ERROR", probably intentizer failed ("Error when getting response from intentizer"). Investigate if intentizer container restarted and pass the issue to Research team

No analytics data in analytics module

See Analytics troubleshooting

No transcriptions

See Bot integration troubleshooting

Can't log in using SSO

See SSO troubleshooting

Error when using the application

Get logs and pass issues to the DEV team