Threshold results in influx + grafana

Hi @eyeveebe

I am not using timescaledb, I am using influx db.

Dashboard - I am using [

k6 Load Testing Results By Groups

](k6 Load Testing Results By Groups | Grafana Labs)

And trying to create a new panel, where I can show the threshold which I have defined in code.

Lets consider the below code -

import http from 'k6/http';
import { sleep, check } from 'k6';
import { Counter } from 'k6/metrics';

// A simple counter for http requests

export const requests = new Counter('http_reqs');
const server = 'http://example.com';

// you can specify stages of your test (ramp up/down patterns) through the options object
// target is the number of VUs you are aiming for

export const options = {
  thresholds: {
    'http_req_duration{name:${}/endpoint1}': [ 'avg>0' ], // arbitrary threshold
    'http_req_duration{name:${}/endpoint2}': [ 'avg>0' ],
  },
};

export default function() {
  
  const token = http.get(http.url`${server}/endpoint1`).json('token');
  check(
    http.post(http.url`${server}/endpoint2`, 'token=' + token),
    {
      'token accepted': r => r.status === 200,
    });
}

I am running this code using command

k6 run test.js --out influxdb=http://127.0.0.1:8086/k6

So in Grafana I want to show threshold with threshold value and pass/fail status