Documentation ¶
Index ¶
- Constants
- func ApplyMeasurementRule(inputs interface{}, pluginName string, targetOs string, path string) (returnKey string, returnVal []string)
- func ApplyMeasurementRuleForMetricDecoration(inputs interface{}, pluginName string, targetOs string) (returnVal []interface{})
- func ApplyPluginSpecificRules(pluginName string) (map[string]interface{}, bool)
- func ContainAsterisk(input interface{}, fieldKey string) bool
- func GetExcludingTags(pluginName string) (results []string)
- func GetMeasurementName(input interface{}) (measurementNames []string)
- func GetValidMetric(targetOs string, pluginName string, metricName string) string
- func InstanceDisabled(pluginName string) bool
- func IsHighResolution(intervalVal string) bool
- func ListContains(inputs []string, desiredVal string) bool
- func ProcessLinuxCommonConfig(input interface{}, pluginName string, path string, ...) bool
- func ProcessMetricsAggregationInterval(input interface{}, defaultValue, pluginName string) (returnKey string, returnVal interface{})
- func ProcessMetricsCollectionInterval(input interface{}, defaultValue, pluginName string) (returnKey string, returnVal interface{})
- func ProcessWindowsCommonConfig(input interface{}, pluginName string, path string) (returnVal map[string]interface{})
- type MetricArray
Constants ¶
View Source
const ( Alias_Key = "alias" Measurement_Key = "measurement" Collect_Interval_Key = "metrics_collection_interval" Collect_Interval_Mapped_Key = "interval" Aggregation_Interval_Key = "metrics_aggregation_interval" Append_Dimensions_Key = "append_dimensions" Append_Dimensions_Mapped_Key = "tags" Windows_Object_Name_Key = "ObjectName" Windows_Measurement_Key = "Measurement" Windows_WarnOnMissing_Key = "WarnOnMissing" Windows_Disable_Replacer_Key = "DisableReplacer" )
View Source
const ( Default_Unix_Smi_Path = "/usr/bin/nvidia-smi" Default_Windows_Smi_Path = "C:\\Program Files\\NVIDIA Corporation\\NVSMI\\nvidia-smi.exe" )
View Source
const Asterisk_Key = "*"
View Source
const Disabled_Instance_Val_Windows = "------"
View Source
const Mapped_Instance_Key_Windows = "Instances"
View Source
const Metric_High_Resolution_Threhold = 60 * time.Second
View Source
const Resource_Key = "resources"
Variables ¶
This section is empty.
Functions ¶
func ApplyMeasurementRule ¶
func ApplyPluginSpecificRules ¶ added in v1.247350.0
ApplyPluginSpecificRules returns a map contains all the rules for tagpass, tagdrop, namepass, namedrop, fieldpass, fielddrop, taginclude, tagexclude specifically for certain plugin.
func ContainAsterisk ¶
If the input map contain instance_key, but the vale is not a string list A panic will be thrown
func GetExcludingTags ¶ added in v1.247350.0
func GetMeasurementName ¶
func GetMeasurementName(input interface{}) (measurementNames []string)
"measurement": [
{"name": "cpu_usage_idle", "rename": "CPU_USAGE_IDLE", "unit": "unit"}, {"name": "cpu_usage_nice", "unit": "unit"}, "cpu_usage_guest", "time_active", "usage_active"
]
func GetValidMetric ¶ added in v1.300026.3
func InstanceDisabled ¶
func IsHighResolution ¶
func ListContains ¶
check if desiredVal exist in inputs list
func ProcessLinuxCommonConfig ¶
func ProcessLinuxCommonConfig(input interface{}, pluginName string, path string, result map[string]interface{}) bool
ProcessLinuxCommonConfig is used by both Linux and Darwin.
func ProcessWindowsCommonConfig ¶
func ProcessWindowsCommonConfig(input interface{}, pluginName string, path string) (returnVal map[string]interface{})
Windows common config returnVal would be three parts: 1. interval: Collect_Interval_Mapped_Key 2. tags: Append_Dimensions_Mapped_Key 3. object config
Types ¶
type MetricArray ¶
type MetricArray []interface{}
func (MetricArray) Len ¶
func (mArray MetricArray) Len() int
func (MetricArray) Less ¶
func (mArray MetricArray) Less(i, j int) bool
func (MetricArray) Swap ¶
func (mArray MetricArray) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.