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: expose metrics through db #41

Merged

Conversation

tim-goto
Copy link
Contributor

@tim-goto tim-goto commented Dec 10, 2024

Pull Request

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Build related changes
  • Documentation content changes
  • Other: (describe here)

Proposed Change

Issue Number: N/A

Breaking Change?

  • Yes
  • No

Checklist

Please validate that your PR fulfills the following requirements:

  • I have read the CONTRIBUTING.md documentation (if available)
  • I have branched from the default repo branch (can be master, main, or release/vX.X)
  • I have checked that a similar PR does not exist or has been rejected in the past
  • PR changes are specific to a feature or bug
  • No style/format/cosmetic changes included
  • I have used existing style and naming patterns in my changes
  • Tests for the changes have been added/updated (if relevant)
  • Built/compiled and tested locally
  • Docs have been added/updated (if relevant)
  • I have squashed my changes into a single commit

Additional Information

@NorseGaud NorseGaud self-assigned this Dec 11, 2024
@NorseGaud NorseGaud self-requested a review December 11, 2024 15:34
@NorseGaud
Copy link
Member

NorseGaud commented Dec 14, 2024

Added per plugin total counts for the aggregator. New metrics:

plugin_status{name=RUNNER1,owner=veertuinc} idle
plugin_last_successful_run{name=RUNNER1,owner=veertuinc,job_url=} 0001-01-01T00:00:00Z
plugin_last_failed_run{name=RUNNER1,owner=veertuinc,job_url=} 0001-01-01T00:00:00Z
plugin_last_canceled_run{name=RUNNER1,owner=veertuinc,job_url=https://github.com/veertuinc/anklet/actions/runs/12325604197/job/34405145636} 0001-01-01T00:00:00Z
plugin_status_since{name=RUNNER1,owner=veertuinc,status=idle} 2024-12-13T19:24:47-06:00
plugin_total_ran_vms{name=RUNNER1,plugin=github,owner=veertuinc} 0
plugin_total_successful_runs_since_start{name=RUNNER1,plugin=github,owner=veertuinc} 0
plugin_total_failed_runs_since_start{name=RUNNER1,plugin=github,owner=veertuinc} 0
plugin_total_canceled_runs_since_start{name=RUNNER1,plugin=github,owner=veertuinc} 1
redis_jobs_queued{name=RUNNER1,owner=veertuinc} 0
redis_jobs_queued_cleaning{name=RUNNER1,owner=veertuinc} 0
redis_jobs_completed{name=RUNNER1,owner=veertuinc} 0
host_cpu_count{name=RUNNER1,owner=veertuinc} 12
host_cpu_used_count{name=RUNNER1,owner=veertuinc} 1
host_cpu_usage_percentage{name=RUNNER1,owner=veertuinc} 13.112463
host_memory_total_bytes{name=RUNNER1,owner=veertuinc} 38654705664
host_memory_used_bytes{name=RUNNER1,owner=veertuinc} 20108099584
host_memory_available_bytes{name=RUNNER1,owner=veertuinc} 18546606080
host_memory_usage_percentage{name=RUNNER1,owner=veertuinc} 52.019797
host_disk_total_bytes{name=RUNNER1,owner=veertuinc} 994662584320
host_disk_used_bytes{name=RUNNER1,owner=veertuinc} 783569383424
host_disk_available_bytes{name=RUNNER1,owner=veertuinc} 211093200896
host_disk_usage_percentage{name=RUNNER1,owner=veertuinc} 78.777406
plugin_status{name=RUNNER2,owner=veertuinc} idle
plugin_last_successful_run{name=RUNNER2,owner=veertuinc,job_url=} 0001-01-01T00:00:00Z
plugin_last_failed_run{name=RUNNER2,owner=veertuinc,job_url=} 0001-01-01T00:00:00Z
plugin_last_canceled_run{name=RUNNER2,owner=veertuinc,job_url=} 0001-01-01T00:00:00Z
plugin_status_since{name=RUNNER2,owner=veertuinc,status=idle} 2024-12-13T19:24:47-06:00
plugin_total_ran_vms{name=RUNNER2,plugin=github,owner=veertuinc} 0
plugin_total_successful_runs_since_start{name=RUNNER2,plugin=github,owner=veertuinc} 0
plugin_total_failed_runs_since_start{name=RUNNER2,plugin=github,owner=veertuinc} 0
plugin_total_canceled_runs_since_start{name=RUNNER2,plugin=github,owner=veertuinc} 0
redis_jobs_queued{name=RUNNER2,owner=veertuinc} 0
redis_jobs_queued_cleaning{name=RUNNER2,owner=veertuinc} 0
redis_jobs_completed{name=RUNNER2,owner=veertuinc} 0
host_cpu_count{name=RUNNER2,owner=veertuinc} 12
host_cpu_used_count{name=RUNNER2,owner=veertuinc} 1
host_cpu_usage_percentage{name=RUNNER2,owner=veertuinc} 13.112463
host_memory_total_bytes{name=RUNNER2,owner=veertuinc} 38654705664
host_memory_used_bytes{name=RUNNER2,owner=veertuinc} 20108099584
host_memory_available_bytes{name=RUNNER2,owner=veertuinc} 18546606080
host_memory_usage_percentage{name=RUNNER2,owner=veertuinc} 52.019797
host_disk_total_bytes{name=RUNNER2,owner=veertuinc} 994662584320
host_disk_used_bytes{name=RUNNER2,owner=veertuinc} 783569383424
host_disk_available_bytes{name=RUNNER2,owner=veertuinc} 211093200896
host_disk_usage_percentage{name=RUNNER2,owner=veertuinc} 78.777406
plugin_status{name=GITHUB_RECEIVER,owner=veertuinc} running
plugin_status_since{name=GITHUB_RECEIVER,owner=veertuinc,status=running} 2024-12-13T19:24:46-06:00
host_cpu_count{name=GITHUB_RECEIVER,owner=veertuinc} 12
host_cpu_used_count{name=GITHUB_RECEIVER,owner=veertuinc} 1
host_cpu_usage_percentage{name=GITHUB_RECEIVER,owner=veertuinc} 13.341087
host_memory_total_bytes{name=GITHUB_RECEIVER,owner=veertuinc} 38654705664
host_memory_used_bytes{name=GITHUB_RECEIVER,owner=veertuinc} 20102840320
host_memory_available_bytes{name=GITHUB_RECEIVER,owner=veertuinc} 18551865344
host_memory_usage_percentage{name=GITHUB_RECEIVER,owner=veertuinc} 52.006192
host_disk_total_bytes{name=GITHUB_RECEIVER,owner=veertuinc} 994662584320
host_disk_used_bytes{name=GITHUB_RECEIVER,owner=veertuinc} 783567659008
host_disk_available_bytes{name=GITHUB_RECEIVER,owner=veertuinc} 211094925312
host_disk_usage_percentage{name=GITHUB_RECEIVER,owner=veertuinc} 78.777233
redis_jobs_queued_total 0
redis_jobs_completed_total 0
total_running_vms 0
total_successful_runs_since_start 0
total_failed_runs_since_start 0
total_canceled_runs_since_start 1
plugin_status{name=RUNNER1,plugin=github,owner=veertuinc} idle
plugin_last_successful_run{name=RUNNER1,plugin=github,owner=veertuinc,job_url=} 0001-01-01T00:00:00Z
plugin_last_failed_run{name=RUNNER1,plugin=github,owner=veertuinc,job_url=} 0001-01-01T00:00:00Z
plugin_last_canceled_run{name=RUNNER1,plugin=github,owner=veertuinc,job_url=https://github.com/veertuinc/anklet/actions/runs/12325604197/job/34405145636} 0001-01-01T00:00:00Z
plugin_status_since{name=RUNNER1,plugin=github,owner=veertuinc} 2024-12-13T19:24:47-06:00
plugin_total_ran_vms{name=RUNNER1,plugin=github,owner=veertuinc} 0
plugin_total_successful_runs_since_start{name=RUNNER1,plugin=github,owner=veertuinc} 0
plugin_total_failed_runs_since_start{name=RUNNER1,plugin=github,owner=veertuinc} 0
plugin_total_canceled_runs_since_start{name=RUNNER1,plugin=github,owner=veertuinc} 1
plugin_status{name=RUNNER2,plugin=github,owner=veertuinc} idle
plugin_last_successful_run{name=RUNNER2,plugin=github,owner=veertuinc,job_url=} 0001-01-01T00:00:00Z
plugin_last_failed_run{name=RUNNER2,plugin=github,owner=veertuinc,job_url=} 0001-01-01T00:00:00Z
plugin_last_canceled_run{name=RUNNER2,plugin=github,owner=veertuinc,job_url=} 0001-01-01T00:00:00Z
plugin_status_since{name=RUNNER2,plugin=github,owner=veertuinc} 2024-12-13T19:24:47-06:00
plugin_total_ran_vms{name=RUNNER2,plugin=github,owner=veertuinc} 0
plugin_total_successful_runs_since_start{name=RUNNER2,plugin=github,owner=veertuinc} 0
plugin_total_failed_runs_since_start{name=RUNNER2,plugin=github,owner=veertuinc} 0
plugin_total_canceled_runs_since_start{name=RUNNER2,plugin=github,owner=veertuinc} 0
host_cpu_count 12
host_cpu_used_count 1
host_cpu_usage_percentage 13.112463
host_memory_total_bytes 38654705664
host_memory_used_bytes 20108099584
host_memory_available_bytes 18546606080
host_memory_usage_percentage 52.019797
host_disk_total_bytes 994662584320
host_disk_used_bytes 783569383424
host_disk_available_bytes 211093200896
host_disk_usage_percentage 78.777406

@NorseGaud NorseGaud merged commit c3200fc into veertuinc:main Dec 14, 2024
2 checks 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