forked from lix-project/hydra
hydra-notify: print out log lines indicating it is or is not launching the exporter
This commit is contained in:
parent
5c1228e141
commit
de2282bcf4
|
@ -67,6 +67,7 @@ $prom->declare(
|
||||||
|
|
||||||
my $promCfg = Hydra::Helper::Nix::getHydraNotifyPrometheusConfig($config);
|
my $promCfg = Hydra::Helper::Nix::getHydraNotifyPrometheusConfig($config);
|
||||||
if (defined($promCfg)) {
|
if (defined($promCfg)) {
|
||||||
|
print STDERR "Starting the Prometheus exporter, listening on http://${\$promCfg->{'listen_address'}}:${\$promCfg->{'port'}}/metrics.\n";
|
||||||
my $fork_manager = Parallel::ForkManager->new(1);
|
my $fork_manager = Parallel::ForkManager->new(1);
|
||||||
$fork_manager->start_child("metrics_exporter", sub {
|
$fork_manager->start_child("metrics_exporter", sub {
|
||||||
my $server = HTTP::Server::PSGI->new(
|
my $server = HTTP::Server::PSGI->new(
|
||||||
|
@ -77,6 +78,8 @@ if (defined($promCfg)) {
|
||||||
|
|
||||||
$server->run($prom->psgi);
|
$server->run($prom->psgi);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
print STDERR "Not starting the hydra-notify Prometheus exporter.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
my $queued_only;
|
my $queued_only;
|
||||||
|
|
Loading…
Reference in a new issue