clusterMetrics
/cluster-metrics/{cluster}/{metric}
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"//cluster-metrics/{cluster}/{metric}?minutes=&hours=&samples="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String cluster = cluster_example; // String |
String metric = metric_example; // String |
Integer minutes = 56; // Integer |
Integer hours = 56; // Integer |
Integer samples = 56; // Integer |
try {
TimeSeriesResponse result = apiInstance.clusterMetrics(cluster, metric, minutes, hours, samples);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#clusterMetrics");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String cluster = cluster_example; // String |
String metric = metric_example; // String |
Integer minutes = 56; // Integer |
Integer hours = 56; // Integer |
Integer samples = 56; // Integer |
try {
TimeSeriesResponse result = apiInstance.clusterMetrics(cluster, metric, minutes, hours, samples);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#clusterMetrics");
e.printStackTrace();
}
}
}
String *cluster = cluster_example; //
String *metric = metric_example; //
Integer *minutes = 56; // (optional)
Integer *hours = 56; // (optional)
Integer *samples = 56; // (optional) (default to 1000)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
[apiInstance clusterMetricsWith:cluster
metric:metric
minutes:minutes
hours:hours
samples:samples
completionHandler: ^(TimeSeriesResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var SwaggerJsClient = require('swagger-js-client');
var api = new SwaggerJsClient.DefaultApi()
var cluster = cluster_example; // {{String}}
var metric = metric_example; // {{String}}
var opts = {
'minutes': 56, // {{Integer}}
'hours': 56, // {{Integer}}
'samples': 56 // {{Integer}}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.clusterMetrics(cluster, metric, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class clusterMetricsExample
{
public void main()
{
var apiInstance = new DefaultApi();
var cluster = cluster_example; // String |
var metric = metric_example; // String |
var minutes = 56; // Integer | (optional)
var hours = 56; // Integer | (optional)
var samples = 56; // Integer | (optional) (default to 1000)
try
{
TimeSeriesResponse result = apiInstance.clusterMetrics(cluster, metric, minutes, hours, samples);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.clusterMetrics: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiDefaultApi();
$cluster = cluster_example; // String |
$metric = metric_example; // String |
$minutes = 56; // Integer |
$hours = 56; // Integer |
$samples = 56; // Integer |
try {
$result = $api_instance->clusterMetrics($cluster, $metric, $minutes, $hours, $samples);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->clusterMetrics: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $cluster = cluster_example; # String |
my $metric = metric_example; # String |
my $minutes = 56; # Integer |
my $hours = 56; # Integer |
my $samples = 56; # Integer |
eval {
my $result = $api_instance->clusterMetrics(cluster => $cluster, metric => $metric, minutes => $minutes, hours => $hours, samples => $samples);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->clusterMetrics: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.DefaultApi()
cluster = cluster_example # String |
metric = metric_example # String |
minutes = 56 # Integer | (optional)
hours = 56 # Integer | (optional)
samples = 56 # Integer | (optional) (default to 1000)
try:
api_response = api_instance.cluster_metrics(cluster, metric, minutes=minutes, hours=hours, samples=samples)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->clusterMetrics: %s\n" % e)
Parameters
Path parameters
Name | Description |
---|---|
cluster* |
String
Required
|
metric* |
String
Required
|
Query parameters
Name | Description |
---|---|
minutes |
Integer
(int32)
|
hours |
Integer
(int32)
|
samples |
Integer
(int32)
|