<commit_before>metricbeat.modules:

- module: system
  metricsets:
    - cpu
    - load
    - core
    - diskio
    - filesystem
    - fsstat
    - memory
    - network
    - process
    - process_summary
    - socket
  enabled: true
  period: 10s
  processes: ['.*']
  cgroups: true
  process.include_top_n:
    enabled: true
    by_cpu: 20
    by_memory: 20

- module: nginx
  metricsets: ["stubstatus"]
  enabled: true
  period: 10s
  hosts: ["{{ inventory_hostname }}"]

- module: mysql
  metricsets: ["status"]
  hosts: ["tcp(localhost:3306)/"]
  username: "{{ mysql_user }}"
  password: "{{ <PASSWORD> }}"

- module: http
  metricsets: ["json"]
  period: 10s
  hosts: ["{{ backend_server }}"]
  namespace: health
  path: /health
  method: GET
  fields:
    service: backend

{% for metric in ('http.server.requests', 'process.files.max', 'jvm.gc.memory.promoted', 'tomcat.cache.hit',
                  'jvm.memory.committed', 'system.load.average.1m', 'tomcat.cache.access', 'jvm.memory.used',
                  'jvm.gc.max.data.size', 'system.cpu.count', 'logback.events', 'tomcat.global.sent',
                  'jvm.buffer.memory.used', 'tomcat.sessions.created', 'jvm.memory.max', 'jvm.threads.daemon',
                  'system.cpu.usage', 'jvm.gc.memory.allocated', 'tomcat.global.request.max',
                  'tomcat.global.request', 'tomcat.sessions.expired', 'jvm.threads.live', 'jvm.threads.peak',
                  'tomcat.global.received', 'process.uptime', 'tomcat.sessions.rejected', 'process.cpu.usage',
                  'jvm.gc.pause', 'tomcat.threads.config.max', 'jvm.classes.loaded', 'jvm.classes.unloaded',
                  'tomcat.global.error', 'tomcat.sessions.active.current', 'tomcat.sessions.alive.max',
                  'jvm.gc.live.data.size', 'tomcat.servlet.request.max', 'tomcat.threads.current',
                  'tomcat.servlet.request', 'process.files.open', 'jvm.buffer.count', 'jvm.buffer.total.capacity',
                  'tomcat.sessions.active.max', 'tomcat.threads.busy', 'process.start.time', 'tomcat.servlet.error') %}
- module: http
  metricsets: ["json"]
  period: 10s
  hosts: ["{{ backend_server }}"]
  namespace: metrics
  path: "/metrics/{{ metric }}"
  method: GET
  dedot.enabled: true
  fields:
    service: backend
{% endfor %}

- module: http
  metricsets: ["json"]
  period: 10s
  hosts: ["{{ frontend_server }}"]
  namespace: health
  path: /health
  method: GET
  fields:
    service: backend

{% for metric in ('http.server.requests', 'process.files.max', 'jvm.gc.memory.promoted', 'tomcat.cache.hit',
                  'jvm.memory.committed', 'system.load.average.1m', 'tomcat.cache.access', 'jvm.memory.used',
                  'jvm.gc.max.data.size', 'system.cpu.count', 'logback.events', 'tomcat.global.sent',
                  'jvm.buffer.memory.used', 'tomcat.sessions.created', 'jvm.memory.max', 'jvm.threads.daemon',
                  'system.cpu.usage', 'jvm.gc.memory.allocated', 'tomcat.global.request.max',
                  'tomcat.global.request', 'tomcat.sessions.expired', 'jvm.threads.live', 'jvm.threads.peak',
                  'tomcat.global.received', 'process.uptime', 'tomcat.sessions.rejected', 'process.cpu.usage',
                  'jvm.gc.pause', 'tomcat.threads.config.max', 'jvm.classes.loaded', 'jvm.classes.unloaded',
                  'tomcat.global.error', 'tomcat.sessions.active.current', 'tomcat.sessions.alive.max',
                  'jvm.gc.live.data.size', 'tomcat.servlet.request.max', 'tomcat.threads.current',
                  'tomcat.servlet.request', 'process.files.open', 'jvm.buffer.count', 'jvm.buffer.total.capacity',
                  'tomcat.sessions.active.max', 'tomcat.threads.busy', 'process.start.time', 'tomcat.servlet.error') %}
- module: http
  metricsets: ["json"]<commit_msg>MINOR fixed a server label<commit_after>metricbeat.modules:

- module: system
  metricsets:
    - cpu
    - load
    - core
    - diskio
    - filesystem
    - fsstat
    - memory
    - network
    - process
    - process_summary
    - socket
  enabled: true
  period: 10s
  processes: ['.*']
  cgroups: true
  process.include_top_n:
    enabled: true
    by_cpu: 20
    by_memory: 20

- module: nginx
  metricsets: ["stubstatus"]
  enabled: true
  period: 10s
  hosts: ["{{ inventory_hostname }}"]

- module: mysql
  metricsets: ["status"]
  hosts: ["tcp(localhost:3306)/"]
  username: "{{ mysql_user }}"
  password: "{{ <PASSWORD> }}"

- module: http
  metricsets: ["json"]
  period: 10s
  hosts: ["{{ backend_server }}"]
  namespace: health
  path: /health
  method: GET
  fields:
    service: backend

{% for metric in ('http.server.requests', 'process.files.max', 'jvm.gc.memory.promoted', 'tomcat.cache.hit',
                  'jvm.memory.committed', 'system.load.average.1m', 'tomcat.cache.access', 'jvm.memory.used',
                  'jvm.gc.max.data.size', 'system.cpu.count', 'logback.events', 'tomcat.global.sent',
                  'jvm.buffer.memory.used', 'tomcat.sessions.created', 'jvm.memory.max', 'jvm.threads.daemon',
                  'system.cpu.usage', 'jvm.gc.memory.allocated', 'tomcat.global.request.max',
                  'tomcat.global.request', 'tomcat.sessions.expired', 'jvm.threads.live', 'jvm.threads.peak',
                  'tomcat.global.received', 'process.uptime', 'tomcat.sessions.rejected', 'process.cpu.usage',
                  'jvm.gc.pause', 'tomcat.threads.config.max', 'jvm.classes.loaded', 'jvm.classes.unloaded',
                  'tomcat.global.error', 'tomcat.sessions.active.current', 'tomcat.sessions.alive.max',
                  'jvm.gc.live.data.size', 'tomcat.servlet.request.max', 'tomcat.threads.current',
                  'tomcat.servlet.request', 'process.files.open', 'jvm.buffer.count', 'jvm.buffer.total.capacity',
                  'tomcat.sessions.active.max', 'tomcat.threads.busy', 'process.start.time', 'tomcat.servlet.error') %}
- module: http
  metricsets: ["json"]
  period: 10s
  hosts: ["{{ backend_server }}"]
  namespace: metrics
  path: "/metrics/{{ metric }}"
  method: GET
  dedot.enabled: true
  fields:
    service: backend
{% endfor %}

- module: http
  metricsets: ["json"]
  period: 10s
  hosts: ["{{ frontend_server }}"]
  namespace: health
  path: /health
  method: GET
  fields:
    service: frontend

{% for metric in ('http.server.requests', 'process.files.max', 'jvm.gc.memory.promoted', 'tomcat.cache.hit',
                  'jvm.memory.committed', 'system.load.average.1m', 'tomcat.cache.access', 'jvm.memory.used',
                  'jvm.gc.max.data.size', 'system.cpu.count', 'logback.events', 'tomcat.global.sent',
                  'jvm.buffer.memory.used', 'tomcat.sessions.created', 'jvm.memory.max', 'jvm.threads.daemon',
                  'system.cpu.usage', 'jvm.gc.memory.allocated', 'tomcat.global.request.max',
                  'tomcat.global.request', 'tomcat.sessions.expired', 'jvm.threads.live', 'jvm.threads.peak',
                  'tomcat.global.received', 'process.uptime', 'tomcat.sessions.rejected', 'process.cpu.usage',
                  'jvm.gc.pause', 'tomcat.threads.config.max', 'jvm.classes.loaded', 'jvm.classes.unloaded',
                  'tomcat.global.error', 'tomcat.sessions.active.current', 'tomcat.sessions.alive.max',
                  'jvm.gc.live.data.size', 'tomcat.servlet.request.max', 'tomcat.threads.current',
                  'tomcat.servlet.request', 'process.files.open', 'jvm.buffer.count', 'jvm.buffer.total.capacity',
                  'tomcat.sessions.active.max', 'tomcat.threads.busy', 'process.start.time', 'tomcat.servlet.error') %}
- module: http
  metricsets: ["json"]
{'fraction_non_alphanumeric': 0.17278447823807028, 'fraction_numerical': 0.005243838489774515, 'mean_word_length': 2.7342143906020557, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1537131', 'n_tokens_mistral': 2627, 'n_tokens_neox': 2528, 'n_words': 411}