Frequently Asked Questions


This section covers the Frequently Asked Questions regarding various functionalities/troubleshooting steps of Insights.

 How does Insights work?

Python Agents residing within Insights collects data on regular intervals from various DevOps tools that are used at the project level implementation and publishes it into MQ which is consumed by Java Engine and pushes data into the Graph database which is then presented in various graphical representation for the end users to easily visualize the application productivity in different aspects.

 What are the basic requisites for setting up Insights?
  • Insights needs 2 separate server for setup with sudo access
  • Open the Necessary Ports
  • DevOps tools which are planned to be added to Insights need to have REST API. Please refer to the Agents section for the supported DevOps Tools
  • Service ID for all Tools which will have read-only access to all Projects, Repositories, Build Jobs appropriate for the different Tools for which data to be collected
 What are the areas of knowledge that are required before implementation of Insights?

Basic knowledge/understanding on following will be useful before implantation of Insights

  • Rest APIs  on DevOps tools that are used
  • Basic Cypher queries – Neo4j  (in order to develop additional dashboards)
  • Basic / Functional knowledge of Python code (to debug agents in case of any issues) 
 Which ports are to be that need to be opened for seamless function of Insights?

Please find below the list of ports that need to be opened for seamless functioning of Insights :

  • Grafana - 3000
  • Neo4j - 7474
  • Tomcat - 8080
  • ElasticSearch - 9200
  • MQ port - 15672
 Where can I find information on the versions of Insights?
 What is server-config.json?

This is a very critical file which has configurations to integrate with Grafana, Neo4j, ElasticSearch, LDAP configuration, Postgresql, Insights Spark (if configured) and configuration for Native Users.

 What is tracking.json ?

This is the file which is being used for incremental data fetch from Devops Tools. Agent updates this file with the details at the end of completion of execution every time scheduler triggers the Agent.

 How does the PlatformEngine work?

Agent forwards the data to message queue in the appropriate Agent queues.  Platform engine consumes the data from appropriate queues and creates nodes in the Neo4j in the respective labels.

 What is grafana-end-point?

Grafana end point will be the either Elastic IP or DNS IP of the server in which grafana is hosted.

 How do I setup native Users in Grafana?

Set enableNativeUsers : true in server-config.json

 What is the role of PostgreSQL?

It is the primary DB for Grafana. Additionally, it also stores information about the different agent Queues.

  1. User Authentication information is stored here which will be consumed by PlatformService during authentication
  2. Engine Jar uses the queue related information to create Queues in Rabbit MQ and respective labels in Neo4j
 How does data sync into ElasticSearch?

Graphaware plugin residing in neo4j has the configurations which takes care of syncing data between ElasticSearch and Neo4j.

 How do I invite new users to Insights?

Login to Grafana. Navigate to Server Admin – Add New User. Share the invite by email or once the invite URL gets created, create dummy credentials and share it in a private email to the respective users.

 What do I need to establish correlation between DevOps Tools?

Implementer needs to identify the integrations defined in the DevOps pipeline. Eg: What data flows into GIT to identify specific code changes for a JIRA ISSUE.

 How do I debug Python Agents?

Try to get the values through print statements as applicable. E.g.: print variable_name

 How can I upgrade to latest version of PlatformService war and UI?

Stop Tomcat. Navigate to /tomcat/webapps. Delete PlatformService.warPlatformService and app folders. Copy the latest PlatformService.war and unzip app.zip in the same location. Restart Tomcat

 How Do I verify successful deployment of PlatformService.war file?

After tomcat restart, navigate to the /tomcat/webapps location. PlatformService folder should be created successfully. Access Insights UI and authentication should be successful.

 Where can I find PlatformService logs?

Insights UI log will be available in the location $INSIGHTS_HOME/logs/PlatformService/log.out      

 Where can I find Tomcat logs?

Tomcat logs can be found in the location /tomcat/logs/

 Where can I find Tomcat logs?is PlatformEngine @ EngineJar located in Server

Windows: /Server2/Configs/EngineJar/PlatformEngine.jar

Linux: /opt/insightsengine/PlatformEngine.jar

 Where can I find PlatformEngine log?

Windows: /Server2/Configs/EngineJar/log4j.log

Linux: $INSIGHTS_HOME/logs/PlatformEngine/log4j.log

 How do I configure LDAP?

LDAP configuration to be done in 2 files

  • GRAFANA_HOME/conf/ldap.toml
    • Key configs to be made:

                                   bind_dn

                                   bind_password

                                   port = 389 (default)

                                   host

                                   search_base_dns

                                   group_dn

                                   Uncomment [server.attributes] section

  • $INSIGHTS_HOME/.Insights/server-config.json
    • Key configs to be made to ldapConfiguration section:

                                ldapUrl

                                bindDN

                                bindPassword

                                searchBaseDN

                                searchFilter

 How do I delete the queues in MQ?

Stop the Agents and Engine. Execute the following command.

                curl -XDELETE -u iSight:iSight http://#URL#:15672/mq/api/queues/%2f%/#Queue_name#

Start both the components post deletion

 How do I clear the contents in the queues in MQ?

Stop the Agents and Engine. Execute the following command.

                curl -XDELETE -u iSight:iSight http://#URL#:15672/mq/api/queues/%2f%/#Queue_name#/contents

Start both the components post deletion

 How do I upgrade Grafana?
  1. Stop Grafana
  2. Get latest grafana version from platform docroot.
  3. Follow the installation instructions
  4. Copy the conf files: ldap.toml, defaults.ini
  5. Copy the associated plugins and datasource to the respective path in data folder
 How do I upgrade Neo4j?
  • Make a copy of db folder from the path neo4j_home/data/databases/ folder.
  • Get the required  neo4j version and replace the graph.db folder in data/databases with the backup folder.
  • Then start neo4j as service
 How do I upgrade Engine?

Take backup of current Jar. Copy the Jar from the required release (preferably latest) and place it in the appropriate locations based on the operating system. Start the Jar.

Windows: /Server2/Configs/EngineJar/PlatformEngine.jar

Linux: /opt/insightsengine/PlatformEngine.jar

 How do I upgrade PlatformService or UI?
 How to re-index data or restart data collection from the start?
  1. Stop Agent from UI
  2. Navigate to the service where Agent code is hosted
  3. Stop service in the command line
  4. Make required changes in config.json
  5. Delete tracking.json
  6. Clear the data nodes and associated relationships from neo4j to avoid duplicates
  7. Start the service in command line
 Response in cypher query is slow?
  • Check if indexes are applied to the key attributes in each of the labels.
  • Use optimized query.
 What are the basic minimum configurations required to start data collection for an agent Please refer the attached spreadsheet.

Click here to view the section.

 What is the precaution steps before rebooting server ?

Stop all the following services 

  1. RabbitMq
  2. All the Agents
 How to find sprint field through Jira APi?

1)Open a issue in Jira GUI which is a part of sprint http://<JIRAHOST.com>/rest/api/2/issue/<issueID>

2)


 What if the logo is not loading During Insights Startup?

There could be 3 possible configuration that needs to be checked

  1. Telnet the public IP with port grafana port number(3000) Eg: telnet 123.122.12.12 3000 if is connected then it is good to proceed,if not check with server admin for opening port or a network restart should help.
  2. Check the grafana endpoint in server-config.json if it is present with the public IP ,if not go ahead and change it.
  3. Check apache tomcat folder/webapps/app/config/uiconfig.json file, open the file and there will be reference to two urls if it is localhost change it to Public IP.
  4. Check artifact name inside apache tomcat folder/webapps/PlatformService.war  . war file should not have version name appended in it.
 JIRA Unauthorized error despite correct credentials

  Don't give JIRA password directly, in the configuration.

Generate a token in https://id.atlassian.com/manage/api-tokens# and use it in place of token.

 Cannot Start RabbitMq

Check for the logs of RabbitMq if Reboot is the issue then the logs will look like below


"BOOT FAILED =========== Error description: {could_not_start,rabbit, {bad_return,

"

In the above case the reason for the failure is that the when server is rebooted it end up in the bad queue db
(for whatever reason -i.e. a sudden power failure, some other process touches the files)
which rabbitmq can't parse and so it crashes. Once you clear the queue of messages, it works fine.


Go to the mnesia directories and delete the queues
and msg_store_transient directories.
Make sure to take backup.
mnesia folder location : /var/lib/rabbitmq/.


Since the db, create the respective queue for the tools using the agent ID in the config.json for the respective agents
before starting the agents.

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