Skip to main content
Version: 76.0.0

Custom Parameters

As mentioned in Getting Started - Custom Parameters as an end user, an Application Developer has the opportunity to customize their Service Instance by using custom parameters.

mapping_strict_match

This property is used to configure the setting mapping-strict-match of the Graphite exporter. The default value is true.

If mapping_strict_match is set to true, only the metrics specified in the Graphite mapping configuration are allowed. Thus metrics that don't match the mapping configuration are skipped. This is useful if you have a very large set of metrics. For more information please see the Graphite Documentation.

scrape_configs

info

This custom parameter is disabled by default. Please contact your Platform Operator for further details.

The scrape_configs parameter allows the Application Developer to configure scraping targets for your a9s Prometheus Service Instance in the form of a valid JSON object.

note

Please keep in mind that while scraping targets can be set, the default targets are always set and take precedence over the ones provided by the custom parameter.

The example below showcases the minimum configuration required in order to properly set a scraping target. For a comprehensive list of accepted parameters please refer to the Prometheus documentation:

{
"scrape_configs": [
{
"job_name": "example_metrics",
"scrape_interval": "60s",
"scrape_timeout": "30s",
"static_configs": [
{
"targets": [
"example-app-prometheus-hungry-hippopotamus-ow.apps.example.a9s-dummy.de"
]
}
]
}
]
}
Prometheus 3 Caveats

Starting with Prometheus 3, the following changes are in effect:

  • Scrape configurations require a scrape_protocol header. Therefore, ensure to set a relevant scrape_protocol as well when setting up custom scrape_configs for Prometheus 3 Service Instances.

    To prevent any issues due to missing scrape_protocol, fallback_scrape_protocol is set to PrometheusText0.0.4 by default for a9s Prometheus 3 Service Instances.

    Please refer to the Prometheus documentation about scrape_config for more information.

  • Credentials (such as Authorization header, basic auth, bearer token, OAuth2, configured headers) are no longer forwarded when following a redirect to a different host. This can effect the authentication if the remote_write or custom scrape_configs are set to an endpoint behind a load balancer or proxy that does a 302 redirection to another host.

$ cf update-service my-prometheus-service -c custom_scrape_configs.json
scrape_config JSON values

While there is a validation in place to ensure that the provided JSON object is valid, it should be noted that the contents themselves are not validated. Thus, it is the responsibility of the Application Developer to properly sanitize and validate this input.