Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Documentation

Skip to end of metadata
Go to start of metadata

Change log

February 11, 2016

  • DTO changes in "Push custom metric datapoints", datapoint attributes 'value' and 'value' are replaced by the attribute "value"
  • DTO changes in "Get metrics datapoints", datapoint attributes 'value' and 'value' are replaced by the attribute "value"
  • DTO changes in "Get metric datapoints", datapoint attributes 'value' and 'value' are replaced by the attribute "value"
  • Updated DTOs with new alarm links
  • Added alarm and alert functionality sections

API

Abiquo handles two kind of metrics:

  • Builtin metrics, provided by each hypervisor plugin and fetched periodically by the monitor manager.
  • Custom metrics, that can be created and populated through the Abiquo API.

Metrics functionality in Abiquo API:

Virtual machine metrics resource

  • Get metrics metadata
  • Get metric metadata
  • Get metrics datapoints
  • Get metric datapoints
  • Create custom metric
  • Update custom metric unit and description
  • Push custom metric datapoints
  • Push collectd value lists

Virtual machine resource

  • Enable fetching of builtin metrics
  • Disable fetching of builtin metrics

Alarm functionality in Abiquo API:

  • Get metric alarms
  • Create alarm
  • Delete alarm
  • Update alarm
  • Get alarm

Alert functionality in Abiquo API:

  • Get virtual appliance alerts
  • Create alert
  • Delete alert
  • Update alert
  • Get alert

Metrics resource

Get metrics metadata

Returns the metadata of all the available, builtin and custom, metrics for the given virtualmachine.

  • HTTP verb: GET
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics
  • Produces: application/vnd.abiquo.metricsmetadata (+xml/json)
  • Consumes: -

Request example:

curl -v -u username:password -X GET http://localhost/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics -H "Accept: application/vnd.abiquo.metricsmetadata+json"

Response example:

This example has been shortened

 Click here to expand...
> GET /api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics HTTP/1.1
< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.metricsmetadata+json
{
   "links":[
      {
         "title":"metricsmetadata",
         "rel":"self",
         "type":"application/vnd.abiquo.metricsmetadata+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics"
      },
      {
         "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      }
   ],
   "collection":[
      {
         "links":[
            {
               "title":"vcpu_number",
               "rel":"self",
               "type":"application/vnd.abiquo.metricmetadata+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/vcpu_number"
            },
            {
               "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
               "rel":"virtualmachine",
               "type":"application/vnd.abiquo.virtualmachine+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
            },
            {
               "title":"vcpu_number",
               "rel":"metric",
               "type":"application/vnd.abiquo.metric+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/vcpu_number"
            },
            {
               "title":"alarms",
               "rel":"alarms",
               "type":"application/vnd.abiquo.alarms+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/vcpu_number/alarms"
            }
         ],
         "name":"vcpu_number",
         "description":"number of vcpus",
         "unit":"",
         "namespace":"virtualmachine",
         "dimensions":{

         }
      },
      {
         "links":[
            {
               "title":"if_rx_drops",
               "rel":"self",
               "type":"application/vnd.abiquo.metricmetadata+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/if_rx_drops"
            },
            {
               "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
               "rel":"virtualmachine",
               "type":"application/vnd.abiquo.virtualmachine+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
            },
            {
               "title":"if_rx_drops",
               "rel":"metric",
               "type":"application/vnd.abiquo.metric+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/if_rx_drops"
            },
            {
               "title":"alarms",
               "rel":"alarms",
               "type":"application/vnd.abiquo.alarms+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/if_rx_drops/alarms"
            }
         ],
         "name":"if_rx_drops",
         "description":"total drops on receive of the network interfaces",
         "unit":"",
         "namespace":"virtualmachine",
         "dimensions":{
         }
      }
   ]
}
Get metric metadata

Returns the metadata of a specific metric (builtin or custom).

  • HTTP verb: GET
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics/{metric_name}
  • Produces: application/vnd.abiquo.metricmetadata (+xml/json)
  • Consumes: -

Request example:

curl -v -u user:password -X GET http://localhost/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics/DiskReadOps -H "Accept: application/vnd.abiquo.metricmetadata+json"

Response example:

 Click here to expand...
> GET /api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics/DiskReadOps HTTP/1.1
< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.metricmetadata+json
{
   "links":[
      {
         "title":"if_rx_drops",
         "rel":"self",
         "type":"application/vnd.abiquo.metricmetadata+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/if_rx_drops"
      },
      {
         "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      },
      {
         "title":"if_rx_drops",
         "rel":"metric",
         "type":"application/vnd.abiquo.metric+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/if_rx_drops"
      },
      {
         "title":"alarms",
         "rel":"alarms",
         "type":"application/vnd.abiquo.alarms+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/if_rx_drops/alarms"
      }
   ],
   "name":"if_rx_drops",
   "description":"total drops on receive of the network interfaces",
   "unit":"",
   "namespace":"virtualmachine",
   "dimensions":{

   }
}

 

 

Get metrics datapoints

Get all the metrics for the given virtual machine. For each metric, returns the datapoints in the last hour using an Average datapoint aggregator with a granularity of 60 seconds

  • HTTP verb: GET
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics
  • Produces: application/vnd.abiquo.metrics (+xml/json)
  • Consumes: -

Request example:

curl -v -u user:password -X GET http://localhost/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics -H "Accept: application/vnd.abiquo.metrics+json"

Response example:
This example has been shortened

 Click here to expand...
> GET /api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics HTTP/1.1
> Accept: application/vnd.abiquo.metrics+json
< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.metrics+json
{
   "links":[
      {
         "title":"metrics",
         "rel":"self",
         "type":"application/vnd.abiquo.metrics+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics"
      },
      {
         "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      }
   ],
   "collection":[
      {
         "links":[
            {
               "title":"vcpu_number",
               "rel":"self",
               "type":"application/vnd.abiquo.metric+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/vcpu_number"
            },
            {
               "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
               "rel":"virtualmachine",
               "type":"application/vnd.abiquo.virtualmachine+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
            },
            {
               "title":"vcpu_number",
               "rel":"metricmetadata",
               "type":"application/vnd.abiquo.metricmetadata+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/vcpu_number"
            }
         ],
         "name":"vcpu_number",
         "namespace":"virtualmachine",
         "datapoints":[
            {
               "links":[

               ],
               "timestamp":1455182582000,
               "value":7.9413501256126853E18
            },
            {
               "links":[

               ],
               "timestamp":1455182642000,
               "value":4.7253425885608817E18
            },
            {
               "links":[

               ],
               "timestamp":1455182702000,
               "value":-3.4327907097842417E18
            },
            {
               "links":[

               ],
               "timestamp":1455182762000,
               "value":-4.5005486343696456E18
            },
            {
               "links":[

               ],
               "timestamp":1455182822000,
               "value":7.4571859280047636E18
            },
            {
               "links":[

               ],
               "timestamp":1455182882000,
               "value":-6.0962052270824417E18
            },
            {
               "links":[

               ],
               "timestamp":1455182942000,
               "value":-7.0183579962727875E18
            },
            {
               "links":[

               ],
               "timestamp":1455183002000,
               "value":2.4088187955249316E18
            },
            {
               "links":[

               ],
               "timestamp":1455183062000,
               "value":-5.0017553754427924E18
            },
            {
               "links":[

               ],
               "timestamp":1455183122000,
               "value":-9.2711419510470605E17
            },
            {
               "links":[

               ],
               "timestamp":1455183182000,
               "value":6.5144560208526776E18
            },
            {
               "links":[

               ],
               "timestamp":1455183242000,
               "value":-2.10289692122324019E18
            },
            {
               "links":[

               ],
               "timestamp":1455183302000,
               "value":8.7112949356778578E18
            },
            {
               "links":[

               ],
               "timestamp":1455183362000,
               "value":3.753132870435029E18
            },
            {
               "links":[

               ],
               "timestamp":1455183422000,
               "value":4.5644746368936787E17
            },
            {
               "links":[

               ],
               "timestamp":1455183482000,
               "value":2.00052743856347213E18
            },
            {
               "links":[

               ],
               "timestamp":1455183542000,
               "value":7.05508525792098E18
            },
            {
               "links":[

               ],
               "timestamp":1455183602000,
               "value":1.49813468701853542E18
            },
            {
               "links":[

               ],
               "timestamp":1455183662000,
               "value":6.307577401500886E18
            },
            {
               "links":[

               ],
               "timestamp":1455183722000,
               "value":2.3807649147700854E18
            },
            {
               "links":[

               ],
               "timestamp":1455183782000,
               "value":7.2697798206175089E18
            },
            {
               "links":[

               ],
               "timestamp":1455183842000,
               "value":-5.0098775100797901E18
            },
            {
               "links":[

               ],
               "timestamp":1455183902000,
               "value":-2.5513077711042555E18
            },
            {
               "links":[

               ],
               "timestamp":1455183962000,
               "value":1.26788629699929677E18
            },
            {
               "links":[

               ],
               "timestamp":1455184022000,
               "value":7.8312058559734292E18
            },
            {
               "links":[

               ],
               "timestamp":1455184082000,
               "value":2.7112124853416945E18
            },
            {
               "links":[

               ],
               "timestamp":1455184142000,
               "value":8.4535916345301279E18
            },
            {
               "links":[

               ],
               "timestamp":1455184202000,
               "value":-3.2749099004122199E18
            },
            {
               "links":[

               ],
               "timestamp":1455184262000,
               "value":-8.2208349259834163E18
            },
            {
               "links":[

               ],
               "timestamp":1455184322000,
               "value":-4.9907566598683761E18
            },
            {
               "links":[

               ],
               "timestamp":1455184382000,
               "value":-7.5943915811396378E17
            },
            {
               "links":[

               ],
               "timestamp":1455184442000,
               "value":-6.8099839352794819E18
            },
            {
               "links":[

               ],
               "timestamp":1455184502000,
               "value":7.1597698353436006E18
            }
         ]
      },
      {
         "links":[
            {
               "title":"disk_wr_bytes",
               "rel":"self",
               "type":"application/vnd.abiquo.metric+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes"
            },
            {
               "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
               "rel":"virtualmachine",
               "type":"application/vnd.abiquo.virtualmachine+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
            },
            {
               "title":"disk_wr_bytes",
               "rel":"metricmetadata",
               "type":"application/vnd.abiquo.metricmetadata+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes"
            }
         ],
         "name":"disk_wr_bytes",
         "namespace":"virtualmachine",
         "datapoints":[
            {
               "links":[

               ],
               "timestamp":1455182582000,
               "value":-5.3177858358957117E18
            },
            {
               "links":[

               ],
               "timestamp":1455182642000,
               "value":7.5370151657195162E18
            },
            {
               "links":[

               ],
               "timestamp":1455182702000,
               "value":-1.15255871470657971E18
            },
            {
               "links":[

               ],
               "timestamp":1455182762000,
               "value":-7.332334223611094E18
            },
            {
               "links":[

               ],
               "timestamp":1455182822000,
               "value":-4.0137235536788925E18
            },
            {
               "links":[

               ],
               "timestamp":1455182882000,
               "value":6.0226390032512154E18
            },
            {
               "links":[

               ],
               "timestamp":1455182942000,
               "value":-7.0248912894939648E18
            },
            {
               "links":[

               ],
               "timestamp":1455183002000,
               "value":7.8789214350207212E18
            },
            {
               "links":[

               ],
               "timestamp":1455183062000,
               "value":-8.8367574673125594E17
            },
            {
               "links":[

               ],
               "timestamp":1455183122000,
               "value":2.4455273765110784E18
            },
            {
               "links":[

               ],
               "timestamp":1455183182000,
               "value":4.8622742632530893E18
            },
            {
               "links":[

               ],
               "timestamp":1455183242000,
               "value":-2.24578496249649664E18
            },
            {
               "links":[

               ],
               "timestamp":1455183302000,
               "value":6.6167589012305848E18
            },
            {
               "links":[

               ],
               "timestamp":1455183362000,
               "value":-6.6515253527059569E18
            },
            {
               "links":[

               ],
               "timestamp":1455183422000,
               "value":8.3870742865266688E18
            },
            {
               "links":[

               ],
               "timestamp":1455183482000,
               "value":5.2219369340038083E18
            },
            {
               "links":[

               ],
               "timestamp":1455183542000,
               "value":-3.855671295604375E18
            },
            {
               "links":[

               ],
               "timestamp":1455183602000,
               "value":9.0918136986598963E18
            },
            {
               "links":[

               ],
               "timestamp":1455183662000,
               "value":1.19135986356108621E18
            },
            {
               "links":[

               ],
               "timestamp":1455183722000,
               "value":-3.0008292609395922E18
            },
            {
               "links":[

               ],
               "timestamp":1455183782000,
               "value":1.27773976773132134E18
            },
            {
               "links":[

               ],
               "timestamp":1455183842000,
               "value":8.9405396322898317E17
            },
            {
               "links":[

               ],
               "timestamp":1455183902000,
               "value":-1.03296407474424333E18
            },
            {
               "links":[

               ],
               "timestamp":1455183962000,
               "value":-5.168618609530856E16
            },
            {
               "links":[

               ],
               "timestamp":1455184022000,
               "value":-1.83730102025786419E18
            },
            {
               "links":[

               ],
               "timestamp":1455184082000,
               "value":-1.77980038853393101E18
            },
            {
               "links":[

               ],
               "timestamp":1455184142000,
               "value":7.440602179746988E18
            },
            {
               "links":[

               ],
               "timestamp":1455184202000,
               "value":-5.3284152345258199E18
            },
            {
               "links":[

               ],
               "timestamp":1455184262000,
               "value":-8.8171342183346115E18
            },
            {
               "links":[

               ],
               "timestamp":1455184322000,
               "value":6.2177614800435466E18
            },
            {
               "links":[

               ],
               "timestamp":1455184382000,
               "value":-3.5842141045173293E17
            },
            {
               "links":[

               ],
               "timestamp":1455184442000,
               "value":3.5735833160711803E18
            },
            {
               "links":[

               ],
               "timestamp":1455184502000,
               "value":5.4038337221089987E18
            }
         ]
      }
   ]
}
Get metric datapoints

Get the datapoints for a specific metric for the given virtual machine. By default uses the same parameters as "Get all metrics" but some defaults can be overridden using the following query parameters:

Parameter

Description

Default value

startrelative

Relative start time following the ISO 8601 duration (cannot contain years or months). A maximum of 1 week.

PT1H (1 Hour)

granularity

Aggregator granularity in seconds. A minimum of 60 seconds.

60 seconds

statistic

Aggregator type: average, maximum, minimum, sum, count, dev

average

 

  • HTTP verb: GET
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics/{metric_name}
  • Produces: application/vnd.abiquo.metric (+xml/json)
  • Consumes: -

Request example:

curl -v -u user:password -X GET http://localhost/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics/NetworkIn -H "Accept: application/vnd.abiquo.metric+json"

Response example:
This example has been shortened

 Click here to expand...
> GET /api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics/NetworkIn HTTP/1.1
> Accept: application/vnd.abiquo.metric+json
< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.metric+json
{
   "links":[
      {
         "title":"if_rx_drops",
         "rel":"self",
         "type":"application/vnd.abiquo.metric+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/if_rx_drops"
      },
      {
         "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      },
      {
         "title":"if_rx_drops",
         "rel":"metricmetadata",
         "type":"application/vnd.abiquo.metricmetadata+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/if_rx_drops"
      }
   ],
   "name":"if_rx_drops",
   "namespace":"virtualmachine",
   "datapoints":[
      {
         "links":[

         ],
         "timestamp":1455182582000,
         "value":4.4058397132825088E18
      },
      {
         "links":[

         ],
         "timestamp":1455182642000,
         "value":-3.5965085346572411E18
      },
      {
         "links":[

         ],
         "timestamp":1455182702000,
         "value":5.9306460475481743E18
      },
      {
         "links":[

         ],
         "timestamp":1455182762000,
         "value":-2.4070576902622689E18
      }
   ]
}
Create custom metric

Creates a new custom metric. The name is mandatory, description and unit are optional parameters.

  • HTTP verb: POST
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics
  • Produces: application/vnd.abiquo.custommetric (+xml/json)
  • Consumes: application/vnd.abiquo.custommetric (+xml/json)

Request example:

curl -v -u user:password -X POST http://localhost/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics -H "Accept: application/vnd.abiquo.custommetric+json" -H"Content-Type:application/vnd.abiquo.custommetric+json" -d'{"name":"custom_example", "description":"Random description", "unit":"Unit"}'

Response example:

 Click here to expand...
> POST /api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics HTTP/1.1
> Accept: application/vnd.abiquo.custommetric+json
> Content-Type:application/vnd.abiquo.custommetric+json
< HTTP/1.1 201 Created
< Content-Type: application/vnd.abiquo.custommetric+json
{
   "links":[
      {
         "title":"ABQ_2e07fabb-b91c-407f-9454-75d19104c352",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://localhost:80/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2"
      },
      {
         "title":"custom_example",
         "rel":"metric",
         "type":"application/vnd.abiquo.metric+json",
         "href":"http://localhost:80/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics/custom_example"
      },
      {
         "title":"custom_example",
         "rel":"metricmetadata",
         "type":"application/vnd.abiquo.metricmetadata+json",
         "href":"http://localhost:80/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics/custom_example"
      }
   ],
   "name":"custom_example",
   "unit":"Unit",
   "description":"Random description"
}
Update custom metric unit and description

Updates the description or unit of an existing custom metric.

  • HTTP verb: PUT
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics/{metric_name}
  • Produces: application/vnd.abiquo.custommetric (+xml/json)
  • Consumes: application/vnd.abiquo.custommetric (+xml/json)

Request example:

curl -v -u user:password -X PUT http://localhost/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics/custom_example -H "Accept: application/vnd.abiquo.custommetric+json" -H"Content-Type:application/vnd.abiquo.custommetric+json" -d'{"name":"custom_example", "description":"Random description 2", "unit":"NoUnit"}'

Response example:

 Click here to expand...
> PUT /api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics/custom_example HTTP/1.1
> Accept: application/vnd.abiquo.custommetric+json
> Content-Type:application/vnd.abiquo.custommetric+json
< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.custommetric+json
{
   "links":[
      {
         "title":"ABQ_2e07fabb-b91c-407f-9454-75d19104c352",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://localhost:80/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2"
      },
      {
         "title":"custom_example",
         "rel":"metric",
         "type":"application/vnd.abiquo.metric+json",
         "href":"http://localhost:80/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics/custom_example"
      },
      {
         "title":"custom_example",
         "rel":"metricmetadata",
         "type":"application/vnd.abiquo.metricmetadata+json",
         "href":"http://localhost:80/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics/custom_example"
      }
   ],
   "name":"custom_example",
   "unit":"NoUnit",
   "description":"Random description 2"
}
Push custom metric datapoints

Push datapoints to an existing custom metric.

  • HTTP verb: POST
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics/{metric_name}
  • Produces: -
  • Consumes: application/vnd.abiquo.datapoints (+xml/json)

Request example:

curl -v -u user:password -X POST http://localhost/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/metrics/lala -H "Accept: application/vnd.abiquo.custommetric+json" -H"Content-Type:application/vnd.abiquo.custommetric+json" -d'{"collection":["timestamp":1416824852000,"value":10},{"timestamp":1416825018000,"value":11}]}'

Response example:

 Click here to expand...
> POST /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/lala HTTP/1.1
> Content-Type:application/vnd.abiquo.datapoints+json;version=3.2
< HTTP/1.1 204 No Content
Push collectd value lists

Push values collected by collectd. The pushed data must be in JSON format https://collectd.org/wiki/index.php/Plugin:Write_HTTP#JSON_Example

  • HTTP verb: POST
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/collectd
  • Produces: -
  • Consumes: application/json

Request example:

curl -v -u user:password -X POST http://localhost/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/collectd  -H"Content-Type:application/json" -d@valuelist.json

Response example:

 Click here to expand...
> POST /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/collectd HTTP/1.1
> Accept: */*
> Content-Type:application/json
< HTTP/1.1 204 No Content
Enable fetching of builtin metrics

Retrieve the native metrics of the virtualization technology as available on your platform. Note that the Abiquo Docker integration extends the native Docker metrics for networking. 

  • HTTP verb: POST
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/enablemonitoring
  • Produces: -
  • Consumes: -

Request example:

curl -v -u user:password -X POST http://localhost/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/enablemonitoring

Response example:

 Click here to expand...
> POST /api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/enablemonitoring HTTP/1.1
> Accept: */*
< HTTP/1.1 204 No Content
Disable fetching of builtin metrics

Stop retrieval of the native metrics of the virtualization technology.

  • HTTP verb: POST
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/disablemonitoring
  • Produces: -
  • Consumes: -

Request example:

curl -v -u user:password -X POST http://localhost/api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/disablemonitoring

Response example:

 Click here to expand...
> POST /api/cloud/virtualdatacenters/2/virtualappliances/1/virtualmachines/2/disablemonitoring HTTP/1.1
> Accept: */*
< HTTP/1.1 204 No Content

Metric Alarms

Get metric alarms

List the alarms associated with a metric

  • HTTP verb: GET
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics/r/alarms
  • Produces: application/vnd.abiquo.alarms (+xml/json)

 

curl -v -u user:password -X GET 'http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms' -H 'Accept: application/vnd.abiquo.alarms+json'

Response example:

 Click here to expand...
> GET /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms HTTP/1.1
> Accept: application/vnd.abiquo.alarms+json
< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.alarms+json
{
   "links":[

   ],
   "collection":[
      {
         "links":[
            {
               "title":"disk_wr_bytes",
               "rel":"metric",
               "type":"application/vnd.abiquo.metric+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes"
            },
            {
               "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
               "rel":"virtualmachine",
               "type":"application/vnd.abiquo.virtualmachine+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
            },
            {
               "title":"434907b3-49f1-48be-b7db-fc97ba86ce44",
               "rel":"edit",
               "type":"application/vnd.abiquo.alarm+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44"
            }
         ],
         "name":"Alarm0",
         "description":"Alarm description",
         "period":60,
         "evaluationPeriods":3,
         "statistic":"average",
         "threshold":5.0,
         "active":false,
         "formula":"greaterthan"
      },
      {
         "links":[
            {
               "title":"disk_wr_bytes",
               "rel":"metric",
               "type":"application/vnd.abiquo.metric+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes"
            },
            {
               "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
               "rel":"virtualmachine",
               "type":"application/vnd.abiquo.virtualmachine+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
            },
            {
               "title":"c43cd193-6a76-454a-8d86-a3b999fffee4",
               "rel":"edit",
               "type":"application/vnd.abiquo.alarm+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/c43cd193-6a76-454a-8d86-a3b999fffee4"
            }
         ],
         "name":"Alarm1",
         "description":"Alarm description",
         "period":60,
         "evaluationPeriods":3,
         "statistic":"average",
         "threshold":5.0,
         "active":false,
         "formula":"greaterthan"
      }
   ]
}
Create alarm

Creates a new alarm.

Attribute

Description

Name

The name of the alarm

Description

The description for the alarm

Period

The number of seconds over the statistic is applied >= 60

EvaluationPeriods

The number of periods which the statistic will be compared with the specified threshold

Statistic

Values: average, maximum, minimum, sum, count, dev

Formula

Values: notequal, greaterthan, greaterthanorequalto, lessthan, lessthanorequalto, trendup, trenddown

Threshold

The value to compare with the specified statistic

 

  • HTTP verb: POST
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics/r/alarms
  • Produces: application/vnd.abiquo.alarm (+xml/json)
  • Consumes: application/vnd.abiquo.alarm (+xml/json)

 

Request example:

curl -v -u user:password -X POST 'http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms' -H 'Content-Type: application/vnd.abiquo.alarm+json' -H 'Accept: application/vnd.abiquo.alarm+json' --data-binary '{  
   "name":"Alarm1",
   "description":"Alarm description",
   "period":60,
   "evaluationPeriods":3,
   "statistic":"average",
   "formula":"greaterthan",
   "threshold":"5"
}'

Response example:

 Click here to expand...
 
> POST /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms HTTP/1.1
> Content-Type: application/vnd.abiquo.alarm+json
> Accept: application/vnd.abiquo.alarm+json
< HTTP/1.1 201 Created
< Content-Type: application/vnd.abiquo.alarm+json
{
   "links":[
      {
         "title":"disk_wr_bytes",
         "rel":"metric",
         "type":"application/vnd.abiquo.metric+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes"
      },
      {
         "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      },
      {
         "title":"c43cd193-6a76-454a-8d86-a3b999fffee4",
         "rel":"edit",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/c43cd193-6a76-454a-8d86-a3b999fffee4"
      }
   ],
   "name":"Alarm1",
   "description":"Alarm description",
   "period":60,
   "evaluationPeriods":3,
   "statistic":"average",
   "threshold":5.0,
   "active":false,
   "formula":"greaterthan"
}
Delete alarm

Deletes an existing alarm.

HTTP verb: DELETE
URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics/r/alarms/u

Request example:

curl -v -uuser:password -X DELETE 'http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/c43cd193-6a76-454a-8d86-a3b999fffee4'

Response example:

 Click here to expand...
> DELETE /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/c43cd19
> Accept: */*
< HTTP/1.1 204 No Content
Update alarm

Updates an existing alarm.

  • HTTP verb: PUT
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics/r/alarms/u
  • Produces: application/vnd.abiquo.alarm (+xml/json)
  • Consumes: application/vnd.abiquo.alarm (+xml/json)

Request example:

curl -v -uadmin:xabiquo -X PUT 'http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44' -X PUT -H 'Content-Type: application/vnd.abiquo.alarm+json' -H 'Accept: application/vnd.abiquo.alarm+json' --data-binary '{  
   "links":[  
      {  
         "title":"disk_wr_bytes",
         "rel":"metric",
         "type":"application/vnd.abiquo.metric+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes"
      },
      {  
         "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      },
      {  
         "title":"434907b3-49f1-48be-b7db-fc97ba86ce44",
         "rel":"edit",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44"
      }
   ],
   "name":"AlarmZero",
   "description":"Alarm description222",
   "period":80,
   "evaluationPeriods":4,
   "statistic":"average",
   "threshold":5,
   "active":false,
   "formula":"greaterthanorequalto"
}








'

Response example:

 Click here to expand...
> PUT /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44 HTTP/1.1
> Content-Type: application/vnd.abiquo.alarm+json
> Accept: application/vnd.abiquo.alarm+json
< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.alarm+json;
{
   "links":[
      {
         "title":"disk_wr_bytes",
         "rel":"metric",
         "type":"application/vnd.abiquo.metric+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes"
      },
      {
         "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      },
      {
         "title":"434907b3-49f1-48be-b7db-fc97ba86ce44",
         "rel":"edit",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44"
      }
   ],
   "name":"AlarmZero",
   "description":"Alarm description222",
   "period":80,
   "evaluationPeriods":4,
   "statistic":"average",
   "threshold":5.0,
   "active":false,
   "formula":"greaterthanorequalto"
}
Get alarm

Get an existing alarm.

  • HTTP verb: GET
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/y/virtualmachines/z/metrics/r/alarms/u
  • Produces: application/vnd.abiquo.alarm (+xml/json)

 

curl -v -uuser:password -X GET 'http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/c43cd193-6a76-454a-8d86-a3b999fffee4' -H 'Accept: application/vnd.abiquo.alarm+json'

Response example:

 Click here to expand...
> GET /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/c43cd193-6a76-454a-8d86-a3b999fffee4 HTTP/1.1
> Accept: application/vnd.abiquo.alarm+json
< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.alarm+json
{
   "links":[
      {
         "title":"disk_wr_bytes",
         "rel":"metric",
         "type":"application/vnd.abiquo.metric+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes"
      },
      {
         "title":"ABQ_562b7c87-ba0a-42e4-9383-557787a39a50",
         "rel":"virtualmachine",
         "type":"application/vnd.abiquo.virtualmachine+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"
      },
      {
         "title":"c43cd193-6a76-454a-8d86-a3b999fffee4",
         "rel":"edit",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/c43cd193-6a76-454a-8d86-a3b999fffee4"
      }
   ],
   "name":"Alarm1",
   "description":"Alarm description",
   "period":60,
   "evaluationPeriods":3,
   "statistic":"average",
   "threshold":5.0,
   "active":false,
   "formula":"greaterthan"
}

Virtual appliance alerts

Get virtual appliance alerts

List the alerts of a virtual appliance

  • HTTP verb: GET
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/alerts
  • Produces: application/vnd.abiquo.alert (+xml/json)

 

Request example:

curl -v -uuser:password -X GET 'http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts' -H 'Accept: application/vnd.abiquo.alerts+json'

Response example:

 Click here to expand...
> GET 1/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts HTTP/1.1
> Accept: application/vnd.abiquo.alerts+json
< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.alerts+json
{
   "links":[

   ],
   "collection":[
      {
         "links":[
            {
               "title":"63c9f960-1a8f-4b24-8f7a-335d84d4c59a",
               "rel":"edit",
               "type":"application/vnd.abiquo.alert+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a"
            },
            {
               "title":"vapp_vdc",
               "rel":"virtualappliance",
               "type":"application/vnd.abiquo.virtualappliance+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1"
            },
            {
               "title":"alarms",
               "rel":"alarms",
               "type":"application/vnd.abiquo.alarms+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a/alarms"
            }
         ],
         "name":"AlertZero",
         "description":"Alert zero",
         "muted":false,
         "alarms":[
            {
               "title":"1c65372f-efce-4001-9b12-85e52c1bc1ca",
               "rel":"alarm",
               "type":"application/vnd.abiquo.alarm+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/1c65372f-efce-4001-9b12-85e52c1bc1ca"
            },
            {
               "title":"434907b3-49f1-48be-b7db-fc97ba86ce44",
               "rel":"alarm",
               "type":"application/vnd.abiquo.alarm+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44"
            }
         ],
         "subscribers":[

         ]
      },
      {
         "links":[
            {
               "title":"8859e76e-c52e-44fe-a79c-768e0e867a4f",
               "rel":"edit",
               "type":"application/vnd.abiquo.alert+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/8859e76e-c52e-44fe-a79c-768e0e867a4f"
            },
            {
               "title":"vapp_vdc",
               "rel":"virtualappliance",
               "type":"application/vnd.abiquo.virtualappliance+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1"
            },
            {
               "title":"alarms",
               "rel":"alarms",
               "type":"application/vnd.abiquo.alarms+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/8859e76e-c52e-44fe-a79c-768e0e867a4f/alarms"
            }
         ],
         "name":"Alert0",
         "description":"Alert zero",
         "muted":false,
         "alarms":[
            {
               "title":"1c65372f-efce-4001-9b12-85e52c1bc1ca",
               "rel":"alarm",
               "type":"application/vnd.abiquo.alarm+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/1c65372f-efce-4001-9b12-85e52c1bc1ca"
            },
            {
               "title":"434907b3-49f1-48be-b7db-fc97ba86ce44",
               "rel":"alarm",
               "type":"application/vnd.abiquo.alarm+json",
               "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44"
            }
         ],
         "subscribers":[

         ]
      }
   ]
}
Create alert

Creates a new alert

Attribute

Description

Name

The name of the alert

Description

The description of the alert

Muted

Indicates if the alert must be activated or ignored

Alarms

The collection of alarm links

Subscribers

The list of emails where to send the notifications

 

  • HTTP verb: POST
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/alerts
  • Produces: application/vnd.abiquo.alert (+xml/json)
  • Consumes: application/vnd.abiquo.alert (+xml/json)

 

Request example:

curl -v -uuser:password -X POST 'http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts' -H 'Content-Type: application/vnd.abiquo.alert+json' -H 'Accept: application/vnd.abiquo.alert+json' --data-binary '{  
   "alarms":[  
      {  
         "title":"434907b3-49f1-48be-b7db-fc97ba86ce44",
         "rel":"alarm",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44"
      },
      {  
         "title":"1c65372f-efce-4001-9b12-85e52c1bc1ca",
         "rel":"alarm",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/1c65372f-efce-4001-9b12-85e52c1bc1ca"
      }
   ],
   "subscribers":[  

   ],
   "name":"AlertZero",
   "description":"Alert zero"
}

'

Response example:

 Click here to expand...
> POST api/cloud/virtualdatacenters/1/virtualappliances/1/alerts HTTP/1.1
> Content-Type: application/vnd.abiquo.alert+json
> Accept: application/vnd.abiquo.alert+json
< HTTP/1.1 201 Created
< Content-Type: application/vnd.abiquo.alert+json
{
   "links":[
      {
         "title":"63c9f960-1a8f-4b24-8f7a-335d84d4c59a",
         "rel":"edit",
         "type":"application/vnd.abiquo.alert+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a"
      },
      {
         "title":"vapp_vdc",
         "rel":"virtualappliance",
         "type":"application/vnd.abiquo.virtualappliance+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1"
      },
      {
         "title":"alarms",
         "rel":"alarms",
         "type":"application/vnd.abiquo.alarms+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a/alarms"
      }
   ],
   "name":"AlertZero",
   "description":"Alert zero",
   "muted":false,
   "alarms":[
      {
         "title":"1c65372f-efce-4001-9b12-85e52c1bc1ca",
         "rel":"alarm",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/1c65372f-efce-4001-9b12-85e52c1bc1ca"
      },
      {
         "title":"434907b3-49f1-48be-b7db-fc97ba86ce44",
         "rel":"alarm",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44"
      }
   ],
   "subscribers":[

   ]
}
Delete alert

Deletes an existing alert

  • HTTP verb: DELETE
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/alerts/y

Request example:

curl -v -uuser:password -X DELETE 'http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a'

Response example:

 Click here to expand...
> DELETE api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a
> Accept: */*
< HTTP/1.1 204 No Content
Update alert

Updates an existing alert

  • HTTP verb: PUT
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/alerts/y
  • Produces: application/vnd.abiquo.alert (+xml/json)
  • Consumes: application/vnd.abiquo.alert (+xml/json)

Request example:

curl -v -uuser:password -X PUT  'http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a' -H 'Content-Type: application/vnd.abiquo.alert+json' -H 'Accept: application/vnd.abiquo.alert' --data-binary '{  
   "links":[  
      {  
         "title":"63c9f960-1a8f-4b24-8f7a-335d84d4c59a",
         "rel":"edit",
         "type":"application/vnd.abiquo.alert+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a"
      },
      {  
         "title":"vapp_vdc",
         "rel":"virtualappliance",
         "type":"application/vnd.abiquo.virtualappliance+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1"
      },
      {  
         "title":"alarms",
         "rel":"alarms",
         "type":"application/vnd.abiquo.alarms+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a/alarms"
      }
   ],
   "name":"AlertZero0",
   "description":"Alert zero",
   "muted":false,
   "alarms":[  
      {  
         "title":"1c65372f-efce-4001-9b12-85e52c1bc1ca",
         "rel":"alarm",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/1c65372f-efce-4001-9b12-85e52c1bc1ca"
      },
      {  
         "title":"434907b3-49f1-48be-b7db-fc97ba86ce44",
         "rel":"alarm",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44"
      }
   ],
   "subscribers":[  
      "john.doe@abiquo.com"
   ]
}'

Response example:

 Click here to expand...
> PUT http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a HTTP/1.1
> Content-Type: application/vnd.abiquo.alert+json
> Accept: application/vnd.abiquo.alert+json
< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.alert+json
{
   "links":[
      {
         "title":"63c9f960-1a8f-4b24-8f7a-335d84d4c59a",
         "rel":"edit",
         "type":"application/vnd.abiquo.alert+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a"
      },
      {
         "title":"vapp_vdc",
         "rel":"virtualappliance",
         "type":"application/vnd.abiquo.virtualappliance+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1"
      },
      {
         "title":"alarms",
         "rel":"alarms",
         "type":"application/vnd.abiquo.alarms+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a/alarms"
      }
   ],
   "name":"AlertZero0",
   "description":"Alert zero",
   "muted":false,
   "alarms":[
      {
         "title":"1c65372f-efce-4001-9b12-85e52c1bc1ca",
         "rel":"alarm",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/1c65372f-efce-4001-9b12-85e52c1bc1ca"
      },
      {
         "title":"434907b3-49f1-48be-b7db-fc97ba86ce44",
         "rel":"alarm",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44"
      }
   ],
   "subscribers":[
      "john.doe@abiquo.com"
   ]
}
Get alert

Gets an existing alert

  • HTTP verb: GET
  • URL: api/cloud/virtualdatecenters/x/virtualappliances/alerts/y
  • Produces: application/vnd.abiquo.alert (+xml/json)

 

Request example:

curl -v -uuser:password -X GET 'http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a' -H 'Accept: application/vnd.abiquo.alert+json'

Response example:

 Click here to expand...
> GET 1/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a HTTP/1.1
> Accept: application/vnd.abiquo.alert+json
< HTTP/1.1 200 OK
< Content-Type: application/vnd.abiquo.alertsjson
{
   "links":[
      {
         "title":"63c9f960-1a8f-4b24-8f7a-335d84d4c59a",
         "rel":"edit",
         "type":"application/vnd.abiquo.alert+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a"
      },
      {
         "title":"vapp_vdc",
         "rel":"virtualappliance",
         "type":"application/vnd.abiquo.virtualappliance+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1"
      },
      {
         "title":"alarms",
         "rel":"alarms",
         "type":"application/vnd.abiquo.alarms+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/alerts/63c9f960-1a8f-4b24-8f7a-335d84d4c59a/alarms"
      }
   ],
   "name":"AlertZero",
   "description":"Alert zero",
   "muted":false,
   "alarms":[
      {
         "title":"1c65372f-efce-4001-9b12-85e52c1bc1ca",
         "rel":"alarm",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/1c65372f-efce-4001-9b12-85e52c1bc1ca"
      },
      {
         "title":"434907b3-49f1-48be-b7db-fc97ba86ce44",
         "rel":"alarm",
         "type":"application/vnd.abiquo.alarm+json",
         "href":"http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/metrics/disk_wr_bytes/alarms/434907b3-49f1-48be-b7db-fc97ba86ce44"
      }
   ],
   "subscribers":[

   ]
}
  • No labels