diff options
author | Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> | 2017-10-18 16:18:07 +0100 |
---|---|---|
committer | Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> | 2017-10-18 16:18:07 +0100 |
commit | 4ae8eca14448bac6be46fbbf22d2ddc5d8ae7028 (patch) | |
tree | cdb4653090a8ca34caed19f232b52697e6cb19e5 /3rd_party/collectd-ves-app/ves_app/host.yaml | |
parent | 787c0f30f5027ac3d072f0c5e53f970d8273e3ac (diff) |
VES: add new tag to strip extra dashes
The `!StripExtraDash` tag can be used in YAML configuration
file to strip extra dashes in the YAML filed value. This may
happen if some of the collectd plugin field (plugin_instance,
type_instace etc.) is set to empty value but the field is
specified in the YAML configuration file. For instance:
"{vl.plugin_instance}-{vl.type_instance}"
The result fo the example above can be string consisting
extra dashes if `type_instace` field is not set by a collectd
plugin:
"load-"
Change-Id: I5cf7b19902acdfb0b4a93f3bf0c8b8e05cff2e97
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Diffstat (limited to '3rd_party/collectd-ves-app/ves_app/host.yaml')
-rw-r--r-- | 3rd_party/collectd-ves-app/ves_app/host.yaml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/3rd_party/collectd-ves-app/ves_app/host.yaml b/3rd_party/collectd-ves-app/ves_app/host.yaml index a91574cf..0aa53f4c 100644 --- a/3rd_party/collectd-ves-app/ves_app/host.yaml +++ b/3rd_party/collectd-ves-app/ves_app/host.yaml @@ -39,7 +39,7 @@ Host Measurements: !Measurements plugin_instance: "{vl.plugin_instance}" type: "/^(?!memory|virt_vcpu|disk_octets|disk_ops|if_packets|if_errors|if_octets|if_dropped).*$/" - ITEM-DESC: - name: "{vl.type}-{vl.type_instance}-{vl.ds_name}" + name: !StripExtraDash "{vl.type}-{vl.type_instance}-{vl.ds_name}" value: "{vl.value}" additionalMeasurements: !ArrayItem - SELECT: @@ -48,13 +48,13 @@ Host Measurements: !Measurements - plugin - plugin_instance - ITEM-DESC: - name: "{vl.plugin}-{vl.plugin_instance}" + name: !StripExtraDash "{vl.plugin}-{vl.plugin_instance}" arrayOfFields: !ArrayItem - SELECT: plugin: "{vl.plugin}" plugin_instance: "{vl.plugin_instance}" - ITEM-DESC: - name: "{vl.type}-{vl.type_instance}-{vl.ds_name}" + name: !StripExtraDash "{vl.type}-{vl.type_instance}-{vl.ds_name}" value: "{vl.value}" measurementInterval: !Number "{vl.interval}" memoryUsageArray: !ArrayItem @@ -188,14 +188,14 @@ Virt Events: !Events lastEpochMicrosec: !Number "{n.time}" startEpochMicrosec: !Number "{n.time}" faultFields: &faultFields - alarmInterfaceA: "{n.plugin}-{n.plugin_instance}" + alarmInterfaceA: !StripExtraDash "{n.plugin}-{n.plugin_instance}" alarmCondition: "{n.message}" eventSeverity: !MapValue VALUE: "{n.severity}" TO: *collectdSeverityMapping eventSourceType: hypervisor faultFieldsVersion: 1.1 - specificProblem: "{n.plugin_instance}-{n.type_instance}" + specificProblem: !StripExtraDash "{n.plugin_instance}-{n.type_instance}" vfStatus: Active - CONDITION: plugin: virt |