platforms:
- type: GCE
  launch_stage: GA
  install_documentation_url: https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/varnish
  agent_requirement:
    logs_minimum_supported_version:
      major: 2
      minor: 16
      patch: 0
    metrics_minimum_supported_version:
      major: 2
      minor: 15
      patch: 0
  detections:
  - characteristic_log:
      log_name_regex: varnish
  - characteristic_metric:
      metric_type: workload.googleapis.com/varnish.backend.connection.count
  default_logs:
  - name: varnish
    fields:
    - name: httpRequest.remoteIp
      type: string
      description: The IP address (IPv4 or IPv6) of the client that issued the HTTP
        request
    - name: httpRequest.requestMethod
      type: string
      description: HTTP method
    - name: jsonPayload.host
      type: string
      description: Contents of the Host header
    - name: jsonPayload.user
      type: string
      description: Authenticated username for the 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.status
      type: string
      description: HTTP status code
    - name: httpRequest.responseSize
      type: string
      description: Response size
    - name: httpRequest.referer
      type: string
      description: Contents of the `Referer` header
    - name: httpRequest.userAgent
      type: string
      description: Contents of the `User-Agent` header
    - name: severity
      type: string
      description: ''
  default_metrics:
  - name: workload.googleapis.com/varnish.backend.connection.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - kind
  - name: workload.googleapis.com/varnish.backend.request.count
    value_type: INT64
    kind: CUMULATIVE
    labels: []
  - name: workload.googleapis.com/varnish.cache.operation.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - operation
  - name: workload.googleapis.com/varnish.client.request.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - state
  - name: workload.googleapis.com/varnish.client.request.error.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - status_code
  - name: workload.googleapis.com/varnish.object.count
    value_type: INT64
    kind: GAUGE
    labels: []
  - name: workload.googleapis.com/varnish.object.expired
    value_type: INT64
    kind: CUMULATIVE
    labels: []
  - name: workload.googleapis.com/varnish.object.moved
    value_type: INT64
    kind: CUMULATIVE
    labels: []
  - name: workload.googleapis.com/varnish.object.nuked
    value_type: INT64
    kind: CUMULATIVE
    labels: []
  - name: workload.googleapis.com/varnish.session.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - kind
  - name: workload.googleapis.com/varnish.thread.operation.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - operation
