Skip to content

Commit

Permalink
update names
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Jun 1, 2023
1 parent cca243c commit 8788966
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/Collectors/Horizon/CurrentMasterSupervisorCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class CurrentMasterSupervisorCollector implements Collector
public function register(): void
{
Prometheus::addGauge('Number of master supervisors')
->helpText('The number of recently failed jobs')
->name('horizon_master_supervisors')
->helpText('The number of master supervisors')
->value(fn () => app(JobRepository::class)->countRecentlyFailed());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class CurrentProcessesPerQueueCollector implements Collector
public function register(): void
{
Prometheus::addGauge('Horizon Current Processes')
->name('horizon_current_processes')
->helpText('Current processes of all queues')
->label('queue')
->value(function () {
Expand Down
1 change: 1 addition & 0 deletions src/Collectors/Horizon/CurrentWorkloadCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class CurrentWorkloadCollector implements Collector
public function register(): void
{
Prometheus::addGauge('Current workload')
->name('horizon_current_workload')
->label('queue')
->helpText('Current workload of all queues')
->value(function () {
Expand Down
1 change: 1 addition & 0 deletions src/Collectors/Horizon/FailedJobsPerHourCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class FailedJobsPerHourCollector implements Collector
public function register(): void
{
Prometheus::addGauge('Failed Jobs Per Hour')
->name('horizon_failed_jobs_per_hour')
->helpText('The number of recently failed jobs')
->value(fn () => app(JobRepository::class)->countRecentlyFailed());
}
Expand Down
1 change: 1 addition & 0 deletions src/Collectors/Horizon/HorizonStatusCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class HorizonStatusCollector implements Collector
public function register(): void
{
Prometheus::addGauge('Horizon status')
->name('horizon_status')
->helpText('The status of Horizon, -1 = inactive, 0 = paused, 1 = running')
->value(function () {
if (! $masters = app(MasterSupervisorRepository::class)->all()) {
Expand Down
1 change: 1 addition & 0 deletions src/Collectors/Horizon/JobsPerMinuteCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class JobsPerMinuteCollector implements Collector
public function register(): void
{
Prometheus::addGauge('jobs per minute')
->name('horizon_jobs_per_minute')
->helpText('The number of jobs per minute')
->value(fn () => app(MetricsRepository::class)->jobsProcessedPerMinute());
}
Expand Down
1 change: 1 addition & 0 deletions src/Collectors/Horizon/RecentJobsCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class RecentJobsCollector implements Collector
public function register(): void
{
Prometheus::addGauge('Recent jobs')
->name('horizon_recent_jobs')
->helpText('The number of recent jobs')
->value(fn () => app(JobRepository::class)->countRecent());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HELP app_number_of_master_supervisors The number of recently failed jobs
# TYPE app_number_of_master_supervisors gauge
app_number_of_master_supervisors 0
# HELP app_horizon_master_supervisors The number of master supervisors
# TYPE app_horizon_master_supervisors gauge
app_horizon_master_supervisors 0
# HELP php_info Information about the PHP environment.
# TYPE php_info gauge
php_info{version="8.2.0"} 1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HELP app_failed_jobs_per_hour The number of recently failed jobs
# TYPE app_failed_jobs_per_hour gauge
app_failed_jobs_per_hour 0
# HELP app_horizon_failed_jobs_per_hour The number of recently failed jobs
# TYPE app_horizon_failed_jobs_per_hour gauge
app_horizon_failed_jobs_per_hour 0
# HELP php_info Information about the PHP environment.
# TYPE php_info gauge
php_info{version="8.2.0"} 1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HELP app_jobs_per_minute The number of jobs per minute
# TYPE app_jobs_per_minute gauge
app_jobs_per_minute 0
# HELP app_horizon_jobs_per_minute The number of jobs per minute
# TYPE app_horizon_jobs_per_minute gauge
app_horizon_jobs_per_minute 0
# HELP php_info Information about the PHP environment.
# TYPE php_info gauge
php_info{version="8.2.0"} 1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HELP app_recent_jobs The number of recent jobs
# TYPE app_recent_jobs gauge
app_recent_jobs 0
# HELP app_horizon_recent_jobs The number of recent jobs
# TYPE app_horizon_recent_jobs gauge
app_horizon_recent_jobs 0
# HELP php_info Information about the PHP environment.
# TYPE php_info gauge
php_info{version="8.2.0"} 1

0 comments on commit 8788966

Please sign in to comment.