mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
add support for Victoria Metrics Single
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
d31ab690c2
commit
ce82f2f2a5
@ -8,11 +8,13 @@ import { PrometheusHelm } from "../prometheus/helm";
|
||||
import { PrometheusLens } from "../prometheus/lens";
|
||||
import { PrometheusOperator } from "../prometheus/operator";
|
||||
import { PrometheusStacklight } from "../prometheus/stacklight";
|
||||
import { PrometheusVictoriaMetricsSingle } from "../prometheus/victoria-metrics-single";
|
||||
|
||||
export function initPrometheusProviderRegistry() {
|
||||
PrometheusProviderRegistry
|
||||
.getInstance()
|
||||
.registerProvider(new PrometheusLens())
|
||||
.registerProvider(new PrometheusVictoriaMetricsSingle())
|
||||
.registerProvider(new PrometheusHelm())
|
||||
.registerProvider(new PrometheusOperator())
|
||||
.registerProvider(new PrometheusStacklight());
|
||||
|
||||
19
src/main/prometheus/victoria-metrics-single.ts
Normal file
19
src/main/prometheus/victoria-metrics-single.ts
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { PrometheusLens } from "./lens";
|
||||
import type { CoreV1Api } from "@kubernetes/client-node";
|
||||
import type { PrometheusService } from "./provider-registry";
|
||||
|
||||
export class PrometheusVictoriaMetricsSingle extends PrometheusLens {
|
||||
readonly id: string = "victoria-metrics-single";
|
||||
readonly name: string = "Victoria Metrics (single)";
|
||||
readonly rateAccuracy: string = "5m";
|
||||
readonly isConfigurable: boolean = true;
|
||||
|
||||
public async getPrometheusService(client: CoreV1Api): Promise<PrometheusService> {
|
||||
return this.getFirstNamespacedService(client, "app=server,app.kubernetes.io/name=victoria-metrics-single");
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user