Hey Jirka and others
I am (in my IoT playground) [1]
creating a resource and then associating a metric
via
https://github.com/hawkular/hawkular-client-ruby/blob/master/lib/inventor...
Now we have in Hawkular an experimental metric explorer.
That is not able to show the metric.
And not only in this case, but also for DataSources.
I wonder if we somewhere have a more general error that
prevents showing those?
Walk through with IRB and the RubyClient:
invclient =
Hawkular::Inventory::InventoryClient.new('http://localhost:8080/hawkular/inventory',creds)
invclient.list_feeds
=> ["73a5aad1-37e7-429a-834d-2aa324a079ba", "16617927",
"esp16617927"]
rts = invclient.list_resource_types 'esp16617927'
=> [#<Hawkular::Inventory::ResourceType:0x007ff3a4652a08
@id="esp8266",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;esp16617927/rt;esp8266",
@name="esp8266", @properties=nil,
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;esp16617927/rt;esp8266",
"name"=>"esp8266", "id"=>"esp8266"},
@feed="esp16617927">]
rt = rts.first
=> [...]
res = invclient.list_resources_for_type 'esp16617927', 'esp8266', false
=> [#<Hawkular::Inventory::Resource:0x007ff3a467ca60
@id="mcu16617927",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;esp16617927/r;mcu16617927",
@properties={},
@type_path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;esp16617927/rt;esp8266",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;esp16617927/r;mcu16617927",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;esp16617927/rt;esp8266",
"name"=>"esp8266", "id"=>"esp8266"},
"name"=>"mcu16617927",
"id"=>"mcu16617927"}, @feed="esp16617927",
@name="mcu16617927">]
2.2.1 :015 > invclient.list_metrics_for_resource res.first
=> [#<Hawkular::Inventory::Metric:0x007ff3a46a2800
@id="16617927:40.176.91.120.5.0.0.125",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;esp16617927/m;16617927:40.176.91.120.5.0.0.125",
@name="16617927:40.176.91.120.5.0.0.125",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;esp16617927/m;16617927:40.176.91.120.5.0.0.125",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;esp16617927/mt;thermo",
"unit"=>"NONE", "type"=>"GAUGE",
"collectionInterval"=>60,
"id"=>"thermo"},
"id"=>"16617927:40.176.91.120.5.0.0.125"},
@feed="esp16617927", @type="GAUGE", @unit="NONE",
@collection_interval=nil>]
----
Now for platform stuff
res = invclient.list_resources_for_feed
"73a5aad1-37e7-429a-834d-2aa324a079ba"
r = res.first
=> #<Hawkular::Inventory::Resource:0x007ff3a59f2b30
@id="platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem",
@properties={},
@type_path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Operating%20System",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Operating%20System",
"name"=>"Operating System", "id"=>"Operating
System"},
"name"=>"73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem",
"id"=>"platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem"},
@feed="73a5aad1-37e7-429a-834d-2aa324a079ba",
@name="platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem">
invclient.list_metrics_for_resource r
=> []
res = invclient.list_child_resources r, true
=> [#<Hawkular::Inventory::Resource:0x007ff3a6f02e08
@id="platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/FILE_STORE=hwr",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=hwr",
@properties={},
@type_path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;File%20Store",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=hwr",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;File%20Store",
"name"=>"File Store", "id"=>"File Store"},
"name"=>"File Store [hwr]",
"id"=>"platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/FILE_STORE=hwr"},
@feed="73a5aad1-37e7-429a-834d-2aa324a079ba",
@name="platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=hwr">,
#<Hawkular::Inventory::Resource:0x007ff3a6f02908
@id="platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/FILE_STORE=MobileBackups",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=MobileBackups",
@properties={},
@type_path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;File%20Store",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=MobileBackups",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;File%20Store",
"name"=>"File Store", "id"=>"File Store"},
"name"=>"File Store
[MobileBackups]",
"id"=>"platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/FILE_STORE=MobileBackups"},
@feed="73a5aad1-37e7-429a-834d-2aa324a079ba",
@name="platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=MobileBackups">,
#<Hawkular::Inventory::Resource:0x007ff3a6f02408
@id="platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/FILE_STORE=Macintosh
HD (/)",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=Macintosh%20HD%20(%2F)",
@properties={},
@type_path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;File%20Store",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=Macintosh%20HD%20(%2F)",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;File%20Store",
"name"=>"File Store", "id"=>"File Store"},
"name"=>"File Store
[Macintosh HD (/)]",
"id"=>"platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/FILE_STORE=Macintosh
HD (/)"}, @feed="73a5aad1-37e7-429a-834d-2aa324a079ba",
@name="platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=Macintosh%20HD%20(%2F)">,
#<Hawkular::Inventory::Resource:0x007ff3a6f01f08
@id="platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/MEMORY=Memory",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FMEMORY=Memory",
@properties={},
@type_path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Memory",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FMEMORY=Memory",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Memory",
"name"=>"Memory", "id"=>"Memory"},
"name"=>"Memory",
"id"=>"platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/MEMORY=Memory"},
@feed="73a5aad1-37e7-429a-834d-2aa324a079ba",
@name="platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FMEMORY=Memory">,
#<Hawkular::Inventory::Resource:0x007ff3a6f01a08
@id="platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/PROCESSOR=1",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=1",
@properties={},
@type_path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Processor",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=1",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Processor",
"name"=>"Processor", "id"=>"Processor"},
"name"=>"Processor [1]",
"id"=>"platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/PROCESSOR=1"},
@feed="73a5aad1-37e7-429a-834d-2aa324a079ba",
@name="platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=1">,
#<Hawkular::Inventory::Resource:0x007ff3a6f01508
@id="platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/PROCESSOR=0",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=0",
@properties={},
@type_path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Processor",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=0",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Processor",
"name"=>"Processor", "id"=>"Processor"},
"name"=>"Processor [0]",
"id"=>"platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/PROCESSOR=0"},
@feed="73a5aad1-37e7-429a-834d-2aa324a079ba",
@name="platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=0">,
#<Hawkular::Inventory::Resource:0x007ff3a6f01008
@id="platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/PROCESSOR=3",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=3",
@properties={},
@type_path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Processor",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=3",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Processor",
"name"=>"Processor", "id"=>"Processor"},
"name"=>"Processor [3]",
"id"=>"platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/PROCESSOR=3"},
@feed="73a5aad1-37e7-429a-834d-2aa324a079ba",
@name="platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=3">,
#<Hawkular::Inventory::Resource:0x007ff3a6f00b08
@id="platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/PROCESSOR=2",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=2",
@properties={},
@type_path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Processor",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=2",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;Processor",
"name"=>"Processor", "id"=>"Processor"},
"name"=>"Processor [2]",
"id"=>"platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/PROCESSOR=2"},
@feed="73a5aad1-37e7-429a-834d-2aa324a079ba",
@name="platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FPROCESSOR=2">]
fs = res.first
=>
#<Hawkular::Inventory::Resource:0x007ff3a6f02e08
@id="platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/FILE_STORE=hwr",
@path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=hwr",
@properties={},
@type_path="/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;File%20Store",
@_hash={"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/r;platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=hwr",
"type"=>{"path"=>"/t;28026b36-8fe4-4332-84c8-524e173a68bf/f;73a5aad1-37e7-429a-834d-2aa324a079ba/rt;File%20Store",
"name"=>"File Store", "id"=>"File Store"},
"name"=>"File Store [hwr]",
"id"=>"platform~/OPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem/FILE_STORE=hwr"},
@feed="73a5aad1-37e7-429a-834d-2aa324a079ba",
@name="platform~%2FOPERATING_SYSTEM=73a5aad1-37e7-429a-834d-2aa324a079ba_OperatingSystem%2FFILE_STORE=hwr">
2.2.1 :026 > invclient.list_metrics_for_resource fs
=> []
And for the Filestore 'hwr' I see metric data on the level of the
Appserver->Platform tab
[1]
https://github.com/pilhuhn/hawkular-mqtt-bridge