influxdb hostname|ip

This commit is contained in:
Michele Fadda 2018-12-12 13:21:39 +01:00
parent a035171edb
commit f1f38601d5
3 changed files with 6 additions and 5 deletions

View file

@ -1,7 +1,7 @@
version: '2' version: '2'
services: services:
mongodb: mongodb:
image: mikif70/mongodb:3.4.7 image: mikif70/mongodb:3.6.9
ports: ports:
- 27017:27017 - 27017:27017
container_name: ll_mongod container_name: ll_mongod
@ -15,4 +15,4 @@ services:
ports: ports:
- 6379:6379 - 6379:6379
volumes: volumes:
- ./redis:/data - ./redis:/data

View file

@ -6,4 +6,4 @@ else
HOST=${1} HOST=${1}
fi fi
docker run --rm -it mikif70/mongotools:3.4.7 mongo ${HOST} docker run --rm -it mikif70/mongotools:3.6.9 mongo ${HOST}

View file

@ -14,7 +14,7 @@ import (
) )
const ( const (
_Version = "v5.0.0b1" _Version = "v5.0.0b2"
_Producer = 0 _Producer = 0
_Consumer = 1 _Consumer = 1
_Remover = 2 _Remover = 2
@ -51,7 +51,8 @@ func main() {
} }
if opts.Influxdb != "" { if opts.Influxdb != "" {
re, _ := regexp.Compile(`(\w+)@(\d+.\d+.\d+.\d+:\d+)`) var re = regexp.MustCompile(`(?m)(\w+)@([\w.]+):(\d+)`)
// re, _ := regexp.Compile(`(\w+)@(\d+.\d+.\d+.\d+:\d+)`)
if re.MatchString(opts.Influxdb) { if re.MatchString(opts.Influxdb) {
match := re.FindStringSubmatch(opts.Influxdb) match := re.FindStringSubmatch(opts.Influxdb)
infhost = match[1] infhost = match[1]