-
Notifications
You must be signed in to change notification settings - Fork 5
Description
with the following code snippet:
` foreach ($omnistackhost in $omnistackcluster.members) {
$uri = "https://" + $ovc + "/api/hosts/" + $omnistackhost
$hostresponse = Invoke-RestMethod -Uri $uri -Headers $headers -Method Get
$propertyBag = $scomAPI.CreatePropertyBag()
$propertyBag.AddValue("Instance", $hostresponse.host.name)
$propertyBag.AddValue("Counter", "Used")
$propertyBag.AddValue("Value", $hostresponse.host.used_capacity)
$propertyBag
$propertyBag = $scomAPI.CreatePropertyBag()
$propertyBag.AddValue("Instance", $hostresponse.host.name)
$propertyBag.AddValue("Counter", "Total")
$propertyBag.AddValue("Value", $hostresponse.host.allocated_capacity)
$propertyBag
}`
mapped in the performance mapper as:
Object - OmnistackCapacity
Counter -
Instance -
Value -
when results are returned the countername does not get updated, so Countername = UsedBytes for both bags?
from DW db -
2018-02-15 11:21:39.833 265672542208 hh-hpe-i03.diti.lr.net UsedBytes
2018-02-15 11:21:39.833 6091815282278 hh-hpe-i03.diti.lr.net UsedBytes
2018-02-15 11:21:39.520 265151482880 hh-hpe-i04.diti.lr.net UsedBytes
2018-02-15 11:21:39.520 6091815282278 hh-hpe-i04.diti.lr.net UsedBytes
when i was hoping for:
2018-02-15 11:21:39.833 265672542208 hh-hpe-i03.diti.lr.net UsedBytes
2018-02-15 11:21:39.833 6091815282278 hh-hpe-i03.diti.lr.net TotalBytes
2018-02-15 11:21:39.520 265151482880 hh-hpe-i04.diti.lr.net UsedBytes
2018-02-15 11:21:39.520 6091815282278 hh-hpe-i04.diti.lr.net TotalBytes
is it possible to return multiple bags this way or will i need to create two separate collectors?
Thanks