Skip to content

Instantly share code, notes, and snippets.

View grdryn's full-sized avatar

Gerard Ryan grdryn

View GitHub Profile
@grdryn
grdryn / FetchMetrics.java
Last active February 28, 2023 16:56
JBang script to get metrics from the OpenShift streams metrics federation endpoint
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS info.picocli:picocli:4.5.0
//DEPS com.redhat.cloud:kafka-management-sdk:0.31.0
// Usage:
// jbang https://gist.github.com/grdryn/8374c5d32e452ca2ffedd41d22380e74 --token $(rhoas authtoken) --instance $(rhoas status -o json | jq -r '.kafka.id')
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;