Enable Monitoring on your CloudOne Applications - V 1
As tech-stacks evolve and Kubernetes/Rancher platforms are upgraded, additional settings/configurations are needed to enable monitoring on your applications in CloudOne DevOps by Instana. Please visit below link and click on specific technology your application(s) uses to see detailed information about installing and configuring Instana data-collector : https://www.ibm.com/docs/en/instana-observability/current?topic=supported-technologies#tracing
Spring Boot and NodeJs seem to be the two main tech stacks in CloudOne DevOps, so here are summarized simple steps to follow to enable detailed monitoring for those two tech-stacks :
Spring Boot
Note : below configs for Spring Boot are added to boilerplate by DevOps team, so when you order a new instance of Spring Boot in the portal, you don’t need to repeat the steps. Please apply below steps to your existing Spring Boot services.
-
Spring Boot Actuator needs to be configured in your pom.xml :
<dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-starter-actuator </artifactId> </dependency>
-
For Spring Boot 2.2.x and later it's necessary to enable JMX in the application.properties
spring.jmx.enabled=true
or, in the application.yaml :
NodeJS
-
Install the Instana Node.js collector in your app.
To install the Instana Node.js collector and have your Node.js app monitored by Instana, install the npm package @instana/collector via:
npm install --save @instana/collector
Now that the collector is installed, it needs to be activated from within the application. Do this by requiring and initializing it as the first statement in your application:
require('@instana/collector')(); // All other require statements must be done after the collector is initialized. // Note the () after the require statement of the collector which initializes it. // const express = require('express');
For more in-depth information, refer to the installation page.
-
Add an env-var
INSTANA_AGENT_HOST
to your deployment configHere is an example deployment.yaml, and the highlighted lines needed to be added :
apiVersion: apps/v1 kind: Deployment … … … template: … … spec: containers: - env: - name: INSTANA_AGENT_HOST valueFrom: fieldRef: fieldPath: status.hostIP envFrom: - configMapRef: name: isf-api image: docker-vault.repo-hio.cloudone.netapp.com/tub-risfstg-stg/nodejs-isf-api:1.9.0-release-m378a402c imagePullPolicy: Always livenessProbe: failureThreshold: 3 httpGet: path: /ping port: nodejs scheme: HTTP periodSeconds: 10 successThreshold: 1 … … …
• Note for Go, Ruby, Python, .NET Core In addition to the instructions in https://www.ibm.com/docs/en/instana-observability/current?topic=supported-technologies#tracing for these technologies, just like NodeJS, these applications need to have the env-var
INSTANA_AGENT_HOST
defined in deployment.yaml like below :spec: containers: env: - name: INSTANA_AGENT_HOST valueFrom: fieldRef: fieldPath: status.hostIP
If you have any further questions/concerns, please contact @Jo,Han in Monitoring & FinOps team.