File tree 5 files changed +36
-9
lines changed
5 files changed +36
-9
lines changed Original file line number Diff line number Diff line change
1
+ ARG ARCH="amd64"
2
+ ARG OS="linux"
3
+ FROM quay.io/prometheus/busybox-${OS}-${ARCH}:glibc
4
+ LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"
5
+
6
+ ARG ARCH="amd64"
7
+ ARG OS="linux"
8
+ COPY .build/${OS}-${ARCH}/json_exporter /bin/json_exporter
9
+
10
+ EXPOSE 7979
11
+ USER nobody
12
+ ENTRYPOINT [ "/bin/bind_exporter" ]
Original file line number Diff line number Diff line change 3
3
4
4
# Needs to be defined before including Makefile.common to auto-generate targets
5
5
DOCKER_ARCHS ?= amd64 armv7 arm64 ppc64le
6
+ DOCKER_REPO ?= prometheuscommunity
6
7
7
8
include Makefile.common
8
9
Original file line number Diff line number Diff line change 1
1
json_exporter
2
2
========================
3
+ [ ![ CircleCI] ( https://circleci.com/gh/prometheus-community/json_exporter.svg?style=svg )] ( https://circleci.com/gh/prometheus-community/json_exporter )
3
4
4
5
A [ prometheus] ( https://prometheus.io/ ) exporter which scrapes remote JSON by JSONPath.
5
6
6
- Build
7
- =====
7
+ # Build
8
+
8
9
``` sh
9
- ./gow get .
10
- ./gow build -o json_exporter .
10
+ make build
11
11
```
12
12
13
- Example Usage
14
- =============
13
+ # Example Usage
14
+
15
15
``` sh
16
16
$ cat example/data.json
17
17
{
@@ -68,7 +68,16 @@ example_value_count{environment="beta",id="id-A"} 1
68
68
example_value_count{environment=" beta" ,id=" id-C" } 3
69
69
```
70
70
71
- See Also
72
- ========
71
+ # Docker
72
+
73
+ ``` console
74
+ docker run \
75
+ -v config.yml:/config.yml
76
+ json_exporter \
77
+ http://example.com/target.json \
78
+ /config.yml
79
+ ```
80
+
81
+ # See Also
73
82
- [ kawamuray/jsonpath] ( https://github.com/kawamuray/jsonpath#path-syntax ) : For syntax reference of JSONPath.
74
83
Originally forked from nicksardo/jsonpath(now is https://github.com/NodePrime/jsonpath ).
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ require (
8
8
github.com/kawamuray/jsonpath v0.0.0-20160208140654-5c448ebf9735
9
9
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
10
10
github.com/prometheus/client_golang v1.5.1
11
+ github.com/prometheus/common v0.9.1
11
12
github.com/prometheus/procfs v0.0.11 // indirect
12
13
github.com/sirupsen/logrus v1.5.0
13
14
github.com/urfave/cli v1.22.4
Original file line number Diff line number Diff line change 13
13
14
14
package jsonexporter
15
15
16
- const Version = "0.0.2"
16
+ import (
17
+ "github.com/prometheus/common/version"
18
+ )
19
+
20
+ var Version = version .Version
You can’t perform that action at this time.
0 commit comments