Skip to content

Commit

Permalink
switch from warning to debug when labels are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 committed May 28, 2024
1 parent d64b23a commit af8953b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collector/nginx_plus.go
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ func (c *NginxPlusCollector) Collect(ch chan<- prometheus.Metric) {
varLabelValues := c.getUpstreamServerLabelValues(name)

if c.variableLabelNames.UpstreamServerVariableLabelNames != nil && len(varLabelValues) != len(c.variableLabelNames.UpstreamServerVariableLabelNames) {
level.Warn(c.logger).Log("msg", "wrong number of labels for upstream, empty labels will be used instead", "upstream", name, "expected", len(c.variableLabelNames.UpstreamServerVariableLabelNames), "got", len(varLabelValues))
level.Debug(c.logger).Log("msg", "wrong number of labels for upstream, empty labels will be used instead", "upstream", name, "expected", len(c.variableLabelNames.UpstreamServerVariableLabelNames), "got", len(varLabelValues))
for range c.variableLabelNames.UpstreamServerVariableLabelNames {
labelValues = append(labelValues, "")
}
Expand Down

0 comments on commit af8953b

Please sign in to comment.