Cloud Foundry Prometheus Exporter
A Prometheus exporter for Cloud Foundry administrative information. Please refer to the FAQ for general questions about this exporter.
Architecture overview
Installation
Binaries
Download the already existing binaries for your platform:
$ ./cf_exporter <flags>
From source
Using the standard go install
(you must have Go already installed in your local machine):
$ go install github.com/cloudfoundry-community/cf_exporter
$ cf_exporter <flags>
Cloud Foundry
The exporter can be deployed to an already existing Cloud Foundry environment:
$ git clone https://github.com/cloudfoundry-community/cf_exporter.git
$ cd cf_exporter
Modify the included application manifest file to include your Cloud Foundry properties. Then you can push the exporter to your Cloud Foundry environment:
$ cf push
BOSH
This exporter can be deployed using the Prometheus BOSH Release.
Usage
Flags
Flag / Environment Variable |
Required |
Default |
Description |
cf.api_url CF_EXPORTER_CF_API_URL |
Yes |
|
Cloud Foundry API URL |
cf.username CF_EXPORTER_CF_USERNAME |
Yes |
|
Cloud Foundry Username |
cf.password CF_EXPORTER_CF_PASSWORD |
Yes |
|
Cloud Foundry Password |
filter.collectors CF_EXPORTER_FILTER_COLLECTORS |
No |
|
Comma separated collectors to filter (Applications , Organizations , Services , Spaces ) |
metrics.namespace CF_EXPORTER_METRICS_NAMESPACE |
No |
cf |
Metrics Namespace |
skip-ssl-verify CF_EXPORTER_SKIP_SSL_VERIFY |
No |
false |
Disable SSL Verify |
web.listen-address CF_EXPORTER_WEB_LISTEN_ADDRESS |
No |
:9193 |
Address to listen on for web interface and telemetry |
web.telemetry-path CF_EXPORTER_WEB_TELEMETRY_PATH |
No |
/metrics |
Path under which to expose Prometheus metrics |
Metrics
The exporter returns the following Applications
metrics:
Metric |
Description |
Labels |
namespace_application_info |
Labeled Cloud Foundry Application information |
application_id , application_name , space_id , space_name , organization_id , organization_name |
namespace_applications_total |
Total number of Cloud Foundry Applications |
|
namespace_last_applications_scrape_error |
Whether the last scrape of Applications metrics from Cloud Foundry resulted in an error (1 for error, 0 for success) |
|
namespace_last_applications_scrape_timestamp |
Number of seconds since 1970 since last scrape of Applications metrics from Cloud Foundry |
|
namespace_last_applications_scrape_duration_seconds |
Duration of the last scrape of Applications metrics from Cloud Foundry |
|
The exporter returns the following Organizations
metrics:
Metric |
Description |
Labels |
namespace_organization_info |
Labeled Cloud Foundry Organization information with a constant '1' value |
organization_id , organization_name |
namespace_organizations_total |
Total number of Cloud Foundry Organizations |
|
namespace_last_organizations_scrape_error |
Whether the last scrape of Organizations metrics from Cloud Foundry resulted in an error (1 for error, 0 for success) |
|
namespace_last_organizations_scrape_timestamp |
Number of seconds since 1970 since last scrape of Organizations metrics from Cloud Foundry |
|
namespace_last_organizations_scrape_duration_seconds |
Duration of the last scrape of Organizations metrics from Cloud Foundry |
|
The exporter returns the following Services
metrics:
Metric |
Description |
Labels |
namespace_service_info |
Labeled Cloud Foundry Service information with a constant '1' value |
service_id , service_label |
namespace_services_total |
Total number of Cloud Foundry Services |
|
namespace_last_services_scrape_error |
Whether the last scrape of Services metrics from Cloud Foundry resulted in an error (1 for error, 0 for success) |
|
namespace_last_services_scrape_timestamp |
Number of seconds since 1970 since last scrape of Services metrics from Cloud Foundry |
|
namespace_last_services_scrape_duration_seconds |
Duration of the last scrape of Services metrics from Cloud Foundry |
|
The exporter returns the following Spaces
metrics:
Metric |
Description |
Labels |
namespace_space_info |
Labeled Cloud Foundry Space information with a constant '1' value |
space_id , space_name |
namespace_spaces_total |
Total number of Cloud Foundry Spaces |
|
namespace_last_spaces_scrape_error |
Whether the last scrape of Spaces metrics from Cloud Foundry resulted in an error (1 for error, 0 for success) |
|
namespace_last_spaces_scrape_timestamp |
Number of seconds since 1970 since last scrape of Spaces metrics from Cloud Foundry |
|
namespace_last_spaces_scrape_duration_seconds |
Duration of the last scrape of Spaces metrics from Cloud Foundry |
|
Acknowledgements
Thanks to Michal Kuratczyk who has also been working on a cccf_exporter.
Contributing
Refer to the contributing guidelines.
License
Apache License 2.0, see LICENSE.