Skip to content

Commit

Permalink
properly update the cs_syslogsource_parsed_total metric (#2608)
Browse files Browse the repository at this point in the history
  • Loading branch information
blotus authored Nov 22, 2023
1 parent a51bce8 commit d7ef51e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/acquisition/modules/syslog/syslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,10 @@ func (s *SyslogSource) handleSyslogMsg(out chan types.Event, t *tomb.Tomb, c cha
continue
}
line = s.buildLogFromSyslog(p2.Timestamp, p2.Hostname, p2.Tag, p2.PID, p2.Message)
linesParsed.With(prometheus.Labels{"source": syslogLine.Client, "type": "rfc5424"}).Inc()
} else {
line = s.buildLogFromSyslog(p.Timestamp, p.Hostname, p.Tag, p.PID, p.Message)
linesParsed.With(prometheus.Labels{"source": syslogLine.Client, "type": "rfc3164"}).Inc()
}

line = strings.TrimSuffix(line, "\n")
Expand Down

0 comments on commit d7ef51e

Please sign in to comment.