Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 2.96 KB

observability.adoc

File metadata and controls

42 lines (33 loc) · 2.96 KB

Observability

Application metrics

You can enable 3scale monitoring configuring the following APIManager spec fields:

apiVersion: apps.3scale.net/v1alpha1
kind: APIManager
metadata:
  name: example-apimanager
spec:
  monitoring:
    enabled: true  # Mandatory, deploys PodMonitors, GrafanaDashboards and PrometheusRules
    enablePrometheusRules: false # Optional, not deploy PrometheusRules
  • Create a PodMonitor custom resource for every DeployConfig, so prometheus-operator knows how to scrape metrics from every pod

  • Create a GrafanaDashboard custom resource for every 3scale component:

    • There are dasboards for every 3scale component: Backend, System, Zync, Apicast, Apicast Services

    • In addition, there are a couple of generic dashboards with kubernetes resources usage by pod and namespace where the 3scale instance is deployed

  • Create a PrometheusRule custom resource for every 3scale component:

    • You can check default alerts at 3scale Operator repository

    • As alerts management can be very customizable, to not force anyone using them, they can be disabled from operator management by adding the optional field enablePrometheusRules: false

    • Having access to default PrometheusRules custom resources, you can deploy manually the ones you prefer by tunning them to your own needs (updating severity, time duration, thresholds…​)

    • Bear in mind that every default PrometheusRule has a linked SOP (Standard Operating Procedures) on an annotation, you can check current SOP alerts at sops/alerts directory

Databases metrics

  • 3scale uses different databases (different redis, mysql, postgresql, memcached, sphinx), so if there is any issue on a database it might have a huge impact on 3scale performance and availability

  • For this reason, it is recommended to setup monitoring on 3scale databases, along with some prometheus alerts, and also grafana dashboards to easily check internal database metrics

  • You can use Prometheus Exporter Operator in order to monitor:

    • 3scale databases internal metrics (including alerts and grafana dashboards): redis, mysql, postgresql, memcached, sphinx

    • HTTP monitoring (latency, availability, TLS/SSL certificate expiration…​) of any 3scale HTTP endpoint

    • And in case of databases deployed in AWS: monitor AWS Cloudwatch metrics from any AWS service (like AWS RDS or AWS ElastiCache…​ ). Some metrics like CPU or disk space metrics can not be extracted from redis/mysql exporter, so cloudwatch exporter is required