Apache Mesos
metrics.hpp
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef __SLAVE_METRICS_HPP__
18 #define __SLAVE_METRICS_HPP__
19 
20 #include <vector>
21 
24 
25 
26 namespace mesos {
27 namespace internal {
28 namespace slave {
29 
30 class Slave;
31 
32 struct Metrics
33 {
34  explicit Metrics(const Slave& slave);
35 
36  ~Metrics();
37 
38  void setRecoveryTime(const Duration& duration);
39 
42 
45 
47 
57 
63 
66 
69 
71 
73 
74  // Non-revocable resources.
75  std::vector<process::metrics::PullGauge> resources_total;
76  std::vector<process::metrics::PullGauge> resources_used;
77  std::vector<process::metrics::PullGauge> resources_percent;
78 
79  // Revocable resources.
80  std::vector<process::metrics::PullGauge> resources_revocable_total;
81  std::vector<process::metrics::PullGauge> resources_revocable_used;
82  std::vector<process::metrics::PullGauge> resources_revocable_percent;
83 };
84 
85 } // namespace slave {
86 } // namespace internal {
87 } // namespace mesos {
88 
89 #endif // __SLAVE_METRICS_HPP__
process::metrics::Counter tasks_killed
Definition: metrics.hpp:54
process::metrics::Counter invalid_framework_messages
Definition: metrics.hpp:68
process::metrics::PullGauge tasks_running
Definition: metrics.hpp:50
process::metrics::PullGauge executors_registering
Definition: metrics.hpp:58
process::metrics::PullGauge executors_terminating
Definition: metrics.hpp:60
process::metrics::Counter tasks_lost
Definition: metrics.hpp:55
std::vector< process::metrics::PullGauge > resources_revocable_total
Definition: metrics.hpp:80
process::metrics::PullGauge tasks_staging
Definition: metrics.hpp:48
Definition: duration.hpp:32
Definition: counter.hpp:26
Definition: slave.hpp:118
Definition: pull_gauge.hpp:46
process::metrics::PullGauge executors_running
Definition: metrics.hpp:59
void setRecoveryTime(const Duration &duration)
process::metrics::Counter valid_status_updates
Definition: metrics.hpp:64
std::vector< process::metrics::PullGauge > resources_revocable_percent
Definition: metrics.hpp:82
Definition: agent.hpp:25
process::metrics::Counter container_launch_errors
Definition: metrics.hpp:72
process::metrics::Counter tasks_gone
Definition: metrics.hpp:56
std::vector< process::metrics::PullGauge > resources_percent
Definition: metrics.hpp:77
std::vector< process::metrics::PullGauge > resources_total
Definition: metrics.hpp:75
process::metrics::Counter invalid_status_updates
Definition: metrics.hpp:65
process::metrics::Counter tasks_failed
Definition: metrics.hpp:53
process::metrics::PullGauge tasks_killing
Definition: metrics.hpp:51
process::metrics::Counter recovery_errors
Definition: metrics.hpp:43
Definition: attributes.hpp:24
process::metrics::PullGauge registered
Definition: metrics.hpp:41
process::metrics::Counter tasks_finished
Definition: metrics.hpp:52
process::metrics::PullGauge frameworks_active
Definition: metrics.hpp:46
process::metrics::Counter executors_preempted
Definition: metrics.hpp:62
process::metrics::Counter executors_terminated
Definition: metrics.hpp:61
Option< process::metrics::PullGauge > recovery_time_secs
Definition: metrics.hpp:44
process::metrics::Counter valid_framework_messages
Definition: metrics.hpp:67
process::metrics::PullGauge tasks_starting
Definition: metrics.hpp:49
Definition: metrics.hpp:32
process::metrics::PullGauge executor_directory_max_allowed_age_secs
Definition: metrics.hpp:70
std::vector< process::metrics::PullGauge > resources_revocable_used
Definition: metrics.hpp:81
std::vector< process::metrics::PullGauge > resources_used
Definition: metrics.hpp:76
Metrics(const Slave &slave)
process::metrics::PullGauge uptime_secs
Definition: metrics.hpp:40