Connecting IBM Cloud Private Cloud Foundry to Prometheus
IBM® Cloud Private Cloud Foundry Prometheus exporters are used to aggregate IBM Cloud Private Cloud Foundry monitoring data. Exporters draw from the BOSH, IBM Cloud Private Cloud Foundry, and Firehose monitoring pools to provide information
on the health of the IBM Cloud Private Cloud Foundry deployment. Install the ibm-cf-exporters-prod Helm chart to install these exporters in your IBM Cloud Private Cloud Foundry environment.
Prerequisites
- Kubernetes 1.4 or later with the beta APIs enabled. Complete these steps:
- Log in to Kubernetes.
- Click the user icon and choose Configure client.
-
Install the
kubectlcommand line interface (CLI) if it is not already installed.-
Copy and paste the commands to configure the CLI.
Note: Update the
--namespacevalue with the namespace that you want to use to host the IBM Cloud Private Cloud Foundry exporters.
-
- Download the IBM® Cloud Private
cloudctlCLI. From the IBM Cloud Private console, click Command Line Tools > Cloud Private CLI. - Install the
cloudctlIBM Cloud Private CLI. For more information, see Installing the IBM® Cloud Private CLI. - Install the Helm CLI. For more information, see Setting up the Helm CLI
- Deploy IBM Cloud Private Cloud Foundry.
Installing the Chart
Before you begin
-
You must have a valid
values.yamlfile. If your IBM Cloud Private Cloud Foundry uses self-signed certificates, addskip_ssl: trueto thevalues.yamlfile.Note: The
values.yamlfile, along with the rest of the Helm chart, is available in theinstallation configuration directory. You specified this directory with the-cargument when you ranlaunch.shwhen you installed IBM Cloud Private Cloud Foundry. - Go to the
installation configuration directory, and then to theIBMCloudPrivate/ibm-cf-exporters-proddirectory.- The
values.yamland theibm-cf-exporters-prodHelm chart are located here.
- The
Configuration
- The following table lists the configurable parameters of the
ibm-cf-exporters-prodchart and their default values. - These parameters must be configured before you install the Helm chart. These parameters map to the environment variables that are defined in
values.template_yaml. - All yaml files are in the
installation configuration directorypost install.
| Parameter | Description | Default |
|---|---|---|
cf_api_url |
Cloud Foundry API URL https://api.DOMAIN |
For DOMAIN, see bmxconfig.yml: bmxconfig.bluemix_env_domain |
cf_client_secret |
Cloud Foundry cf_exporter client ID's secret |
See credentials.yml: credentials.cloudfoundry.uaa_cf_exporter_secret |
uaa_url |
Cloud Foundry UAA URL https://uaa.DOMAIN |
For DOMAIN, see bmxconfig.yml: bmxconfig.bluemix_env_domain |
firehose_client_secret |
The secret for the client, firehose_client |
See credentials.yml: credentials.cloudfoundry.uaa_firehose_exporter_secret.secret |
firehose_doppler_url |
Cloud Foundry Doppler URL wss://doppler.DOMAIN:443 URL |
For DOMAIN, see bmxconfig.yml: bmxconfig.bluemix_env_domain |
bosh_url |
BOSH director URL https://IP_ADDRESS:25555 URL |
For IP_ADDRESS, see bmxconfig.yml: bmxconfig.director_ip |
bosh_pwd |
BOSH admin user password |
See credentials.yml: credentials.boshdirector.bosh.password |
director_cert |
BOSH director CA certificate | See certificates.yml: certificates.rootca.certificates.data |
environment |
Environment name to display in Prometheus and Grafana Should be unique per IBM Cloud Private Cloud Foundry deployment |
Cloud Foundry |
- Change directory to the
IBMCloudPrivate/ibm-cf-exporters-providedirectory within theinstallation configuration directory. - Inspect the
values.yaml, or create avalues.yamlfrom thevalues.template_yaml, editing parameters according to the preceding table. - Run the following command:
helm install --name=cf-exporters . --tls
The Helm installation command fails with the following message:
Error: release cf-exporters failed: Internal error occurred: admission webhook "trust.hooks.securityenforcement.admission.cloud.ibm.com" denied the request:
Deny "docker.io/boshprometheus/firehose-exporter", no matching repositories in ClusterImagePolicy and no ImagePolicies in the "default" namespace
Follow the steps to fix this issue:
- Navigate to Manage > Resource Security > Image Policies.
- Click Create Image Policy.
- Provide a name.
- Choose Namespace. Select the namespace you will install the exporter to.
- Click Add Registry and fill in Registry URL = docker.io/boshprometheus/*.
- Leave the VA Scanning off and click Add.
- Click Add again to activate the policy.
Results
- The command deploys the IBM Cloud Private Cloud Foundry exporters in a Kubernetes cluster that communicates with the IBM Cloud Private Cloud Foundry deployment.
Troubleshoot
Run the following command to see logs for the three exporters:
kubectl logs cf-exporter
kubectl logs firehose-exporter
kubectl logs bosh-exporter
The logs show if an incorrect configuration parameter was provided.
Grafana Dashboards
If needed, you can add dashboards to your deployment. Additional dashboards are available in these locations:
-
Using the IBM Cloud Private console, go to
/grafana. - Click Home > Import Dashboard.
- Choose the
.jsonfile from the GitHub repository that is listed previously for the dashboard that you want to install. Copy the contents and paste them into theImport Dashboardin IBM Cloud Private. Then, click Load. - When you are prompted, change the
Name, if required, and then selectprometheusfrom the prometheus field. - Click Import.
- You are taken to the dashboard, and the dashboard is now accessible from the Home menu.
Uninstalling the Chart
Run the following command to uninstall or delete the my-release deployment:
helm delete cf-exporters --tls
This command removes all of the Kubernetes components that are associated with the chart and deletes the release.