[SOLVED] OpenTelemetry server

Skibbi

New Member
Jul 29, 2024
12
1
3
Hi,
I have 2 proxmox environments: one stand-alone server and one 3-node cluster. Both environments started with proxmox 8 and I upgraded both to version 9 recently. When I was looking around Metric Server on both environments I found out that on standalone server I can add OpenTelementry but I don't see this option on the clustered proxmox. Also I don't see any mention in the documentation about OpenTelementry server - so why I have this option on the standalone server? Are there any documentation on this feature?
 
I can add OpenTelementry but I don't see this option on the clustered proxmox.

Look at: Datacenter --> Metric Server --> Add (Button Drop/Down) --> Open Telemetry.

Disclaimer: haven't used it yet...
 
Look at: Datacenter --> Metric Server --> Add (Button Drop/Down) --> Open Telemetry.

Disclaimer: haven't used it yet...
OK, I think my browser cache was outdated. After refreshing the proxmox webui it is available for selection.
Then it's time to spin up otel collector and test the monitoring.
 
  • Like
Reactions: UdoB
I figured out how to setup my Ansible, hopefully it helps the next person.


YAML:
- name: List existing metric servers
  tags: [otel]
  check_mode: false
  ansible.builtin.command:
    cmd: pvesh get /cluster/metrics/server --output-format json
  register: metric_servers_raw
  changed_when: false

- name: Check if OTEL metric server exists
  tags: [otel]
  ansible.builtin.set_fact:
    otel_metric_server_exists: >-
      {{ (metric_servers_raw.stdout | default('[]') | from_json) | selectattr('id', 'equalto', 'k3s-otelc') | list | length > 0 }}

- name: Create OTEL metric server
  tags: [otel]
  when: not otel_metric_server_exists
  ansible.builtin.command:
    cmd: >-
      pvesh create /cluster/metrics/server/k3s-otelc
      --type opentelemetry
      --server <URL>
      --port 443
      --otel-protocol https
      --otel-path /v1/metrics
      --otel-verify-ssl 1
      --otel-timeout 5
      --otel-compression gzip
      --otel-max-body-size 10000000
 
Last edited:
  • Like
Reactions: Johannes S