Merge remote-tracking branch 'origin/master' into flake
This commit is contained in:
commit
5cac40a438
|
@ -42,23 +42,21 @@ sub prometheus : Chained('job') PathPart('prometheus') Args(0) {
|
||||||
$prometheus->new_counter(
|
$prometheus->new_counter(
|
||||||
name => "hydra_job_completion_time",
|
name => "hydra_job_completion_time",
|
||||||
help => "The most recent job's completion time",
|
help => "The most recent job's completion time",
|
||||||
labels => [ "project", "jobset", "job", "nixname" ]
|
labels => [ "project", "jobset", "job" ]
|
||||||
)->labels(
|
)->labels(
|
||||||
$c->stash->{project}->name,
|
$c->stash->{project}->name,
|
||||||
$c->stash->{jobset}->name,
|
$c->stash->{jobset}->name,
|
||||||
$c->stash->{job}->name,
|
$c->stash->{job}->name,
|
||||||
$lastBuild->nixname,
|
|
||||||
)->inc($lastBuild->stoptime);
|
)->inc($lastBuild->stoptime);
|
||||||
|
|
||||||
$prometheus->new_gauge(
|
$prometheus->new_gauge(
|
||||||
name => "hydra_job_failed",
|
name => "hydra_job_failed",
|
||||||
help => "Record if the most recent version of this job failed (1 means failed)",
|
help => "Record if the most recent version of this job failed (1 means failed)",
|
||||||
labels => [ "project", "jobset", "job", "nixname" ]
|
labels => [ "project", "jobset", "job" ]
|
||||||
)->labels(
|
)->labels(
|
||||||
$c->stash->{project}->name,
|
$c->stash->{project}->name,
|
||||||
$c->stash->{jobset}->name,
|
$c->stash->{jobset}->name,
|
||||||
$c->stash->{job}->name,
|
$c->stash->{job}->name,
|
||||||
$lastBuild->nixname,
|
|
||||||
)->inc($lastBuild->buildstatus > 0);
|
)->inc($lastBuild->buildstatus > 0);
|
||||||
|
|
||||||
$c->stash->{'plain'} = { data => $prometheus->render };
|
$c->stash->{'plain'} = { data => $prometheus->render };
|
||||||
|
|
Loading…
Reference in a new issue