getAllConsumerGroupMetrics
Get all consumer group details.
/api/v2/admin/metrics/aggregated/groups
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"//api/v2/admin/metrics/aggregated/groups?duration=&from=&to=&state=&includeProducerMetrics=&includeAssignments="
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. Supply either 'duration' [OR] 'from' & 'to' params
Long from = 789; // Long | Beginning of the time period. Provide '-1' to fetch the latest value
Long to = 789; // Long | End of the time period. Provide '-1' to fetch the latest value
String state = state_example; // String | State of the Client
Boolean includeProducerMetrics = true; // Boolean | Include Producer Metrics
Boolean includeAssignments = true; // Boolean | Include Individual ConsumerInstance to TopicPartition Assignment Info
try {
array[AggrConsumerMetrics] result = apiInstance.getAllConsumerGroupMetrics(duration, from, to, state, includeProducerMetrics, includeAssignments);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AggregatedMetricOperationsApi#getAllConsumerGroupMetrics");
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. Supply either 'duration' [OR] 'from' & 'to' params
Long from = 789; // Long | Beginning of the time period. Provide '-1' to fetch the latest value
Long to = 789; // Long | End of the time period. Provide '-1' to fetch the latest value
String state = state_example; // String | State of the Client
Boolean includeProducerMetrics = true; // Boolean | Include Producer Metrics
Boolean includeAssignments = true; // Boolean | Include Individual ConsumerInstance to TopicPartition Assignment Info
try {
array[AggrConsumerMetrics] result = apiInstance.getAllConsumerGroupMetrics(duration, from, to, state, includeProducerMetrics, includeAssignments);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AggregatedMetricOperationsApi#getAllConsumerGroupMetrics");
e.printStackTrace();
}
}
}
String *duration = duration_example; // Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params (optional)
Long *from = 789; // Beginning of the time period. Provide '-1' to fetch the latest value (optional)
Long *to = 789; // End of the time period. Provide '-1' to fetch the latest value (optional)
String *state = state_example; // State of the Client (optional)
Boolean *includeProducerMetrics = true; // Include Producer Metrics (optional)
Boolean *includeAssignments = true; // Include Individual ConsumerInstance to TopicPartition Assignment Info (optional)
AggregatedMetricOperationsApi *apiInstance = [[AggregatedMetricOperationsApi alloc] init];
// Get all consumer group details.
[apiInstance getAllConsumerGroupMetricsWith:duration
from:from
to:to
state:state
includeProducerMetrics:includeProducerMetrics
includeAssignments:includeAssignments
completionHandler: ^(array[AggrConsumerMetrics] 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. Supply either 'duration' [OR] 'from' & 'to' params
'from': 789, // {{Long}} Beginning of the time period. Provide '-1' to fetch the latest value
'to': 789, // {{Long}} End of the time period. Provide '-1' to fetch the latest value
'state': state_example, // {{String}} State of the Client
'includeProducerMetrics': true, // {{Boolean}} Include Producer Metrics
'includeAssignments': true // {{Boolean}} Include Individual ConsumerInstance to TopicPartition Assignment Info
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAllConsumerGroupMetrics(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAllConsumerGroupMetricsExample
{
public void main()
{
var apiInstance = new AggregatedMetricOperationsApi();
var duration = duration_example; // String | Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params (optional)
var from = 789; // Long | Beginning of the time period. Provide '-1' to fetch the latest value (optional)
var to = 789; // Long | End of the time period. Provide '-1' to fetch the latest value (optional)
var state = state_example; // String | State of the Client (optional)
var includeProducerMetrics = true; // Boolean | Include Producer Metrics (optional)
var includeAssignments = true; // Boolean | Include Individual ConsumerInstance to TopicPartition Assignment Info (optional)
try
{
// Get all consumer group details.
array[AggrConsumerMetrics] result = apiInstance.getAllConsumerGroupMetrics(duration, from, to, state, includeProducerMetrics, includeAssignments);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AggregatedMetricOperationsApi.getAllConsumerGroupMetrics: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAggregatedMetricOperationsApi();
$duration = duration_example; // String | Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params
$from = 789; // Long | Beginning of the time period. Provide '-1' to fetch the latest value
$to = 789; // Long | End of the time period. Provide '-1' to fetch the latest value
$state = state_example; // String | State of the Client
$includeProducerMetrics = true; // Boolean | Include Producer Metrics
$includeAssignments = true; // Boolean | Include Individual ConsumerInstance to TopicPartition Assignment Info
try {
$result = $api_instance->getAllConsumerGroupMetrics($duration, $from, $to, $state, $includeProducerMetrics, $includeAssignments);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AggregatedMetricOperationsApi->getAllConsumerGroupMetrics: ', $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. Supply either 'duration' [OR] 'from' & 'to' params
my $from = 789; # Long | Beginning of the time period. Provide '-1' to fetch the latest value
my $to = 789; # Long | End of the time period. Provide '-1' to fetch the latest value
my $state = state_example; # String | State of the Client
my $includeProducerMetrics = true; # Boolean | Include Producer Metrics
my $includeAssignments = true; # Boolean | Include Individual ConsumerInstance to TopicPartition Assignment Info
eval {
my $result = $api_instance->getAllConsumerGroupMetrics(duration => $duration, from => $from, to => $to, state => $state, includeProducerMetrics => $includeProducerMetrics, includeAssignments => $includeAssignments);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AggregatedMetricOperationsApi->getAllConsumerGroupMetrics: $@\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. Supply either 'duration' [OR] 'from' & 'to' params (optional)
from = 789 # Long | Beginning of the time period. Provide '-1' to fetch the latest value (optional)
to = 789 # Long | End of the time period. Provide '-1' to fetch the latest value (optional)
state = state_example # String | State of the Client (optional)
includeProducerMetrics = true # Boolean | Include Producer Metrics (optional)
includeAssignments = true # Boolean | Include Individual ConsumerInstance to TopicPartition Assignment Info (optional)
try:
# Get all consumer group details.
api_response = api_instance.get_all_consumer_group_metrics(duration=duration, from=from, to=to, state=state, includeProducerMetrics=includeProducerMetrics, includeAssignments=includeAssignments)
pprint(api_response)
except ApiException as e:
print("Exception when calling AggregatedMetricOperationsApi->getAllConsumerGroupMetrics: %s\n" % e)
Parameters
Name | Description |
---|---|
duration |
String
Pre-defined Time duration. Supply either 'duration' [OR] 'from' & 'to' params
|
from |
Long
(int64)
Beginning of the time period. Provide '-1' to fetch the latest value
|
to |
Long
(int64)
End of the time period. Provide '-1' to fetch the latest value
|
state |
String
State of the Client
|
includeProducerMetrics |
Boolean
Include Producer Metrics
|
includeAssignments |
Boolean
Include Individual ConsumerInstance to TopicPartition Assignment Info
|