All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 2908b4eb authored by Leigh B Stoller's avatar Leigh B Stoller

Change status to distinguish between unreachable (does not ping) and

the CM offline.
parent b9f54019
......@@ -542,6 +542,16 @@ sub ProcessResults($)
# Mark that we have sent email
$status{$urn}->{'status'}->{'status'} = "dead";
if ($aggregate->status() eq "up") {
if ($impotent) {
print STDERR "Would mark $nickname as offline\n";
}
else {
$aggregate->status("offline");
$aggregate->StatusEvent("offline");
}
}
}
elsif ($dailymail &&
$status{$urn}->{'status'}->{'status'} eq "dead") {
......@@ -561,6 +571,15 @@ sub ProcessResults($)
}
$status{$urn}->{'status'}->{'status'} = "up";
$status{$urn}->{'status'}->{'stamp'} = undef;
if ($aggregate->status() eq "offline") {
if ($impotent) {
print STDERR "Would mark $nickname as up\n";
}
else {
$aggregate->status("up");
$aggregate->StatusEvent("up");
}
}
}
}
}
......@@ -823,7 +842,7 @@ sub NotifySlack($)
my ($message) = @_;
return
if (0 && $debug);
if ($impotent);
if (open(PIPE, "| $CURL -s -X POST -H ".
"'Content-type: application/json' --data \@- $SLACKURL")){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment