Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Otel metric #29

Merged
merged 19 commits into from
Dec 18, 2023
Merged

Otel metric #29

merged 19 commits into from
Dec 18, 2023

Conversation

fujiwara
Copy link
Owner

@fujiwara fujiwara commented Sep 1, 2023

OpenTelemetry metrics endpoint support

destination.otel.enabled: true in configuration enables to post metrics to OpenTelemetry metrics endpoint.

destination:
  mackerel:
    enabled: false # disable mackerel host/service metrics
  otel:
    enabled: true
    endpoint: localhost:4317
    insecure: true

Extra attributes can be added to metrics by attributes in probe configuration.

By default, maprobe adds service.name and host.id attributes to metrics.

probes:
  - service: production
    role: redis
    command:
      command:
        - "mackerel-plugin-redis"
        - "-host={{ .Host.IPAddress.eth0 }}"
        - "-tempfile=/tmp/redis-{{ .Host.ID }}"
    attributes: # extra attributes
      - service.namespace: redis
      - host.name: "{{ .Host.Name }}"

@fujiwara fujiwara marked this pull request as ready for review September 19, 2023 07:56
@fujiwara fujiwara merged commit 9b1f795 into main Dec 18, 2023
2 checks passed
@fujiwara fujiwara deleted the otel-metric branch December 18, 2023 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant