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

Add Prometheus exporter #22

Merged
merged 3 commits into from
Apr 8, 2024
Merged

Add Prometheus exporter #22

merged 3 commits into from
Apr 8, 2024

Conversation

nlewo
Copy link
Owner

@nlewo nlewo commented Mar 29, 2024

It listen on 4243 and exported metrics looks like:

curl localhost:4243/metrics
# HELP comin_deployement_info Info of the last deployement.
# TYPE comin_deployement_info gauge
comin_deployement_info{commit_id="04f98665dd81f176bb3db48b47633a876909149b",status="done"} 1
# HELP comin_fetch_count Number of fetches per status
# TYPE comin_fetch_count counter
comin_fetch_count{remote_name="local",status="succeeded"} 809
comin_fetch_count{remote_name="origin",status="succeeded"} 29

@zowoq
Copy link
Contributor

zowoq commented Mar 30, 2024

Thank you for implementing this. We don't need to change any of the exporter settings so we see an error with our config?

error: The option `services.comin.exporter' is used but not defined.
  services.comin = {
    enable = true;
    remotes = [
      {
        url = "https://github.com/nix-community/infra.git";
        name = "origin";
        poller.period = 300; # every 5 minutes
        branches.main.name = "master";
        branches.testing.name = ""; # disable testing branch
      }
    ];
  };

@nlewo nlewo force-pushed the prometheus branch 2 times, most recently from 5be8149 to a9a5fb1 Compare March 30, 2024 16:43
@zowoq
Copy link
Contributor

zowoq commented Mar 30, 2024

I've checked that the exporter works, thank you!

@nlewo nlewo merged commit 147eef7 into main Apr 8, 2024
1 check passed
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.

2 participants