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::Gauge> resources_total;
76  std::vector<process::metrics::Gauge> resources_used;
77  std::vector<process::metrics::Gauge> resources_percent;
78 
79  // Revocable resources.
80  std::vector<process::metrics::Gauge> resources_revocable_total;
81  std::vector<process::metrics::Gauge> resources_revocable_used;
82  std::vector<process::metrics::Gauge> 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::Gauge executors_running
Definition: metrics.hpp:59
process::metrics::Counter invalid_framework_messages
Definition: metrics.hpp:68
process::metrics::Counter tasks_lost
Definition: metrics.hpp:55
std::vector< process::metrics::Gauge > resources_used
Definition: metrics.hpp:76
process::metrics::Gauge tasks_killing
Definition: metrics.hpp:51
std::vector< process::metrics::Gauge > resources_percent
Definition: metrics.hpp:77
process::metrics::Gauge executors_terminating
Definition: metrics.hpp:60
process::metrics::Gauge executor_directory_max_allowed_age_secs
Definition: metrics.hpp:70
process::metrics::Gauge tasks_running
Definition: metrics.hpp:50
Definition: duration.hpp:32
Definition: counter.hpp:26
process::metrics::Gauge executors_registering
Definition: metrics.hpp:58
process::metrics::Gauge tasks_starting
Definition: metrics.hpp:49
std::vector< process::metrics::Gauge > resources_revocable_percent
Definition: metrics.hpp:82
Definition: gauge.hpp:27
Definition: slave.hpp:116
process::metrics::Gauge frameworks_active
Definition: metrics.hpp:46
void setRecoveryTime(const Duration &duration)
process::metrics::Counter valid_status_updates
Definition: metrics.hpp:64
Definition: spec.hpp:30
process::metrics::Counter container_launch_errors
Definition: metrics.hpp:72
process::metrics::Counter tasks_gone
Definition: metrics.hpp:56
process::metrics::Counter invalid_status_updates
Definition: metrics.hpp:65
process::metrics::Counter tasks_failed
Definition: metrics.hpp:53
process::metrics::Counter recovery_errors
Definition: metrics.hpp:43
Option< process::metrics::Gauge > recovery_time_secs
Definition: metrics.hpp:44
std::vector< process::metrics::Gauge > resources_revocable_used
Definition: metrics.hpp:81
Definition: attributes.hpp:24
process::metrics::Counter tasks_finished
Definition: metrics.hpp:52
process::metrics::Counter executors_preempted
Definition: metrics.hpp:62
process::metrics::Counter executors_terminated
Definition: metrics.hpp:61
process::metrics::Counter valid_framework_messages
Definition: metrics.hpp:67
process::metrics::Gauge registered
Definition: metrics.hpp:41
Definition: metrics.hpp:32
process::metrics::Gauge uptime_secs
Definition: metrics.hpp:40
std::vector< process::metrics::Gauge > resources_revocable_total
Definition: metrics.hpp:80
std::vector< process::metrics::Gauge > resources_total
Definition: metrics.hpp:75
process::metrics::Gauge tasks_staging
Definition: metrics.hpp:48
Metrics(const Slave &slave)