|
|
@@ -491,8 +491,10 @@ func (a *Accesses) AggregateCostModel(w http.ResponseWriter, r *http.Request, ps
|
|
|
}
|
|
|
|
|
|
// determine resolution by size of duration
|
|
|
- resolution := "1h"
|
|
|
- if durationHours >= 2160 {
|
|
|
+ resolution := duration
|
|
|
+ if durationHours > 1 {
|
|
|
+ resolution = "1h"
|
|
|
+ } else if durationHours >= 2160 {
|
|
|
// 90 days
|
|
|
resolution = "72h"
|
|
|
} else if durationHours >= 720 {
|
|
|
@@ -1264,7 +1266,8 @@ func init() {
|
|
|
|
|
|
_, err = ValidatePrometheus(thanosCli, true)
|
|
|
if err != nil {
|
|
|
- klog.Fatalf("Failed to query Thanos at %s. Error: %s.", thanosUrl, err.Error())
|
|
|
+ klog.V(1).Infof("Warning: Failed to query Thanos at %s. Error: %s.", thanosUrl, err.Error())
|
|
|
+ A.ThanosClient = thanosCli
|
|
|
} else {
|
|
|
klog.V(1).Info("Success: retrieved the 'up' query against Thanos at: " + thanosUrl)
|
|
|
|