Skip to main content
Skip table of contents

Setup Grafana for embedded dashboards

Expertflow CX uses Grafana for business and solution monitoring. Business monitoring dashboards are embedded inside AgentDesk that provide real-time statistics for both agents and supervisors.

This guide is a work-in-progress. Following steps may be performed directly from the Grafana UI. Steps for installing Grafana on-prem or using it from the cloud should clearly be described in this document.

Before proceeding with the step below, edit/update the post-deployment/config/grafana/supervisor-dashboards/datasource.yml file and change the database connection parameters correctly.

  1. For reporting_stats_datasource

Field

Example

Description

url

192.168.1.182

complete URL or ip address where the data source is accessible (optional)

eg. (mysql://user:secret@host:port/databaseName or jdbc:mysql://localhost:3306/exampleDb?user=myuser&password=mypassword)

type

mysql | mssql

type of reporting database. ie. mysql or mssql

password

12345

database password

user

user123

database username

database

testdb

database name

host

192.168.1.182

Hostname or database server IP address where the data source is hosted

  1. For supervisor_dashboard_cim_json_api

Field

Example

Description

url

  1. CODE
    https://cim.expertflow.com

## FQDN of Machine
(don’t append slash ( / ) at the end )

  1. Apply the datasource manifest.

CODE
kubectl -n ef-external create secret generic ef-grafana-datasource-secret --from-file=post-deployment/config/grafana/supervisor-dashboards/datasource.yml

Note.
Guide to setup grafana to connect to SSL Enabled Datasources.

  1. Create the Dashboard configs for Grafana by applying the configmap manifest.

    CODE
    kubectl create cm ef-grafana-dashboard-provider-cm -n ef-external --from-file=post-deployment/config/grafana/supervisor-dashboards/dashboard.yml

Please apply the config maps as per your database environment. Don't apply both config maps.

For MySQL

  1. Apply configmap for the MySQL supervisor and agent dashboard files using the steps below.

    supervisor dashboard MySQL

CODE
kubectl create configmap ef-grafana-supervisor-dashboard-mysql -n ef-external --from-file=post-deployment/config/grafana/supervisor-dashboards/Supervisor_Dashboard_CIM-mysql.json

agent dashboard MySQL

CODE
kubectl create configmap ef-grafana-agent-dashboard-mysql -n ef-external --from-file=post-deployment/config/grafana/supervisor-dashboards/Agent_Dashboard_CIM-mysql.json

For release CX-4.1 onwards

  1. Use following the config map name and file name parameter for grafana

    BASH
    ###### supervisor dashboard ######
    sed -i -e 's@configMapName: <configmap-map-name-supervisor-dashboard>@configMapName: ef-grafana-supervisor-dashboard-mysql@' external/bitnami/grafana/values.yaml
    sed -i -e 's@fileName: <file-name-supervisor-dashboard>@fileName: Supervisor_Dashboard_CIM-mysql.json@' external/bitnami/grafana/values.yaml
    
    ###### agent dashboard ######
    sed -i -e 's@configMapName: <configmap-map-name-agent-dashboard>@configMapName: ef-grafana-agent-dashboard-mysql@' external/bitnami/grafana/values.yaml
    sed -i -e 's@fileName: <file-name-agent-dashboard>@fileName: Agent_Dashboard_CIM-mysql.json@' external/bitnami/grafana/values.yaml

For MSSQL Server

  1. Apply configmap for the MSSQL supervisor dashboard files using the steps below.
    supervisor dashboard MSSQL

    ACTIONSCRIPT3
    kubectl create configmap ef-grafana-supervisor-dashboard-mssql -n ef-external --from-file=post-deployment/config/grafana/supervisor-dashboards/Supervisor_Dashboard_CIM-mssql.json

    agent dashboard MSSQL

ACTIONSCRIPT3
kubectl create configmap ef-grafana-agent-dashboard-mssql -n ef-external --from-file=post-deployment/config/grafana/supervisor-dashboards/Agent_Dashboard_CIM-mssql.json

For release CX-4.1 onwards

  1. Use following the config map name and file name parameter for Grafana

BASH
###### supervisor dashboard ######
sed -i -e 's@configMapName: <configmap-map-name>@configMapName: ef-grafana-supervisor-dashboard-mssql@' external/bitnami/grafana/values.yaml
sed -i -e 's@fileName: <file-name>@fileName: Supervisor_Dashboard_CIM-mssql.json@' external/bitnami/grafana/values.yaml

###### agent dashboard #######
sed -i -e 's@configMapName: <configmap-map-name-agent-dashboard>@configMapName: ef-grafana-agent-dashboard-mssql@' external/bitnami/grafana/values.yaml
sed -i -e 's@fileName: <file-name-agent-dashboard>@fileName: Agent_Dashboard_CIM-mssql.json@' external/bitnami/grafana/values.yaml
  1. Create config-map for grafana.ini to store default values.

CODE
kubectl -n ef-external create configmap ef-grafana-ini-cm  --from-file=pre-deployment/grafana/grafana.ini
  1. Use the following Helm command to deploy grafana:

CODE
helm upgrade --install=true --wait=true --timeout=10m0s --debug --namespace=ef-external --values=external/bitnami/grafana/values.yaml grafana  external/bitnami/grafana
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.