README
¶
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_urlCF_EXPORTER_CF_API_URL |
Yes | Cloud Foundry API URL | |
cf.usernameCF_EXPORTER_CF_USERNAME |
[1] | Cloud Foundry Username (must be an administrator user) |
|
cf.passwordCF_EXPORTER_CF_PASSWORD |
[1] | Cloud Foundry Password | |
cf.client-idCF_EXPORTER_CF_CLIENT_ID |
[1] | Cloud Foundry Client ID (must have the cloud_controller.admin or cloud_controller.admin_read_only scope) |
|
cf.client-secretCF_EXPORTER_CF_CLIENT_SECRET |
[1] | Cloud Foundry Client Secret | |
filter.collectorsCF_EXPORTER_FILTER_COLLECTORS |
No | Comma separated collectors to filter. If not set, all collectors will be enabled (Applications, ApplicationEvents, Organizations, SecurityGroups, Services, Spaces) |
|
metrics.namespaceCF_EXPORTER_METRICS_NAMESPACE |
No | cf |
Metrics Namespace |
skip-ssl-verifyCF_EXPORTER_SKIP_SSL_VERIFY |
No | false |
Disable SSL Verify |
web.listen-addressCF_EXPORTER_WEB_LISTEN_ADDRESS |
No | :9193 |
Address to listen on for web interface and telemetry |
web.telemetry-pathCF_EXPORTER_WEB_TELEMETRY_PATH |
No | /metrics |
Path under which to expose Prometheus metrics |
[1] Either cf.username and cf.password or cf.client-id and cf.client-secret must be provided, depending on the desired authentication method.
Metrics
The exporter returns the following Applications metrics:
| Metric | Description | Labels |
|---|---|---|
| metrics.namespace_application_info | Labeled Cloud Foundry Application information with a constant 1 value |
application_id, application_name, space_id, space_name, organization_id, organization_name |
| metrics.namespace_applications_total | Total number of Cloud Foundry Applications | |
| metrics.namespace_applications_scrapes_total | Total number of scrapes for Cloud Foundry Applications | |
| metrics.namespace_applications_scrape_errors_total | Total number of scrape errors of Cloud Foundry Applications | |
| metrics.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) |
|
| metrics.namespace_last_applications_scrape_timestamp | Number of seconds since 1970 since last scrape of Applications metrics from Cloud Foundry | |
| metrics.namespace_last_applications_scrape_duration_seconds | Duration of the last scrape of Applications metrics from Cloud Foundry |
The exporter returns the following Application Events metrics:
| Metric | Description | Labels |
|---|---|---|
| metrics.namespace_application_events_total | Total number of Cloud Foundry Application Events | application_id, event_type |
| metrics.namespace_application_events_scrapes_total | Total number of scrapes for Cloud Foundry Application Events | |
| metrics.namespace_application_events_scrape_errors_total | Total number of scrape errors of Cloud Foundry Application Events | |
| metrics.namespace_last_application_events_scrape_error | Whether the last scrape of Application Events metrics from Cloud Foundry resulted in an error (1 for error, 0 for success) |
|
| metrics.namespace_last_application_events_scrape_timestamp | Number of seconds since 1970 since last scrape of Application Events metrics from Cloud Foundry | |
| metrics.namespace_last_application_events_scrape_duration_seconds | Duration of the last scrape of Application Events metrics from Cloud Foundry |
The exporter returns the following Organizations metrics:
| Metric | Description | Labels |
|---|---|---|
| metrics.namespace_organization_info | Labeled Cloud Foundry Organization information with a constant 1 value |
organization_id, organization_name |
| metrics.namespace_organizations_total | Total number of Cloud Foundry Organizations | |
| metrics.namespace_organizations_scrapes_total | Total number of scrapes for Cloud Foundry Organizations | |
| metrics.namespace_organizations_scrape_errors_total | Total number of scrape errors of Cloud Foundry Organizations | |
| metrics.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) |
|
| metrics.namespace_last_organizations_scrape_timestamp | Number of seconds since 1970 since last scrape of Organizations metrics from Cloud Foundry | |
| metrics.namespace_last_organizations_scrape_duration_seconds | Duration of the last scrape of Organizations metrics from Cloud Foundry |
The exporter returns the following Security Groups metrics:
| Metric | Description | Labels |
|---|---|---|
| metrics.namespace_security_group_info | Labeled Cloud Foundry Security Group information with a constant 1 value |
security_group_id, security_group_name |
| metrics.namespace_security_groups_total | Total number of Cloud Foundry Security Groups | |
| metrics.namespace_security_groups_scrapes_total | Total number of scrapes for Cloud Foundry Security Groups | |
| metrics.namespace_security_groups_scrape_errors_total | Total number of scrape errors of Cloud Foundry Security Groups | |
| metrics.namespace_last_security_groups_scrape_error | Whether the last scrape of Security Groups metrics from Cloud Foundry resulted in an error (1 for error, 0 for success) |
|
| metrics.namespace_last_security_groups_scrape_timestamp | Number of seconds since 1970 since last scrape of Security Groups metrics from Cloud Foundry | |
| metrics.namespace_last_security_groups_scrape_duration_seconds | Duration of the last scrape of Security Groups metrics from Cloud Foundry |
The exporter returns the following Services metrics:
| Metric | Description | Labels |
|---|---|---|
| metrics.namespace_service_info | Labeled Cloud Foundry Service information with a constant 1 value |
service_id, service_label |
| metrics.namespace_services_total | Total number of Cloud Foundry Services | |
| metrics.namespace_services_scrapes_total | Total number of scrapes for Cloud Foundry Services | |
| metrics.namespace_services_scrape_errors_total | Total number of scrape errors of Cloud Foundry Services | |
| metrics.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) |
|
| metrics.namespace_last_services_scrape_timestamp | Number of seconds since 1970 since last scrape of Services metrics from Cloud Foundry | |
| metrics.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 |
|---|---|---|
| metrics.namespace_space_info | Labeled Cloud Foundry Space information with a constant 1 value |
space_id, space_name |
| metrics.namespace_spaces_total | Total number of Cloud Foundry Spaces | |
| metrics.namespace_spaces_scrapes_total | Total number of scrapes for Cloud Foundry Spaces | |
| metrics.namespace_spaces_scrape_errors_total | Total number of scrape errors of Cloud Foundry Spaces | |
| metrics.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) |
|
| metrics.namespace_last_spaces_scrape_timestamp | Number of seconds since 1970 since last scrape of Spaces metrics from Cloud Foundry | |
| metrics.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.
Documentation
¶
There is no documentation for this package.