platforms:
- type: GCE
  launch_stage: GA
  install_documentation_url: https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/wildfly
  agent_requirement:
    logs_minimum_supported_version:
      major: 2
      minor: 11
      patch: 0
    metrics_minimum_supported_version:
      major: 2
      minor: 12
      patch: 0
  detections:
  - characteristic_log:
      log_name_regex: wildfly
  - characteristic_metric:
      metric_type: workload.googleapis.com/wildfly.network.io
  default_logs:
  - name: wildfly_system
    fields:
    - name: jsonPayload.messageCode
      type: string
      description: Wildfly specific message code preceding the log, where applicable
    - name: jsonPayload.message
      type: string
      description: Log message
    - name: jsonPayload.thread
      type: string
      description: Thread where the log originated
    - name: jsonPayload.source
      type: string
      description: Source where the log originated
    - name: jsonPayload.level
      type: string
      description: Log entry level
    - name: severity
      type: string
      description: ''
  default_metrics:
  - name: workload.googleapis.com/wildfly.session.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - deployment
  - name: workload.googleapis.com/wildfly.session.active
    value_type: INT64
    kind: GAUGE
    labels:
    - deployment
  - name: workload.googleapis.com/wildfly.session.expired
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - deployment
  - name: workload.googleapis.com/wildfly.session.rejected
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - deployment
  - name: workload.googleapis.com/wildfly.request.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - listener
    - server
  - name: workload.googleapis.com/wildfly.request.time
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - listener
    - server
  - name: workload.googleapis.com/wildfly.request.server_error
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - listener
    - server
  - name: workload.googleapis.com/wildfly.network.io
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - listener
    - server
    - state
  - name: workload.googleapis.com/wildfly.jdbc.connection.open
    value_type: INT64
    kind: GAUGE
    labels:
    - data_source
    - state
  - name: workload.googleapis.com/wildfly.jdbc.request.wait
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - data_source
  - name: workload.googleapis.com/wildfly.jdbc.transaction.count
    value_type: INT64
    kind: CUMULATIVE
    labels: []
  - name: workload.googleapis.com/wildfly.jdbc.rollback.count
    value_type: INT64
    kind: CUMULATIVE
    labels:
    - cause
