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

feat(webserver): add Prometheus #189

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat(webserver): add Prometheus #189

wants to merge 1 commit into from

Conversation

genofire
Copy link
Member

to run yanic with promtheus, you need both parts

  • [webserver.prometheus] <- the exporter
  • [[nodes.output.prometheus-sd]] <- service discovery to write json

example prometheus config to map the exporter (like blackbox-exporter)

  - job_name: 'yanic'
    metrics_path: /metric
    file_sd_configs:
      - files:
          - '/tmp/yanic.json'
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_node_id
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: EXPORT_WEBSERVER:PORT
      - source_labels: [job]
        target_label: service

@genofire genofire changed the title Prom exporter [TASK] add Prometheus Feb 17, 2021
@genofire genofire force-pushed the prom-exporter branch 2 times, most recently from b6c9d3c to f8e451c Compare March 30, 2021 09:26
@corny corny force-pushed the main branch 7 times, most recently from 7352bd1 to ff42378 Compare March 28, 2022 02:21
@genofire genofire force-pushed the prom-exporter branch 5 times, most recently from a6d08a5 to 7f06b5f Compare April 14, 2022 06:17
@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2022

Codecov Report

Merging #189 (d7402fb) into main (7da4dc7) will decrease coverage by 1.91%.
The diff coverage is 53.49%.

❗ Current head d7402fb differs from pull request most recent head d506297. Consider uploading reports for the commit d506297 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #189      +/-   ##
==========================================
- Coverage   73.10%   71.18%   -1.92%     
==========================================
  Files          55       59       +4     
  Lines        2406     2683     +277     
==========================================
+ Hits         1759     1910     +151     
- Misses        594      717     +123     
- Partials       53       56       +3     
Impacted Files Coverage Δ
cmd/serve.go 6.00% <0.00%> (-1.15%) ⬇️
webserver/prometheus/config.go 0.00% <0.00%> (ø)
webserver/prometheus/exporter.go 0.00% <0.00%> (ø)
webserver/prometheus/transform.go 90.90% <90.90%> (ø)
webserver/prometheus/metric.go 100.00% <100.00%> (ø)
webserver/webserver.go 100.00% <100.00%> (ø)
database/all/internal.go 91.66% <0.00%> (-8.34%) ⬇️
database/all/connection.go 47.61% <0.00%> (-2.39%) ⬇️
output/meshviewer-ffrgb/meshviewer.go 84.84% <0.00%> (+4.04%) ⬆️

@genofire genofire changed the title [TASK] add Prometheus feat(exporter): add Prometheus Sep 17, 2023
@genofire genofire changed the title feat(exporter): add Prometheus feat(webserver): add Prometheus Sep 17, 2023
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

2 participants