Skip to content

Commit

Permalink
Merge branch 'master' into martin-helmich-patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich authored Oct 11, 2022
2 parents 33fa5c8 + 81de497 commit db3ed18
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,16 @@ $ docker run \
Each https://github.com/martin-helmich/prometheus-nginxlog-exporter/releases[release]
from 1.5.1 or newer provides both DEB and RPM packages.
$ wget https://github.com/martin-helmich/prometheus-nginxlog-exporter/releases/download/v1.8.0/prometheus-nginxlog-exporter_1.8.0_linux_amd64.deb
DEB:
$ wget https://github.com/martin-helmich/prometheus-nginxlog-exporter/releases/download/v1.9.2/prometheus-nginxlog-exporter_1.9.2_linux_amd64.deb
$ apt install ./prometheus-nginxlog-exporter_1.8.0_linux_amd64.deb
RPM:
$ wget https://github.com/martin-helmich/prometheus-nginxlog-exporter/releases/download/v1.9.2/prometheus-nginxlog-exporter_1.9.2_linux_amd64.rpm
$ yum localinstall prometheus-nginxlog-exporter_1.9.2_linux_amd64.rpm
The package come with a dependency on systemd and configure the exporter to be
running automatically:
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func floatFromFieldsMulti(fields map[string]string, name string) (float64, bool,

sum := float64(0)

for _, v := range strings.Split(val, ",") {
for _, v := range strings.FieldsFunc(val, func(r rune) bool { return r == ',' || r == ':' }) {
v = strings.TrimSpace(v)

if v == "-" {
Expand Down

0 comments on commit db3ed18

Please sign in to comment.