mirror of
https://github.com/prymitive/karma
synced 2026-05-09 03:36:44 +00:00
23 lines
527 B
TypeScript
23 lines
527 B
TypeScript
const QueryOperators = Object.freeze({
|
|
Equal: "=",
|
|
NotEqual: "!=",
|
|
Regex: "=~",
|
|
NegativeRegex: "!~",
|
|
});
|
|
|
|
const StaticLabels = Object.freeze({
|
|
AlertName: "alertname",
|
|
AlertManager: "@alertmanager",
|
|
AlertmanagerCluster: "@cluster",
|
|
Fingerprint: "@fingerprint",
|
|
Receiver: "@receiver",
|
|
State: "@state",
|
|
SilenceID: "@silence_id",
|
|
});
|
|
|
|
function FormatQuery(name: string, operator: string, value: string): string {
|
|
return `${name}${operator}${value}`;
|
|
}
|
|
|
|
export { QueryOperators, StaticLabels, FormatQuery };
|