Patterns in Prometheus JMX exporter

  • В выводе настроенного по умолчанию jmx_exporter можно увидеть строки вида:
# HELP trino_execution_resourcegroups_InternalResourceGroup_MaxQueuedQueries  trino.execution.resourcegroups:name=admin,type=InternalResourceGroup,attribute=MaxQueuedQueries
# TYPE trino_execution_resourcegroups_InternalResourceGroup_MaxQueuedQueries untyped
  • Вот эта trino.execution.resourcegroups:name=admin,type=InternalResourceGroup,attribute=MaxQueuedQueries часть должна быть настроена в конфигах pattern примерно вот так:
  - pattern: 'trino.execution.resourcegroups<type=InternalResourceGroup, name=global\.adhoc><>(\w+): (\d+)'
    name: trino_resourcegroups_adhoc
    labels:
      name: "root_group"
      type: $1
    value: $2
  - pattern: 'trino.execution.resourcegroups<type=InternalResourceGroup, name=global\.adhoc\.(\w+)><>(\w+): (\d+)'
    name: trino_resourcegroups_adhoc
    labels:
      name: $1
      type: $2
    value: $3
  - pattern: 'trino.execution.resourcegroups<type=InternalResourceGroup, name=global\.bi><>(\w+): (\d+)'
    name: trino_resourcegroups_bi
    labels:
      name: "root_group"
      type: $1
    value: $2
  - pattern: 'trino.execution.resourcegroups<type=InternalResourceGroup, name=global\.bi\.(\w+)><>(\w+): (\d+)'
    name: trino_resourcegroups_bi
    labels:
      name: $1
      type: $2
    value: $3
  - pattern: ".*"