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.
The parameters host
and port
are mandatory. The parameters protocol
, rfc
, ssl_verify
and ssl_cacert
are
optional.
The accepted values for the protocol
parameter are:
udp
(default): setsrfc
by default torfc3164
.tcp
: setsrfc
by default torfc3164
.ssl-tcp
: setsrfc
by default torfc6587
.
If the parameter protocol
is set to ssl-tcp
, the communication will be encrypted. Additionally, when the
parameter ssl_verify
is set to true
, the certificates will be verified with the CA certificate specified with the
parameter ssl_cacert
.
rfc
valuesOptionally, the rfc
parameter can be explicitly overwritten.
Valid values: rfc3164
, rfc5424
and rfc6587
.
To remove all endpoints, simply set syslog
to []
.
For example:
cf update-service my-dataservice-service-instance \
-c '{
"syslog": [
{
"host": "d765411-fluentd.service.dc1.dsf2.a9ssvc",
"port": "6514",
"protocol": "ssl-tcp",
"rfc": "rfc6587",
"ssl_cacert": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----",
"ssl_verify": "false"
}
]
}'
The legacy format to specify syslog endpoints (["hostname1:port1", "hostname2:port2"]
) is still supported.
The following a9s Data Services require to use the legacy format:
- a9s Prometheus
- a9s Redis®[^*]
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.
*Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd. Any use by anynines GmbH is for referential purposes only and does not indicate any sponsorship, endorsement or affiliation between Redis and anynines GmbH.