Grafana 9.3.1 to 9.5.5 migration

Step 1: Download the 9.5.5 Grafana zip file from the below URL.

Download Grafana package from

Download Grafana | Grafana Labs

Step 2: Unzip the package and copy the custom settings from configuration files default.ini, ldap.toml and custom.ini present in conf folder from older version Grafana 9.31 to new version Grafana 9.5.5 folder. Particularly server, database, security, allow_loading_unsigned_plugins section of default.ini need to be change if required in migration.

Please check for below properties in default.ini file.

  • Database section

[database]

# You can configure the database connection by specifying type, host, name, user and password

# as separate properties or as on string using the url property.

# Either "mysql", "postgres" or "sqlite3", it's your choice

type = (database type)

host = (database host)

name = grafana

user = (database name)

# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""

password = (database password)

 

  • Security section

[security]
  # set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
  allow_embedding = true

 

  • Grafana Live section

[live]

# max_connections to Grafana Live WebSocket endpoint per Grafana server instance. See Grafana Live docs

# if you are planning to make it higher than default 100 since this can require some OS and infrastructure

# tuning. 0 disables Live, -1 means unlimited connections.

max_connections = 0

 

  • External Image Storage section

[plugins]

# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.

neo4j-datasource,Inference,cde-inference-plugin,cde-fusion-panel plugins are not signed plugins so we have to allow loading these plugins using the property as below. If this property is not set, we don’t see the plugins in Grafana.

allow_loading_unsigned_plugins = cts-neo-4-j-4-0,Inference,cde-inference-plugin,cognizant-insights-charts

We can check the name of the plugin in package.json in the plugin folder.

(eg. grafana-9.5.5\data\plugins\insights-charts-4-0\package.json

 

Step 3:

  • Click here to download master.zip.

  • Unzip and copy the iSight_ui3.js in Insights-master\PlatformGrafanaPlugins\ScriptedDashboard.

  • Place it inside grafana-9.5.5/public/dashboards.

Step 4:

  • Include the below script tags in the index.html file  located in C:\InSights_Windows\Server2\grafana-9.5.5\public\views 

<script async="" src="//www.googletagmanager.com/gtm.js?id=[[.GoogleTagManagerId]]">

</script><script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>

Step 5:

  • Add all the files inside img folder (Click here to download img folder) in C:\InSights_Windows\Server2\grafana-9.5.5\public\img. 

Step 6:

  • In this version , plugins got updated.

  • Copy the inference_DS3.0 and neo4j-4 in Insights-master\PlatformGrafanaPlugins\DataSources

  • Copy the inference-plugin and insights-charts-4-0 in Insights-master\PlatformGrafanaPlugins\Panels

  • Place those folders inside C:\InSights_Windows\Server2\grafana-9.5.5\data\plugins

Step 7:

  • In this latest version , dashboardReportElement.json got updated.

  • Therefore for report generation , copy the dashboardReportElement.json in Insights-master\PlatformReports\src\main\resources.

  • Replace it inside C:\InSights_Windows\Server2\INSIGHTS_HOME\dashboardReportTemplate.

Step 8: Postgres Backup Steps

  • Stop the previous version of Grafana running on the instance.

  • Follow the below steps to backup existing database

    • Navigate to <postgres_installation_path>/bin

      Backup DB by executing the command pg_dump --username=username --password grafana > grafana_backup

Step 9: Run grafana-server.exe file from the bin folder of Grafana-9.5.5 folder.

Step 10:

  • create Grafana service using following command

C:\InSights\Insights_Deployment\Server2\nssm-2.24\win64\nssm install Grafana9.5.5 "C:\InSights\Insights_Deployment\Server2\grafana-9.5.5\bin\grafana-server.exe"

  • Start the  Grafana9.5.5 service.

©2021 Cognizant, all rights reserved. US Patent 10,410,152