apiVersion: v1
kind: ConfigMap
metadata:
  name: hive-jmx-config
  labels:
    app: hive
data:
  config.yml: |
    ---
    lowercaseOutputName: true
    lowercaseOutputLabelNames: true
    attrNameSnakeCase: true
    whitelistObjectNames:
      - 'metrics:name=active_calls_*'
      - 'metrics:name=api_*'
      - 'metrics:name=create_*'
      - 'metrics:name=delete_*'
      - 'metrics:name=init_*'
      - 'metrics:name=exec_*'
      - 'metrics:name=hs2_*'
      - 'metrics:name=open_connections'
      - 'metrics:name=open_operations'
    rules:
      - pattern: 'metrics<name=(.*)><>Value'
        name: hive_$1
        type: GAUGE
      - pattern: 'metrics<name=(.*)><>Count'
        name: hive_$1_count
        type: GAUGE
      - pattern: 'metrics<name=(.*)><>(\d+)thPercentile'
        name: hive_$1
        type: GAUGE
        labels:
          quantile: "0.$2"
