Add support for exporting exitcode of script as metric #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Unit tests passed successfully
git clone https://github.com/Rory898/script_exporter.git
Cloning into 'script_exporter'...
cd script_exporter
go test
go: downloading github.com/prometheus/client_golang v1.5.1
go: downloading github.com/prometheus/common v0.9.1
go: downloading gopkg.in/yaml.v2 v2.2.8
go: downloading gopkg.in/alecthomas/kingpin.v2 v2.2.6
go: downloading github.com/sirupsen/logrus v1.4.2
go: downloading golang.org/x/sys v0.0.0-20200331124033-c3d80250170d
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading github.com/golang/protobuf v1.3.5
go: downloading github.com/cespare/xxhash/v2 v2.1.1
go: downloading github.com/prometheus/procfs v0.0.11
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
go: downloading github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d
time="2020-07-20T11:18:08Z" level=info msg="ERROR: failure: exit status 1 (failed after 0.001056s)." source="script_exporter.go:91"
time="2020-07-20T11:18:10Z" level=info msg="ERROR: timeout: signal: killed (failed after 2.000578s)." source="script_exporter.go:91"
PASS