Integration with VictoriaMetrics

Hi!
I’m using VictoriaMetrics as Long Term Storage for Prometheus and LibreNMS.

Sadly, some data from LibreNMS is not parsed well by VictoriaMetrics.

Config in Libre:

https://pastebin.com/f7M2L3hD

Error msg from VictoriaMetrics:
victoriametrics | 2019-10-01T09:20:20.775+0000 error VictoriaMetrics@/app/vminsert/influx/parser.go:210 cannot unmarshal Influx line “ports,hostname=10.54.0.2,ifName=br1302,ifAlias=HURT-OPL-Internet\\ +\\ VoIP,port_descr_type=blank INERRORS=0,OUTERRORS=0,INDISCARDS=245333676,OUTDISCARDS=1798680,INBROADCASTPKTS=0,OUTBROADCASTPKTS=0,INMULTICASTPKTS=0,OUTMULTICASTPKTS=0,ifInUcastPkts_rate=0,ifOutUcastPkts_rate=0,ifInErrors_rate=0,ifOutErrors_rate=0,ifInOctets_rate=0,ifOutOctets_rate=0”: missing field value for “+\\”; skipping it

Output od validate.php:

https://pastebin.com/b8w7eF7R

HI! I didn’t find more information about vicrotiametrics.

Problem with space in ifAlias field. If you look at the code, there is a replace function /opt/librenms/LibreNMS/Data/Store/InfluxDB.php:

$v = preg_replace (['/ /', '/, /', '/ = /'], ['\', '\,', '\ ='], $ v);

I change this line to:

$v = preg_replace (['/ /', '/, /', '/ = /'], ['_', '_', '\ ='], $ v);

Now all " " and "," will be replaced to "_". In the ifAlias label it’s not a problem for me (i get alias from mariadb in grafana) and you will get something like:

ifAlias = HURT-OPL-Internet_+_VoIP

But now all data will be delivered to VictoriaMetrics!