Metrics
Most of the a9s Data Services can send Graphite metrics to a Graphite endpoint. The platform operator and application developer can configure those endpoints individually.
The Graphite metrics can be used for monitoring and alerting.
The platform operator can specify a global Graphite endpoint by specifying
global_graphite_endpoint
in the service manifest. This endpoint will then
be configured for all data service instances.
We use the Graphite plaintext protocol to send Graphite metrics.
By default, Graphite metrics generated by the a9s Logstash have the format:
<service_guid>.<data_service>.<host>.<metric> <metric value> <metric timestamp>
Let's assume we have an a9s Messaging instance with the GUID 76816f88-9ada-41cf-99a4-5d6b7adb0e84 running on host d97432b-mq-0.node.dc1.consul. Then the metric path looks like this:
76816f88-9ada-41cf-99a4-5d6b7adb0e84.rabbitmq.d97432b-mq-0.node.dc1.consul.<metric>
Cloud Foundry Organization and Space
The following feature affects all Graphite metric endpoints, the internal platform operator endpoint discussed in this document mainly, but also the application developer's endpoint(s).
In certain cases it might be beneficial to know the Cloud Foundry organization and space a service instance metric belongs to.
For this purpose the variables use_metrics_prefix_level_2
and
use_metrics_prefix_level_3
exist in the service manifest.
The property use_metrics_prefix_level_2
will add the Cloud Foundry
organization to the Graphite metric path if set to true.
The property use_metrics_prefix_level_3
will add the Cloud Foundry space to
the Graphite metric path if set to true.
To enable support for use_metrics_prefix_level_2
and
use_metrics_prefix_level_3
, you can also use the
Ops file
ops/logstash-add-graphite-metrics-level-2-and-3-to-template.yml
.
Subsequently, the templates must be uploaded using the Template Uploader Errand and the existing instances must be updated, if necessary, using the Deployment Updater Errand.
For example: a9s Messaging
bosh -d rabbitmq-service deploy rabbitmq-service/rabbitmq-service.yml -l config/iaas-config.yml -l config/rabbitmq.yml -o ops/logstash-add-graphite-metrics-level-2-and-3-to-template.yml
bosh -d rabbitmq-service run-errand templates-uploader
bosh -d rabbitmq-service run-errand deployment_updater
Example
The following is an example of a Graphite metric when both properties are enabled:
68470a75-fd07-4897-b868-16e81fab46a5.fffd9f2a-45c6-4368-8d7a-afab38c0e594.ad6c7e44-ae0f-4c77-8df1-06819fd159ba.postgres.rgd822df8-pg-0.node.dc1.consul-dsf2.ha.master 1 1598884839
The value 68470a75-fd07-4897-b868-11e81fab46a5
is the Cloud Foundry
organization and the value fffd9f2a-45c6-4368-8d7a-afab38c0e593
is the Cloud
Foundry space, followed by the data service instance GUID
ad6c7e44-ae0f-4c77-8df1-06819fd159ba
.