| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- // 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 serviceHttpCode = SMeasurement{
- Context: []SMonitorContext{
- {
- "http_request", "HTTP Request hit",
- monitor.METRIC_RES_TYPE_SYSTEM, monitor.METRIC_DATABASE_SYSTEM,
- },
- },
- Metrics: []SMetric{
- {
- Name: "duration_ms_any",
- DisplayName: "Accumulated request duration in milliseconds",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "dura_ms_delta_any",
- DisplayName: "Accumulated request duration in milliseconds in last interval",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "hit_any",
- DisplayName: "Accumulated request count",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- {
- Name: "hit_delta_any",
- DisplayName: "Accumulated request count in last interval",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- {
- Name: "delay_ms_any",
- DisplayName: "Average request delay in miilliseconds",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "qps_any",
- DisplayName: "Averatge request per second",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- {
- Name: "duration_ms_2xx",
- DisplayName: "Accumulated request duration in milliseconds for 2xx http code",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "dura_ms_delta_2xx",
- DisplayName: "Accumulated request duration in milliseconds in last interval for 2xx http code",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "hit_2xx",
- DisplayName: "Accumulated request count for 2xx http code",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- {
- Name: "hit_delta_2xx",
- DisplayName: "Accumulated request count in last interval for 2xx http code",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- {
- Name: "delay_ms_2xx",
- DisplayName: "Average request delay in miilliseconds for 2xx http code",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "percent_hit_2xx",
- DisplayName: "Request hit weight in percentage for 2xx http code",
- Unit: monitor.METRIC_UNIT_PERCENT,
- },
- {
- Name: "percent_duration_2xx",
- DisplayName: "Request duration weight in percentage for 2xx http code",
- Unit: monitor.METRIC_UNIT_PERCENT,
- },
- {
- Name: "qps_2xx",
- DisplayName: "Averatge request per second for 2xx http code",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- {
- Name: "duration_ms_4xx",
- DisplayName: "Accumulated request duration in milliseconds for 4xx http code",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "dura_ms_delta_4xx",
- DisplayName: "Accumulated request duration in milliseconds in last interval for 4xx http code",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "hit_4xx",
- DisplayName: "Accumulated request count for 4xx http code",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- {
- Name: "hit_delta_4xx",
- DisplayName: "Accumulated request count in last interval for 4xx http code",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- {
- Name: "delay_ms_4xx",
- DisplayName: "Average request delay in miilliseconds for 4xx http code",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "percent_hit_4xx",
- DisplayName: "Request hit weight in percentage for 4xx http code",
- Unit: monitor.METRIC_UNIT_PERCENT,
- },
- {
- Name: "percent_duration_4xx",
- DisplayName: "Request duration weight in percentage for 4xx http code",
- Unit: monitor.METRIC_UNIT_PERCENT,
- },
- {
- Name: "qps_4xx",
- DisplayName: "Averatge request per second for 4xx http code",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- {
- Name: "duration_ms_5xx",
- DisplayName: "Accumulated request duration in milliseconds for 5xx http code",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "dura_ms_delta_5xx",
- DisplayName: "Accumulated request duration in milliseconds in last interval for 5xx http code",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "hit_5xx",
- DisplayName: "Accumulated request count for 5xx http code",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- {
- Name: "hit_delta_5xx",
- DisplayName: "Accumulated request count in last interval for 5xx http code",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- {
- Name: "delay_ms_5xx",
- DisplayName: "Average request delay in miilliseconds for 5xx http code",
- Unit: monitor.METRIC_UNIT_MS,
- },
- {
- Name: "percent_hit_5xx",
- DisplayName: "Request hit weight in percentage for 5xx http code",
- Unit: monitor.METRIC_UNIT_PERCENT,
- },
- {
- Name: "percent_duration_5xx",
- DisplayName: "Request duration weight in percentage for 5xx http code",
- Unit: monitor.METRIC_UNIT_PERCENT,
- },
- {
- Name: "qps_5xx",
- DisplayName: "Averatge request per second for 5xx http code",
- Unit: monitor.METRIC_UNIT_NULL,
- },
- },
- }
|