mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
Refactor Acquisition Interface (#773)
* Add new acquisition interface + new modules (cloudwatch, syslog) Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
This commit is contained in:
parent
71c1d9431f
commit
ce6a61df1c
47 changed files with 4468 additions and 1378 deletions
|
@ -334,6 +334,10 @@ func GetParserMetric(url string, itemName string) map[string]map[string]int {
|
|||
source, ok := metric.Labels["source"]
|
||||
if !ok {
|
||||
log.Debugf("no source in Metric %v", metric.Labels)
|
||||
} else {
|
||||
if srctype, ok := metric.Labels["type"]; ok {
|
||||
source = srctype + ":" + source
|
||||
}
|
||||
}
|
||||
value := m.(prom2json.Metric).Value
|
||||
fval, err := strconv.ParseFloat(value, 32)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue