Set Up Monitoring
This page describes how to monitor an a9s Service Instance.
Add a Graphite Endpoint
Streaming of logs and metrics might not be available for the selected plan! If unsure, please check the plan description.
In order to monitor a Service Instance with Graphite, the custom parameter graphite
can be set. This parameter expects
the host
and port
where the Graphite metrics should be sent to.
For example, in order to send Graphite metrics to an endpoint space.graphite-endpoint.com:12345
, the following command
can be used:
cf update-service my-dataservice-service-instance -c '{ "graphite": "space.graphite-endpoint.com:12345" }'
The endpoint would then receive metrics in the format:
<service_guid>.<service_type>.<host>.<metric> <metric value> <metric timestamp>
Metrics Frequency
By default, metrics will be emitted every 10
seconds. The interval can be changed via the custom parameter
metrics_frequency
.
For example, in order to send Graphite metrics to an endpoint every minute, the custom parameter metrics_frequency
would be set to 60
using the following command:
cf update-service my-dataservice-service-instance -c '{ "metrics_frequency": 60 }'
Metrics Prefix
Depending on the defined graphite provider, it might be necessary to prefix the metrics with a certain value, like an
API key for example. In this case the custom parameter metrics_prefix
can be leveraged.
cf update-service my-dataservice-service-instance -c '{ "metrics_prefix": "my-api-key-for-a-certain-provider" }'
The resulting metric path would have the format:
<metrics_prefix>.<service_guid>.<service_type>.<host>.<metric>
System Metrics
Aside from the metrics shown above, as well as the Data Service specific metrics, all of the a9s Data Services also provide system metrics. They can be seen in the Graphite metrics documentation.
Cloud Foundry Org and Space Guid
The Platform Operators can enable support on a global level to prefix the Graphite metrics with the Cloud Foundry organization and space. This means that all metrics of all Service Instances contain that information.
In this case the Graphite metric paths have the following format:
<organization_guid>.<space_guid>.<service_guid>.<service_type>.<host>.<metric>
When enabled, in addition the metrics_prefix
for the Service Instance, will result in the metric path format:
<metrics_prefix>.<organization_guid>.<space_guid>.<service_guid>.<service_type>.<host>.<metric>
Add a Syslog Endpoint
The cf update-service
command used with the -c flag
allows the Service Instance to stream its syslog to a third-party service. In this case, the command expects a JSON
string containing the syslog
key. A single endpoint item for syslog
can be provided, as well as an array of
endpoints. host
and port
are mandatory parameters.
The protocol
parameter is optional. The accepted values are:
udp
setsrfc
by default torfc3164
.tcp
setsrfc
by default torfc3164
.ssl-tcp
setsrfc
by default torfc6587
.- For
ssl-tcp
;ssl_cert
andssl_key
are required parameters. - If
ssl_verify
is set totrue
, thenssl_cacert
must also be provided.
- For
To remove all endpoints, simply set syslog
to []
.
rfc
valuesOptionally, the rfc
parameter can be explicitly overwritten.
Valid values: rfc3164
, rfc5424
and rfc6587
.
cf update-service my-dataservice-service-instance \
-c '{
"syslog": [
{
"host": "logs4.syslog-endpoint.com",
"port": "6514",
"protocol": "ssl-tcp",
"rfc": "rfc6587",
"ssl_cert": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----",
"ssl_key": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----",
"ssl_cacert": "-----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY-----",
"ssl_verify": "false"
}
]
}'
The legacy format to specify syslog endpoints (["hostname1:port1", "hostname2:port2"]
) is still supported.
Setup Disk Usage Alerts
Each service comes with the a9s Parachute. This component monitors ephemeral and persistent disk usage. See the a9s Parachute documentation how to configure the component.