A compatible cloud-config with a default option for network and vm_types (you can use the example that comes from cf-deployment)
Although not mandatory, it is recommended to deploy the node exporter addon in order to get system metrics.
Clone the repository
First, clone this repository into your workspace:
git clone https://github.com/bosh-prometheus/prometheus-boshrelease
cd prometheus-boshrelease
export BOSH_ENVIRONMENT=<name>
Then checkout to the release branch you want to use, so manifest files will be in synch with the release version:
git checkout v...
Basic deployment
To deploy a basic prometheus server with alertmanager and grafana (but no exporters) use the following command:
bosh -d prometheus deploy manifests/prometheus.yml \
--vars-store tmp/deployment-vars.yml
Once deployed, look for the nginx instance IP address:
bosh -d prometheus instances
You can reach each component’s web ui at:
alertmanager: http://<nginx-ip-address>:9093
grafana: http://<nginx-ip-address>:3000
prometheus: http://<nginx-ip-address>:9090
Credentials for each components can be located at the tmp/deployment-vars.yml file.
Using BOSH Service Discovery
If you want to use the BOSH Service Discovery in order to dynamically discover your exporters then add the monitor-bosh.yml op file by running the following command (filling the required variables with your own values):
This will add the UAA clients required to gather information from the Cloud Foundry API
and Firehose. Then add the monitor-cf.yml ops file by running the following
command (filling the required variables with your own values):
This will switch deployment to firehose_exporter-attic, cloudfoundry_dashboards-attic and cloudfoundry_alerts-attic
Register Cloud Foundry routes
If you want to access alertmanager, grafana, and prometheus web ui’s using your Cloud Foundry system domain instead of IP addresses, then you can register those routes inside your Cloud Foundry environment using the enable-cf-route-registrar.yml op file by running the following command (filling the required variables with your own values):
If you want to allow users registered at your Cloud Foundry environment to access the Grafana dashboards (Viewer mode only), first update your cf-deployment adding the add-grafana-uaa-clients.yml op file. This will add the UAA client required by the Grafana-UAA integration.
Then add the enable-grafana-uaa.yml op file by running the following command (filling the required variables with your own values):
Additional operations files are located at the manifests/operators directory. Those files includes a basic configuration, so extra ops files might be needed for additional configuration.
Please review the op files before deploying them to check the requirements, dependencies and necessary variables.
Enables monitoring Concourse CI < v3.8.0. Requires node exporter on Concourse VMs (probably as a BOSH add-on) and InfluxDB to be deployed independently and configured as a data source in Grafana as well as Concourse configured to send events to InfluxDB
Some operators files requires additional information to provide environment-specific or sensitive configuration such as various credentials. To do this in the default configuration, we use the --vars-store. This flag takes the name of a yml file that it will read and write to. Where necessary credential values are not present, it will generate new values based on the type information stored at the different deployment files. Necessary variables that BOSH can’t generate need to be supplied as well.
See each particular op files you’re using for any additional necessary variables.
See also the BOSH CLI documentation for more information about ways to supply such additional variables.
Prometheus BOSH Release
This is a BOSH release for Prometheus, Alertmanager, and Grafana. It also includes various Prometheus exporters and Grafana plugins.
The detailed list of included components and their maintenance status is available on VERSIONS.md
Questions? Pop in our Slack channel!
Table of Contents
Usage
Requirements
In order to use this BOSH release you will need:
25555- Director API,8443- UAA API)defaultoption fornetworkandvm_types(you can use the example that comes from cf-deployment)Although not mandatory, it is recommended to deploy the node exporter addon in order to get system metrics.
Clone the repository
First, clone this repository into your workspace:
Then checkout to the release branch you want to use, so manifest files will be in synch with the release version:
Basic deployment
To deploy a basic
prometheusserver withalertmanagerandgrafana(but no exporters) use the following command:Once deployed, look for the
nginxinstance IP address:You can reach each component’s web ui at:
alertmanager:http://<nginx-ip-address>:9093grafana:http://<nginx-ip-address>:3000prometheus:http://<nginx-ip-address>:9090Credentials for each components can be located at the
tmp/deployment-vars.ymlfile.Using BOSH Service Discovery
If you want to use the BOSH Service Discovery in order to dynamically discover your exporters then add the monitor-bosh.yml op file by running the following command (filling the required variables with your own values):
If you have configured your bosh-deployment to use UAA user management (via the uaa.yml ops file) we recommend adding the add-bosh-exporter-uaa-clients.yml op file to your bosh-deployment and then adding the enable-bosh-uaa.yml ops file to the prometheus deployment by running the following command (filling the required variables with your own values):
In case you have configured manually an UAA
client_idfor thebosh_exporter(different frombosh_exporter), then run the following command instead:Monitoring Cloud Foundry
If you want to monitor your Cloud Foundry platform, first update your cf-deployment adding the add-prometheus-uaa-clients.yml op file.
This will add the UAA clients required to gather information from the Cloud Foundry API and Firehose. Then add the monitor-cf.yml ops file by running the following command (filling the required variables with your own values):
Register Cloud Foundry routes
If you want to access
alertmanager,grafana, andprometheusweb ui’s using your Cloud Foundry system domain instead of IP addresses, then you can register those routes inside your Cloud Foundry environment using the enable-cf-route-registrar.yml op file by running the following command (filling the required variables with your own values):The op file will register the following routes:
https://alertmanager.<cf system domain>https://grafana.<cf system domain>https://prometheus.<cf system domain>Use UAA for Grafana authentication
If you want to allow users registered at your Cloud Foundry environment to access the Grafana dashboards (Viewer mode only), first update your cf-deployment adding the add-grafana-uaa-clients.yml op file. This will add the UAA client required by the Grafana-UAA integration.
Then add the enable-grafana-uaa.yml op file by running the following command (filling the required variables with your own values):
Operations files
Additional operations files are located at the manifests/operators directory. Those files includes a basic configuration, so extra ops files might be needed for additional configuration.
Please review the op files before deploying them to check the requirements, dependencies and necessary variables.
alertmanageralerts by namealertmanageralertmanageralertmanageralertmanageralertmanageralertmanageralertmanageralertmanageris externally reachablebosh_exporterUAAclient_idfor the enable-bosh-uaa.yml op-filealertmanager,grafana, andprometheusas Cloud Foundry routes (under yoursystem domain)grafanauser authentication to use Cloud Foundry UAA (you must apply the add-grafana-uaa-clients.yml op file to your cf-deployment)grafanauser authentication to use a generic OAuth2 provideralertmanagerblackbox_exporterbosh_exportercf_exporterfirehose_exportergrafanakube_state_metrics_exporterprometheusshield_exporterstackdriver_exporterroot_urlforgrafanajobsandprocessesand enables Service Discoverynginxinstance, useful to attach a Load Balancerprometheusis externally reachableIn addition, some deprecated ops-files allows to switch back to legacy behaviours | File | Description | exporter | dashboards | alerts | | —- | ———– |:——–:|:———-:|:——:| | deprecated/monitor-cf-attic.yml | Use legacy implementation of
monitor-cf.yml| x | x | x | | deprecated/cf/add-prometheus-uaa-clients-attic.yml | Adds UAA client in cloud foundry deployment when usingmonitor-cf-attic.yml| | | | | deprecated/enable-cf-loggregator-v2.yml | Enables Cloud Foundry Loggregator V2 API calls in the legacyfirehose_exporter| | | |Deployment variables and the var-store
Some operators files requires additional information to provide environment-specific or sensitive configuration such as various credentials. To do this in the default configuration, we use the
--vars-store. This flag takes the name of aymlfile that it will read and write to. Where necessary credential values are not present, it will generate new values based on the type information stored at the different deployment files. Necessary variables that BOSH can’t generate need to be supplied as well. See each particular op files you’re using for any additional necessary variables.See also the BOSH CLI documentation for more information about ways to supply such additional variables.
Contributing
Refer to CONTRIBUTING.md.
Run tests
License
Apache License 2.0, see LICENSE.