Coverage for osm_mon/collector/vnf_collectors/vrops/metrics.py: 100%

1 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-05-06 19:04 +0000

1# -*- coding: utf-8 -*- 

2 

3# # 

4# Copyright 2016-2019 VMware Inc. 

5# This file is part of ETSI OSM 

6# All Rights Reserved. 

7# 

8# Licensed under the Apache License, Version 2.0 (the "License"); you may 

9# not use this file except in compliance with the License. You may obtain 

10# a copy of the License at 

11# 

12# http://www.apache.org/licenses/LICENSE-2.0 

13# 

14# Unless required by applicable law or agreed to in writing, software 

15# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 

16# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 

17# License for the specific language governing permissions and limitations 

18# under the License. 

19# 

20# For those usages not covered by the Apache License, Version 2.0 please 

21# contact: osslegalrouting@vmware.com 

22# # 

23 

24# Ref: https://docs.vmware.com/en/vRealize-Operations-Manager/7.0/vrealize-operations-manager-70-reference-guide.pdf 

25# Potential metrics of interest 

26# "cpu|capacity_contentionPct" 

27# "cpu|corecount_provisioned" 

28# "cpu|costopPct" 

29# "cpu|demandmhz" 

30# "cpu|demandPct" 

31# "cpu|effective_limit" 

32# "cpu|iowaitPct" 

33# "cpu|readyPct" 

34# "cpu|swapwaitPct" 

35# "cpu|usage_average" 

36# "cpu|usagemhz_average" 

37# "cpu|usagemhz_average_mtd" 

38# "cpu|vm_capacity_provisioned" 

39# "cpu|workload" 

40# "guestfilesystem|percentage_total" 

41# "guestfilesystem|usage_total" 

42# "mem|consumedPct" 

43# "mem|guest_usage" 

44# "mem|host_contentionPct" 

45# "mem|reservation_used" 

46# "mem|swapinRate_average" 

47# "mem|swapoutRate_average" 

48# "mem|swapped_average" 

49# "mem|usage_average" 

50# "net:Aggregate of all instances|droppedPct" 

51# "net|broadcastTx_summation" 

52# "net|droppedTx_summation" 

53# "net|multicastTx_summation" 

54# "net|pnicBytesRx_average" 

55# "net|pnicBytesTx_average" 

56# "net|received_average" 

57# "net|transmitted_average" 

58# "net|usage_average" 

59# "virtualDisk:Aggregate of all instances|commandsAveraged_average" 

60# "virtualDisk:Aggregate of all instances|numberReadAveraged_average" 

61# "virtualDisk:Aggregate of all instances|numberWriteAveraged_average" 

62# "virtualDisk:Aggregate of all instances|totalLatency" 

63# "virtualDisk:Aggregate of all instances|totalReadLatency_average" 

64# "virtualDisk:Aggregate of all instances|totalWriteLatency_average" 

65# "virtualDisk:Aggregate of all instances|usage" 

66# "virtualDisk:Aggregate of all instances|vDiskOIO" 

67# "virtualDisk|read_average" 

68# "virtualDisk|write_average" 

69 

70METRIC_MAPPINGS = { 

71 # Percent guest operating system active memory. 

72 "average_memory_utilization": "mem|usage_average", 

73 # Percentage of CPU that was used out of all the CPU that was allocated. 

74 "cpu_utilization": "cpu|usage_average", 

75 # KB/s of data read in the performance interval 

76 "disk_read_bytes": "virtualDisk|read_average", 

77 # Average of read commands per second during the collection interval. 

78 "disk_read_ops": "virtualDisk:aggregate of all instances|numberReadAveraged_average", 

79 # KB/s of data written in the performance interval. 

80 "disk_write_bytes": "virtualDisk|write_average", 

81 # Average of write commands per second during the collection interval. 

82 "disk_write_ops": "virtualDisk:aggregate of all instances|numberWriteAveraged_average", 

83 # Not supported by vROPS, will always return 0. 

84 "packets_in_dropped": "net|droppedRx_summation", 

85 # Transmitted packets dropped in the collection interval. 

86 "packets_out_dropped": "net|droppedTx_summation", 

87 # Bytes received in the performance interval. 

88 "packets_received": "net|received_average", 

89 # Packets transmitted in the performance interval. 

90 "packets_sent": "net|transmitted_average", 

91}