You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my $url = sprintf "http://openc3-prometheus:9090/api/v1/query?query=%s", URI::Escape::uri_escape( '100 - (100 * sum by (instance)(rate(node_cpu_seconds_total{mode="idle"}[1h])) / sum by (instance)(rate(node_cpu_seconds_total[1h])))' );
my $res = $ua->get( $url );
die sprintf( "http code %s", $res->code ) unless $res->is_success;
my $v = eval{ JSON::decode_json $res->decoded_content };
die "data no JSON: $@" if $@;
die "status no success" unless $v->{status} && $v->{status} eq 'success';