exporter_type: sidecar
app_name_short: Aerospike
app_name: {{app_name_short}}
app_site_name: Aerospike
app_site_url: https://aerospike.com/
exporter_name: the Aerospike exporter
exporter_pkg_name: aerospike-prometheus-exporter
exporter_repo_url: https://github.com/aerospike/aerospike-prometheus-exporter
dashboard_available: true
minimum_exporter_version: "1.8.0"
multiple_dashboards: false
dashboard_display_name: {{app_name_short}} Prometheus Overview
config_mods: |
  apiVersion: apps/v1
  kind: StatefulSet
  metadata:
    name: aerospike
    labels:
      app.kubernetes.io/name: aerospike
  spec:
    serviceName: aerospike
    replicas: 1
    selector:
      matchLabels:
  +     app.kubernetes.io/name: aerospike
    template:
      metadata:
        labels:
  +       app.kubernetes.io/name: aerospike
      spec:
        containers:
        - name: aerospike
          image: aerospike/aerospike-server:6.0.0.2
          ports:
          - containerPort: 3000
  +     - name: aerospike-prometheus-exporter
  +       image: aerospike/aerospike-prometheus-exporter:1.8.0
  +       ports:
  +       - containerPort: 9145
  +         name: prometheus
  +       env:
  +         - name: AS_HOST
  +           value: localhost
  +         - name: AS_PORT
  +           value: "3000"
additional_install_info: |
  These instructions assume you already have a working {{app_name_short}}
  installation and want to modify it to include an exporter. For information
  about setting up {{app_name_short}}, see the
  [Aerospike operator documentation](https://docs.aerospike.com/cloud/kubernetes/operator){:class=external}.
podmonitoring_config: |
  apiVersion: monitoring.googleapis.com/v1
  kind: PodMonitoring
  metadata:
    name: aerospike
    labels:
      app.kubernetes.io/name: aerospike
      app.kubernetes.io/part-of: google-cloud-managed-prometheus
  spec:
    endpoints:
    - port: prometheus
      interval: 30s
    selector:
      matchLabels:
       app.kubernetes.io/name: aerospike
sample_promql_query: up{job="aerospike", cluster="{{cluster_name}}", namespace="{{namespace_name}}"}
alerts_config: |
  apiVersion: monitoring.googleapis.com/v1
  kind: Rules
  metadata:
    name: aerospike-rules
    labels:
      app.kubernetes.io/component: rules
      app.kubernetes.io/name: aerospike-rules
      app.kubernetes.io/part-of: google-cloud-managed-prometheus
  spec:
    groups:
    - name: aerospike
      interval: 30s
      rules:
      - alert: AerospikeHighMemoryUtilization
        annotations:
          description: |-
            Aerospike high memory utilization
              VALUE = {{ $value }}
              LABELS: {{ $labels }}
          summary: Aerospike high memory utilization (instance {{ $labels.instance }})
        expr: aerospike_node_stats_system_free_mem_pct < 5
        for: 5m
        labels:
          severity: critical
      - alert: AerospikeHighNamespaceDiskUtilization
        annotations:
          description: |-
            Aerospike high namespace disk utilization
              VALUE = {{ $value }}
              LABELS: {{ $labels }}
          summary: Aerospike high namespace disk utilization (instance {{ $labels.instance }})
        expr: aerospike_namespace_device_available_pct < 5
        for: 5m
        labels:
          severity: warning
      - alert: AerospikeHighNamespaceMemoryUtilization
        annotations:
          description: |-
            Aerospike high namespace memory utilization
              VALUE = {{ $value }}
              LABELS: {{ $labels }}
          summary: Aerospike high namespace memory utilization (instance {{ $labels.instance }})
        expr: aerospike_namespace_memory_free_pct < 5
        for: 5m
        labels:
          severity: warning
additional_alert_info: You can adjust the alert thresholds to suit your application.
