| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- // Copyright 2019 Yunion
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- package measurements
- import "yunion.io/x/onecloud/pkg/apis/monitor"
- var internalMemstats = SMeasurement{
- Context: []SMonitorContext{
- {
- Name: "internal_memstats",
- DisplayName: "Memory usage statistics of telegraf agent",
- ResourceType: monitor.METRIC_RES_TYPE_HOST,
- Database: monitor.METRIC_DATABASE_TELE,
- },
- },
- Metrics: []SMetric{
- {
- Name: "alloc_bytes",
- DisplayName: "alloc_bytes",
- Unit: monitor.METRIC_UNIT_COUNT,
- },
- {
- Name: "frees",
- },
- {
- Name: "heap_alloc_bytes",
- },
- {
- Name: "heap_idle_bytes",
- },
- {
- Name: "heap_in_use_bytes",
- },
- {
- Name: "heap_objects_bytes",
- },
- {
- Name: "heap_released_bytes",
- },
- {
- Name: "heap_sys_bytes",
- },
- {
- Name: "mallocs",
- },
- {
- Name: "num_gc",
- },
- {
- Name: "pointer_lookups",
- },
- {
- Name: "sys_bytes",
- },
- {
- Name: "total_alloc_bytes",
- },
- },
- }
- var internalAgent = SMeasurement{
- Context: []SMonitorContext{
- {
- Name: "internal_agent",
- DisplayName: "Agent wide statistics of telegraf agent",
- ResourceType: monitor.METRIC_RES_TYPE_HOST,
- Database: monitor.METRIC_DATABASE_TELE,
- },
- },
- Metrics: []SMetric{
- {
- Name: "gather_errors",
- },
- {
- Name: "metrics_dropped",
- },
- {
- Name: "metrics_gathered",
- },
- {
- Name: "metrics_written",
- },
- },
- }
- var internalGather = SMeasurement{
- Context: []SMonitorContext{
- {
- Name: "internal_gather",
- DisplayName: "Gather statistics of telegraf agent",
- ResourceType: monitor.METRIC_RES_TYPE_HOST,
- Database: monitor.METRIC_DATABASE_TELE,
- },
- },
- Metrics: []SMetric{
- {
- Name: "gather_time_ns",
- },
- {
- Name: "metrics_gathered",
- },
- },
- }
- var internalWrite = SMeasurement{
- Context: []SMonitorContext{
- {
- Name: "internal_write",
- DisplayName: "Write statistics of telegraf agent",
- ResourceType: monitor.METRIC_RES_TYPE_HOST,
- Database: monitor.METRIC_DATABASE_TELE,
- },
- },
- Metrics: []SMetric{
- {
- Name: "buffer_limit",
- },
- {
- Name: "buffer_size",
- },
- {
- Name: "metrics_added",
- },
- {
- Name: "metrics_written",
- },
- {
- Name: "metrics_dropped",
- },
- {
- Name: "metrics_filtered",
- },
- {
- Name: "write_time_ns",
- },
- },
- }
|