Decringe
This commit is contained in:
@@ -177,13 +177,13 @@ func (o *Orchestrator) checkExpiryTimers(warningDuration, criticalDuration time.
|
|||||||
if timeUntilExpiry <= criticalDuration {
|
if timeUntilExpiry <= criticalDuration {
|
||||||
// Critical: extractor expired or about to expire
|
// Critical: extractor expired or about to expire
|
||||||
characterName, planetName := o.parseExpiryKey(key)
|
characterName, planetName := o.parseExpiryKey(key)
|
||||||
message := fmt.Sprintf("🚨 CRITICAL: Extractor expired on %s! (expired: %s)",
|
message := fmt.Sprintf("CRITICAL: Extractor expired on %s (expired: %s)",
|
||||||
planetName, expiryTime.Format("2006-01-02 15:04:05"))
|
planetName, expiryTime.Format("2006-01-02 15:04:05"))
|
||||||
o.sendWebhook(characterName, message)
|
o.sendWebhook(characterName, message)
|
||||||
} else if timeUntilExpiry <= warningDuration {
|
} else if timeUntilExpiry <= warningDuration {
|
||||||
// Warning: extractor expiring soon
|
// Warning: extractor expiring soon
|
||||||
characterName, planetName := o.parseExpiryKey(key)
|
characterName, planetName := o.parseExpiryKey(key)
|
||||||
message := fmt.Sprintf("⏰ WARNING: Extractor expiring soon on %s! (expires: %s)",
|
message := fmt.Sprintf("WARNING: Extractor expiring soon on %s (expires: %s)",
|
||||||
planetName, expiryTime.Format("2006-01-02 15:04:05"))
|
planetName, expiryTime.Format("2006-01-02 15:04:05"))
|
||||||
o.sendWebhook(characterName, message)
|
o.sendWebhook(characterName, message)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ func FormatStorageAlert(storage StorageInfo, isCritical bool) string {
|
|||||||
severity = "CRITICAL"
|
severity = "CRITICAL"
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf("🚨 %s: %s almost full on %s! (%.1f%% utilized)",
|
return fmt.Sprintf("%s: %s almost full on %s (%.1f%% utilized)",
|
||||||
severity, storage.StorageType, storage.PlanetName, storage.Utilization)
|
severity, storage.StorageType, storage.PlanetName, storage.Utilization)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,6 +208,6 @@ func FormatExtractorAlert(extractor ExtractorInfo, isCritical bool) string {
|
|||||||
status = "expired"
|
status = "expired"
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf("⏰ %s: Extractor #%d %s on %s! (expires: %s)",
|
return fmt.Sprintf("%s: Extractor #%d %s on %s (expires: %s)",
|
||||||
severity, extractor.ExtractorNumber, status, extractor.PlanetName, extractor.ExpiryDate)
|
severity, extractor.ExtractorNumber, status, extractor.PlanetName, extractor.ExpiryDate)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user