|
|
@ -74,6 +74,7 @@ type JSON_PromDesc struct { |
|
|
|
FqName string `json:"fqName"` |
|
|
|
Help string `json:"help"` |
|
|
|
VarLabels []string `json:"varLabels"` |
|
|
|
FixedLabels map[string]string `json:"fixedLabels"` |
|
|
|
} |
|
|
|
|
|
|
|
type ActionArg struct { |
|
|
@ -115,7 +116,6 @@ type LuaMetric struct { |
|
|
|
ResultPath string `json:"resultPath"` |
|
|
|
ResultKey string `json:"resultKey"` |
|
|
|
OkValue string `json:"okValue"` |
|
|
|
FixedLabels map[string]string `json:"fixedLabels"` |
|
|
|
PromDesc JSON_PromDesc `json:"promDesc"` |
|
|
|
PromType string `json:"promType"` |
|
|
|
|
|
|
@ -643,7 +643,7 @@ func main() { |
|
|
|
labels[i] = strings.ToLower(l) |
|
|
|
} |
|
|
|
|
|
|
|
lm.Desc = prometheus.NewDesc(pd.FqName, pd.Help, labels, nil) |
|
|
|
lm.Desc = prometheus.NewDesc(pd.FqName, pd.Help, labels, pd.FixedLabels) |
|
|
|
lm.MetricType = getValueType(lm.PromType) |
|
|
|
|
|
|
|
lm.LuaPage = lua.LuaPage{ |
|
|
@ -656,7 +656,6 @@ func main() { |
|
|
|
Key: lm.ResultKey, |
|
|
|
OkValue: lm.OkValue, |
|
|
|
Labels: pd.VarLabels, |
|
|
|
FixedLabels: lm.FixedLabels, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|