getAllProducerMetrics
Get producer metrics for all the alive producers
/api/v1/admin/metrics/aggregated/producers
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"//api/v1/admin/metrics/aggregated/producers?duration=&state="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AggregatedMetricOperationsApi;
import java.io.File;
import java.util.*;
public class AggregatedMetricOperationsApiExample {
public static void main(String[] args) {
AggregatedMetricOperationsApi apiInstance = new AggregatedMetricOperationsApi();
String duration = duration_example; // String | Pre-defined Time duration
String state = state_example; // String | State of the Producer
try {
AggrProducerMetrics result = apiInstance.getAllProducerMetrics(duration, state);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AggregatedMetricOperationsApi#getAllProducerMetrics");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AggregatedMetricOperationsApi;
public class AggregatedMetricOperationsApiExample {
public static void main(String[] args) {
AggregatedMetricOperationsApi apiInstance = new AggregatedMetricOperationsApi();
String duration = duration_example; // String | Pre-defined Time duration
String state = state_example; // String | State of the Producer
try {
AggrProducerMetrics result = apiInstance.getAllProducerMetrics(duration, state);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AggregatedMetricOperationsApi#getAllProducerMetrics");
e.printStackTrace();
}
}
}
String *duration = duration_example; // Pre-defined Time duration (optional)
String *state = state_example; // State of the Producer (optional)
AggregatedMetricOperationsApi *apiInstance = [[AggregatedMetricOperationsApi alloc] init];
// Get producer metrics for all the alive producers
[apiInstance getAllProducerMetricsWith:duration
state:state
completionHandler: ^(AggrProducerMetrics output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var SwaggerJsClient = require('swagger-js-client');
var api = new SwaggerJsClient.AggregatedMetricOperationsApi()
var opts = {
'duration': duration_example, // {{String}} Pre-defined Time duration
'state': state_example // {{String}} State of the Producer
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAllProducerMetrics(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAllProducerMetricsExample
{
public void main()
{
var apiInstance = new AggregatedMetricOperationsApi();
var duration = duration_example; // String | Pre-defined Time duration (optional)
var state = state_example; // String | State of the Producer (optional)
try
{
// Get producer metrics for all the alive producers
AggrProducerMetrics result = apiInstance.getAllProducerMetrics(duration, state);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AggregatedMetricOperationsApi.getAllProducerMetrics: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAggregatedMetricOperationsApi();
$duration = duration_example; // String | Pre-defined Time duration
$state = state_example; // String | State of the Producer
try {
$result = $api_instance->getAllProducerMetrics($duration, $state);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AggregatedMetricOperationsApi->getAllProducerMetrics: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AggregatedMetricOperationsApi;
my $api_instance = WWW::SwaggerClient::AggregatedMetricOperationsApi->new();
my $duration = duration_example; # String | Pre-defined Time duration
my $state = state_example; # String | State of the Producer
eval {
my $result = $api_instance->getAllProducerMetrics(duration => $duration, state => $state);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AggregatedMetricOperationsApi->getAllProducerMetrics: $@\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.AggregatedMetricOperationsApi()
duration = duration_example # String | Pre-defined Time duration (optional)
state = state_example # String | State of the Producer (optional)
try:
# Get producer metrics for all the alive producers
api_response = api_instance.get_all_producer_metrics(duration=duration, state=state)
pprint(api_response)
except ApiException as e:
print("Exception when calling AggregatedMetricOperationsApi->getAllProducerMetrics: %s\n" % e)
Parameters
Name | Description |
---|---|
duration |
String
Pre-defined Time duration
|
state |
String
State of the Producer
|