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.
For
reporting_stats_datasource
Field | Example | Description |
---|---|---|
|
|
eg. |
|
|
|
| 12345 |
|
| user123 |
|
| testdb |
|
|
|
|
For
supervisor_dashboard_cim_json_api
Field | Example | Description |
---|---|---|
url |
|
|
Apply the datasource manifest.
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.
Create the Dashboard configs for Grafana by applying the configmap manifest.
CODEkubectl 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
Apply configmap for the MySQL supervisor and agent dashboard files using the steps below.
supervisor dashboard MySQL
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
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
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
Apply configmap for the MSSQL supervisor dashboard files using the steps below.
supervisor dashboard MSSQLACTIONSCRIPT3kubectl 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
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
Use following the config map name and file name parameter for Grafana
###### supervisor dashboard ######
sed -i -e 's@configMapName: <configmap-map-name-supervisor-dashboard>@configMapName: ef-grafana-supervisor-dashboard-mssql@' external/bitnami/grafana/values.yaml
sed -i -e 's@fileName: <file-name-supervisor-dashboard>@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
Add grafana.ini as ConfigMap
Create config-map for grafana.ini to store default values. This needs to be run for both MySQL and MSSQL.
kubectl -n ef-external create configmap ef-grafana-ini-cm --from-file=pre-deployment/grafana/grafana.ini
Use the following Helm command to deploy grafana:
helm upgrade --install=true --wait=true --timeout=10m0s --debug --namespace=ef-external --values=external/bitnami/grafana/values.yaml grafana external/bitnami/grafana