Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Adam Grare
@agrare
I mean do you have any metric_rollups records in your database?
not returning anything would be correct if there were no records ;)
Mohamed ELgamasy
@moelgamasy
this api already not exists in cloudforms APIs
https://i.imgur.com/rNLDpSc.png
@agrare i don't understand this point , i think the metric_rollups should already exists with exists VM
right ?
Adam Grare
@agrare

this api already not exists in cloudforms APIs

This API has been there for a number of years: ManageIQ/manageiq-api#4

GET /api/metric_rollups
{
  "error": {
    "kind": "bad_request",
    "message": "Must specify resource_type, capture_interval, start_date",
    "klass": "Api::BadRequestError"
  }
}

i don't understand this point , i think the metric_rollups should already exists with exists VM

well if you don't have c&u enabled then you won't have any metrics or metric_rollups records

Adam Grare
@agrare
how are you issuing your API call?
GET /api/metric_rollups?resource_type=VmOrTemplate&capture_interval=hourly&start_date=2021-11-11
{
  "count": 226,
  "subcount": 1,
  "subquery_count": 1,
  "pages": 1,
  "resources": [
    {
      "href": "https://manageiq.rb.nj.grare.com/api/metric_rollups/226"
    }
  ],
  "links": {
    "self": "https://manageiq.rb.nj.grare.com/api/metric_rollups?resource_type=VmOrTemplate&capture_interval=hourly&start_date=2021-11-11&offset=0",
    "first": "https://manageiq.rb.nj.grare.com/api/metric_rollups?resource_type=VmOrTemplate&capture_interval=hourly&start_date=2021-11-11&offset=0",
    "last": "https://manageiq.rb.nj.grare.com/api/metric_rollups?resource_type=VmOrTemplate&capture_interval=hourly&start_date=2021-11-11&offset=0"
  }
}
Mohamed ELgamasy
@moelgamasy
i tried with the same api format and already enable C&U feature
but still the same
Adam Grare
@agrare
if you ssh to your appliance you can check if you have metric rollups records by doing cd /var/www/miq/vmdb; bin/rails c then MetricRollup.count
can you also post your API call and the response?
Mohamed ELgamasy
@moelgamasy

GET /api/metric_rollups?resource_type=Vm&capture_interval=hourly&start_date='2021-10-22 08:57:52 -0400'
<!DOCTYPE html>

<html>

<head>
<title>The page you were looking for doesn't exist (404)</title>
<style type="text/css">
body {
background-color: #fff;
color: #666;
text-align: center;
font-family: arial, sans-serif;
}

div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}

h1 {
font-size: 100%;
color: #f00;
line-height: 1.5em;
}
</style>
</head>

<body>
<!-- This file lives in public/404.html -->
<div class="dialog">
<h1>The page you were looking for doesn't exist.</h1>
<p>You may have mistyped the address or the page may have moved.</p>
</div>
</body>

</html>

Jason Frey
@Fryguy
I'm surprised you get a 404 HTML page at all (would have expected a JSON response)
Mohamed ELgamasy
@moelgamasy
this for cd /var/www/miq/vmdb; bin/rails c then MetricRollup.count
Adam Grare
@agrare
yeah also suprised you got a 404, what version is this? cat /var/www/miq/vmdb/BUILD
also, can you get to any api resources? how about GET /api/providers
Mohamed ELgamasy
@moelgamasy
{
"name": "providers",
"count": 23,
"subcount": 23,
"resources": [
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000006",
"id": 10000000000006,
"name": "Amazon EBS Storage Manager"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000004",
"id": 10000000000004,
"name": "Amazon EC2"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000005",
"id": 10000000000005,
"name": "Amazon Network Manager"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000019",
"id": 10000000000019,
"name": "Ansible Tower Automation Manager"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000007",
"id": 10000000000007,
"name": "Azure (East US)"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000008",
"id": 10000000000008,
"name": "Azure (East US) Network Manager"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000022",
"id": 10000000000022,
"name": "Embedded Ansible Automation Manager"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000009",
"id": 10000000000009,
"name": "Google Cloud"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000010",
"id": 10000000000010,
"name": "Google Network Manager"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000023",
"id": 10000000000023,
"name": "Hawkular"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000003",
"id": 10000000000003,
"name": "HyperV"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000017",
"id": 10000000000017,
"name": "OpenShift"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000024",
"id": 10000000000024,
"name": "OpenShift-New"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000013",
"id": 10000000000013,
"name": "OpenStack"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000011",
"id": 10000000000011,
"name": "OpenStack Cinder Manager"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000014",
"id": 10000000000014,
"name": "OpenStack Network Manager"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000012",
"id": 10000000000012,
"name": "OpenStack Swift Manager"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000015",
"id": 10000000000015,
"name": "OSP Director"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000016",
"id": 10000000000016,
"name": "OSP Director Network Manager"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000002",
"id": 10000000000002,
"name": "RHV"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000020",
"id": 10000000000020,
"name": "Satellite Configuration Manager"
},
{
"href": "https://cf-ffef.dynamic.opentlc.com/api/providers/10000000000021",
"id": 10000000000021,
Jason Frey
@Fryguy
RBAC? Are you an admin/superadmin or some other user?
whoa 5.8
Adam Grare
@agrare
oh, yeah 5.8.* is ancient
Jason Frey
@Fryguy
that's like what? gap?
Adam Grare
@agrare
fine
Jason Frey
@Fryguy
ok, that's like 7 versions behind
metrics_rollups was added in gap
Adam Grare
@agrare
so that api was added in 5.9.0.0
Jason Frey
@Fryguy
$ git branch -r --contains 3859b87 | grep upstream | sort
  upstream/gaprindashvili
  upstream/hammer
  upstream/ivanchuk
  upstream/jansa
  upstream/kasparov
  upstream/lasker
  upstream/master
  upstream/morphy
5.8 and even 5.9 have been dropped by Red Hat like years ago
Adam Grare
@agrare
but you really should upgrade to the latest CF release 5.11 if you want any RH support
Jason Frey
@Fryguy
5.11 is their latest which is == ivanchuk
you'll also need to get to 5.11 anyway if you want to get to IBM's Infrastructure Management that is part of their CloudPak for Watson AIOps
IBM's Infrastructure Management is up to date with ManageIQ morphy
Mohamed ELgamasy
@moelgamasy
the latest version from redhat is 5.0
or you mean the engine
Adam Grare
@agrare
Yes the engine