blob: 2378a05566354d90ddc36965cbb9989d04e3f0a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <sys/time.h>
#include <vespa/vespalib/metrics/simple_metrics.h>
namespace config::sentinel {
using vespalib::metrics::Counter;
using vespalib::metrics::Gauge;
using vespalib::metrics::MetricsManager;
struct StartMetrics {
std::shared_ptr<MetricsManager> metrics;
vespalib::metrics::Producer producer;
unsigned long currentlyRunningServices;
unsigned long totalRestartsCounter;
unsigned long totalRestartsLastPeriod;
long startedTime;
long lastLoggedTime;
Counter sentinel_restarts;
Gauge sentinel_totalRestarts;
Gauge sentinel_running;
Gauge sentinel_uptime;
StartMetrics();
~StartMetrics() {}
void output();
void reset(unsigned long curTime);
void maybeLog();
};
}
|