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'
services:
mongodb:
image: mikif70/mongodb:3.4.7
image: mikif70/mongodb:3.6.9
ports:
- 27017:27017
container_name: ll_mongod

View file

@ -6,4 +6,4 @@ else
HOST=${1}
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 (
_Version = "v5.0.0b1"
_Version = "v5.0.0b2"
_Producer = 0
_Consumer = 1
_Remover = 2
@ -51,7 +51,8 @@ func main() {
}
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) {
match := re.FindStringSubmatch(opts.Influxdb)
infhost = match[1]