platforms:
- type: GCE
  launch_stage: GA
  install_documentation_url: https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/couchbase
  agent_requirement:
    logs_minimum_supported_version:
      major: 2
      minor: 18
      patch: 2
    metrics_minimum_supported_version:
      major: 2
      minor: 18
      patch: 2
  detections:
  - characteristic_log:
      log_name_regex: couchbase
  - characteristic_metric:
      metric_type: workload.googleapis.com/couchbase.bucket.memory.usage
  default_logs:
  - name: couchbase_general
    fields:
    - name: jsonPayload.message
      type: string
      description: Log message
    - name: jsonPayload.node_name
      type: string
      description: The name of the node issuing the log message
    - name: jsonPayload.module_name
      type: string
      description: The name of the module issuing the entry
    - name: jsonPayload.source
      type: string
      description: Source where the log originated
    - name: jsonPayload.type
      type: string
      description: The type of log
    - name: jsonPayload.level
      type: string
      description: Log entry severity for the couchbase log
    - name: severity
      type: string
      description: ''
  - name: couchbase_http_access
    fields:
    - name: httpRequest.remoteIp
      type: string
      description: The IP address (IPv4 or IPv6) of the client that issued the HTTP
        request
    - name: httpRequest.requestUrl
      type: string
      description: Request URL (typically just the path part of the URL)
    - name: httpRequest.protocol
      type: string
      description: Protocol used for the request
    - name: httpRequest.requestMethod
      type: string
      description: HTTP method
    - name: httpRequest.status
      type: number
      description: HTTP status code
    - name: httpRequest.responseSize
      type: string
      description: ''
    - name: httpRequest.userAgent
      type: string
      description: ''
    - name: jsonPayload.message
      type: string
      description: Log message
    - name: jsonPayload.host
      type: string
      description: The IP address of the client invoking the HTTP request
    - name: jsonPayload.level
      type: string
      description: Log entry severity for the couchbase log
    - name: jsonPayload.user
      type: string
      description: The name of the user making the HTTP request if basic auth is used.
    - name: severity
      type: string
      description: ''
  - name: couchbase_goxdcr
    fields:
    - name: jsonPayload.message
      type: string
      description: Log message
    - name: jsonPayload.log_type
      type: string
      description: The name of the component that is issuing the cross-datacenter
        log
    - name: jsonPayload.level
      type: string
      description: Log entry severity for the couchbase log
    - name: severity
      type: string
      description: ''
  default_metrics:
  - name: workload.googleapis.com/couchbase.bucket.operation.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - bucket_name
    - op
  - name: workload.googleapis.com/couchbase.bucket.item.count
    value_type: DOUBLE
    kind: GAUGE
    labels:
    - bucket_name
    - state
  - name: workload.googleapis.com/couchbase.bucket.vbucket.count
    value_type: DOUBLE
    kind: GAUGE
    labels:
    - bucket_name
    - state
  - name: workload.googleapis.com/couchbase.bucket.memory.usage
    value_type: DOUBLE
    kind: GAUGE
    labels:
    - bucket_name
  - name: workload.googleapis.com/couchbase.bucket.item.ejection.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - bucket_name
  - name: workload.googleapis.com/couchbase.bucket.error.oom.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - bucket_name
    - error_type
  - name: workload.googleapis.com/couchbase.bucket.memory.high_water_mark.limit
    value_type: DOUBLE
    kind: GAUGE
    labels:
    - bucket_name
  - name: workload.googleapis.com/couchbase.bucket.memory.low_water_mark.limit
    value_type: DOUBLE
    kind: GAUGE
    labels:
    - bucket_name
