platforms:
- type: GCE
  launch_stage: GA
  install_documentation_url: https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/couchdb
  agent_requirement:
    logs_minimum_supported_version:
      major: 2
      minor: 11
      patch: 0
    metrics_minimum_supported_version:
      major: 2
      minor: 10
      patch: 0
  detections:
  - characteristic_log:
      log_name_regex: couchdb
  - characteristic_metric:
      metric_type: workload.googleapis.com/couchdb.database.open
  default_logs:
  - name: couchdb
    fields:
    - name: jsonPayload.node
      type: string
      description: Node instance name
    - name: jsonPayload.path
      type: string
      description: Request path
    - name: jsonPayload.remote_user
      type: string
      description: Authenticated username for the request
    - name: jsonPayload.status_message
      type: string
      description: Status code message
    - name: jsonPayload.pid
      type: string
      description: Process ID
    - name: jsonPayload.message
      type: string
      description: Log message
    - name: jsonPayload.host
      type: string
      description: Host instance name
    - name: jsonPayload.level
      type: string
      description: Log entry level
    - name: httpRequest.serverIp
      type: string
      description: The server's IP and port that was requested
    - name: httpRequest.remoteIp
      type: string
      description: IP of the client that made the request
    - name: httpRequest.requestMethod
      type: string
      description: HTTP method
    - name: httpRequest.requestSize
      type: number
      description: HTTP request size
    - name: httpRequest.status
      type: number
      description: HTTP status code
    - name: httpRequest.responseSize
      type: string
      description: ''
    - name: httpRequest.userAgent
      type: string
      description: ''
    - name: severity
      type: string
      description: ''
  default_metrics:
  - name: workload.googleapis.com/couchdb.average_request_time
    value_type: DOUBLE
    kind: GAUGE
    labels: []
  - name: workload.googleapis.com/couchdb.database.open
    value_type: INT64
    kind: GAUGE
    labels: []
  - name: workload.googleapis.com/couchdb.database.operations
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - operation
  - name: workload.googleapis.com/couchdb.file_descriptor.open
    value_type: INT64
    kind: GAUGE
    labels: []
  - name: workload.googleapis.com/couchdb.httpd.bulk_requests
    value_type: INT64
    kind: CUMULATIVE
    labels: []
  - name: workload.googleapis.com/couchdb.httpd.requests
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - http_method
  - name: workload.googleapis.com/couchdb.httpd.responses
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - http_status_code
  - name: workload.googleapis.com/couchdb.httpd.views
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - view
