Connector Data Prerequisites for Capacity Forecasting
Review the monitoring and cloud data-source prerequisites documented for Capacity Forecasting.
Prerequisites for Data Integration#
Below are the Supported Connectors by HEAL.
AppDynamics#
1. Configure the application you need to monitor in the AppDynamics system.
2. The AppDynamics connector should be able to fetch data from the AppDynamics system.
You should have an account in the AppDynamics system.
3. Email the following values to ProductSupportTeam@healsoftware.ai.
| DB Column | Description |
|---|---|
| application_id | This is the identifier of the application that the AppDynamics system monitors. |
| application_name | This is the name of the application that the AppDynamics system monitors. |
| organization | This is the name of the client organization. |
| password | This is the password to access the AppDynamics account. |
| username | This is the username to access the AppDynamics account. |
| application_instance | Application can have more than one instances running. Specify the application instance that which AppDynamics system monitors. |
| node | Node is an instance of JVM. One instance of JVM is one node. |
4. Identify the KPIs that HEAL needs to monitor. Send the Component Name, KPI Name, KPI Category, and Service Type (Host or component) to ProductSupportTeam@healsoftware.ai.
For Example: RHEL, CPU_UTIL, CPU, Host.
5. Create an account using the Control Center for a particular client or organization. Create applications and services for that account using the Control Center.
Dynatrace#
Follow the below steps before setting up the Dynatrace Connector.
1. Generate an access token for Dynatrace API.
1. In the Dynatrace menu, select Access Tokens.
2. Select Generate new token.
3. Enter a name for your token.
4. Select the below scopes for the token.
- Data export
- Read entities
- Read metrics
1. Select Generate.
2. Copy the generated token to the clipboard. Store the token in a password manager for future use.
2. Tag the specific request as a key request.
1. In the Dynatrace menu, select Services.
2. Select any service from the list.
3. On the service overview page, select View Dynamic Requests.
4. Scroll down to the Top Requests section and select a request you want to mark as a key request.
5. On the request overview page, open the browse menu (…) and select Mark as the key request.
3. To get the host details, execute the following command:
curl -X GET "https://{Dynatrace host url}/api/v1/entity/infrastructure/hosts?includeDetails=true" -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token {Enter the token generated form step 1}"
4. To get the service details, run the following command:
curl -X GET "https:// ://{Dynatrace instance url}/api/v1/entity/infrastructure/services?includeDetails=true" -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token {Enter the token generated form step 1}"
5. Create an account using the Control Center for a particular client or organization. Create applications and services for that account using the Control Center.
AWS CloudWatch#
Follow the below steps before setting up the AWS Connector.
1. Install AWS Command Line Interface (CLI). Refer,
https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html
2. Create an IAM user account in AWS.
3. Create access and secret key under the user. One user can have multiple keys. Refer,
https://aws.amazon.com/premiumsupport/knowledge-center/create-access-key/
4. AWS instance can be in any region. Select the region and create an AWS instance in the respective region. Refer,
https://docs.aws.amazon.com/efs/latest/ug/gs-step-one-create-ec2-resources.html
5. In AWS, the namespace is a container that holds a list of metrics. You can add metrics in custom and AWS namespaces. A namespace is common for all regions and all instances under the region. Elastic Compute Cloud (EC2) is an AWS service. AWS plugin fetches the metrics under the namespaces. Install an agent on an EC2 instance to fetch the metrics. EC2 instances send data to the cloud watch service. Refer to the below path, to configure CWAgent on the EC2 instance.
https://www.rapidspike.com/blog/how-to-send-log-files-to-aws-cloudwatch-ubuntu/
Assign the IAM role to the EC2 instance with the following permission policies:
CloudWatchAgentServerPolicy
CWAgent automatically creates the namespace and starts assigning values for the respective metrics.
6. The AWS log stream holds all the logs. Each application has one log stream. Refer to the below path, to configure log groups and log streams.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html
The application writes the logs in a file. CW Agent picks up the logs from log files and pushes them to the log stream. AWS plugin reads the data from the log stream, which contains KPIs details.
It would be best if you had a unique dimension to identify a unique metric value for a given instance. There can be multiple instances for a region. These instances can have the same metrics as CPU utilization.
7. Create an account using the Control Center for a particular client or organization. Create applications, services, hosts, component instances, and agents for that account using the Control Center.
8. To monitor custom metrics (if any) in addition to OOB metrics, create the metrics via the CC UI.
Azure AppInsights#
Follow the below steps before setting up the Azure Connector.
1. Create an Azure account.
https://azure.microsoft.com/en-in/free
Azure internally creates an Active Directory while creating the account.
2. Create Azure tenant. Refer,
https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-create-new-tenant#create-a-new-azure-ad-tenant
This automatically creates a tenant_id. A tenant is an account holder. Tenant performs operations like creation, deletion of VMs, etc.
4. Create an Azure resource group. Refer,
https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal#create-resource-groups
5. Create Azure VM. Refer,
https://docs.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal
6. Create a new App Insight resource. Refer,
https://docs.microsoft.com/en-us/azure/azure-monitor/app/create-new-resource
This generates application_id automatically.
7. Get the list of metrics. Refer,
https://docs.microsoft.com/en-us/azure/azure-monitor/app/standard-metrics
8. Get the list of supported metrics. Refer,
https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported
9. Get application_key and application_id. Refer,
https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID
10. Get subscription_id. Refer,
https://docs.microsoft.com/en-us/azure/media-services/latest/setup-azure-subscription-how-to?tabs=portal
11. Get client_id and client_secret key. Refer,
https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade
12. Create an account using the Control Center for a particular client or organization. Create applications and services for that account using the Control Center.
Kubernetes with Prometheus#
Follow the below steps before setting up the Kubernetes Connector.
1. To get the host (prometheus_kpi_response_path), refer to the below example:
{
"metric":{
"__name__":"container_cpu_usage_seconds_total",
"beta_kubernetes_io_arch":"amd64",
"beta_kubernetes_io_os":"linux",
"container":"go-hello-world",
"cpu":"total",
"id":"/kubepods/besteffort/pod2a967dcf-e65a-4d0b-aff2-c3d32ecc327d/20b9198c645f18b6ead2e6b7edecda44f7a0ba7e77d7b56fa15d3f543df911af",
"image":"blackxcloudeng/go-hello-world@sha256:057ace518486f28d6fe813340172064eb515e280b46908b60a6d46a7cc94375c",
"instance":"localhost.localdomain",
"job":"kubernetes-cadvisor",
"kubernetes_io_arch":"amd64",
"kubernetes_io_hostname":"localhost.localdomain",
"kubernetes_io_os":"linux",
"minikube_k8s_io_commit":"0a0ad764652082477c00d51d2475284b5d39ceed",
"minikube_k8s_io_name":"minikube",
"minikube_k8s_io_updated_at":"2021_10_06T14_52_48_0700",
"minikube_k8s_io_version":"v1.23.2",
"name":"k8s_go-hello-world_go-hello-world-6cc76464db-vtrjw_default_2a967dcf-e65a-4d0b-aff2-c3d32ecc327d_0",
"namespace":"default",
"pod":"go-hello-world-6cc76464db-vtrjw"
},
"values":[
[
1637154420,
"404.775392965"
]
]
}
2. To get the comp (prometheus_kpi_response_path), refer to the below example:
{
"metric":{
"__name__":"process_max_fds",
"app":"go-hello-world",
"appnomic_io_platform":"golang",
"apponomic_app":"go-hello-world",
"instance":"192.0.2.100:8086",
"job":"kubernetes-pods",
"kubernetes_namespace":"default",
"kubernetes_pod_container_name":"go-hello-world",
"kubernetes_pod_host_ip":"192.0.2.101",
"kubernetes_pod_ip":"192.0.2.100",
"kubernetes_pod_name":"go-hello-world-6cc76464db-vtrjw",
"kubernetes_pod_uid":"2a967dcf-e65a-4d0b-aff2-c3d32ecc327d",
"pod_template_hash":"6cc76464db",
"prometheus_io_path":"/metrics",
"prometheus_io_port":"8086",
"prometheus_io_scrape":"true"
},
"values":[
[
1637154840,
"1048576"
]
]
}
For Example:
| id | host_or_comp | uid | service_name | kpi_name | pod_name | pod_namespace |
|---|---|---|---|---|---|---|
| 1 | host | $.metric.name | $.metric.job | $.metric.__name__ | $.metric.pod | $.metric.namespace |
| 2 | comp | $.metric.kubernetes_pod_uid | $.metric.job | $.metric.__name__ | $.metric.kubernetes_pod_name | $.metric.kubernetes_namespace |
3. To get the Kubernetes certificates.
a. Client.crt file is located in below path:
<Path where minikube is installed>.minikube/profiles/minikube
For Example:
-----BEGIN CERTIFICATE-----
MIIDITCCAgmgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAVMRMwEQYDVQQDEwptaW5p
a3ViZUNBMB4XDTIxMTAwNTA5MDQzNFoXDTIyMTAwNjA5MDQzNFowMTEXMBUGA1UE
ChMOc3lzdGVtOm1hc3RlcnMxFjAUBgNVBAMTDW1pbmlrdWJlLXVzZXIwggEiMA0G
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC1suWm8Nak/bqe0tuNQ1ObP060NujE
A+joRYkqX07CnIjXHIne907JSS5BFwuO9JjLMWnYPU7fbW1qhre9C0kGh1AiMmZd
KI0j/KrkDaRCPgh2sg0kvni95K4zs3GDTX64AEEH/nRu9bIs2M0a60WH+g9bEAiy
p8yMJysh3F7DtK/yRMyqZ+MixQrG4fxJYqgCwqUi9vo1PytuXocLUUux0jsOQcbE
KConllq0ifKzfMunp7l61wlzOMGLb8R26VmtyHI8OmRh27XOCV1LWgBBRzYmtoSD
KdfO5UygM7RJwtArXAAXrHp7KRqSVZ+69gRE4p5tHy4Gx6QxEwPhigVvAgMBAAGj
YDBeMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUH
AwIwDAYDVR0TAQH/BAIwADAfBgNVHSMEGDAWgBSXOaU382c172Dpc7/aMA3Nyuw1
1jANBgkqhkiG9w0BAQsFAAOCAQEAZiGBnRngMRcl10mQhkAU2m3NHr0An17WN3TJ
m2JLOz9+o7rsHwBz9f/k7+jhaMzg+JdW4FlLAbkf7mkh1HAHbKBiuvGRDd8bSdcq
Xw+T8ICkRwyGibCjqVT66rD3FPWViW1aI9KHaFw+I6+bkkVyoGMz1vp1SEC9czel
KpdSEN6oM5a1dGtk7OqyFuNay8fCaxjWUIQ4OF/qD/wQ0VQiVDhTVk5Nk2R1NeVU
+7615NJbBRYolsp/TOTMJ7Og8H+ffmtbEhWtqOG9ZKq5633CcsrAjxiG4TSMx5QU
9eWtsgc2pZbtuzRhRaVTQGI/DPHl/bDYneUGONVIcn19qz7k6Q==
-----END CERTIFICATE-----
b. Client-key file is located in below path:
<Path where minikube is installed> .minikube/profiles/minikube
For Example:
<contents of client.key>
4. To get the config file from Kubernetes. Config file is located in the below path:
<Path where kubernetes runs>/.kube
Remove the certificate-authority and provide the path for client-certificate and client-key in the below file and encode to Base64.
apiVersion: v1
clusters:
- cluster:
# certificate-authority: /home/CentOS/.minikube/ca.crt
extensions:
- extension:
last-update: Wed, 06 Oct 2021 14:52:52 IST
provider: minikube.sigs.k8s.io
version: v1.23.2
name: cluster_info
server: https://<ip>:<port>
name: minikube
contexts:
- context:
cluster: minikube
extensions:
- extension:
last-update: Wed, 06 Oct 2021 14:52:52 IST
provider: minikube.sigs.k8s.io
version: v1.23.2
name: context_info
namespace: default
user: minikube
name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: minikube
user:
client-certificate: </path of the key present inside docker>/client.crt
client-key: </path of the key present inside docker>/client. Key
5. Create account using Control Center for a particular client or organization.
6. Create application and services for that account using Control Center.