forked from ncabatoff/process-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
chore: update #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dennisme
wants to merge
1
commit into
master
Choose a base branch
from
dennisme/update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,14 +20,14 @@ install via [docker](https://hub.docker.com/r/ncabatoff/process-exporter/). | |||||
|
|
||||||
| Usage: | ||||||
|
|
||||||
| ``` | ||||||
| process-exporter [options] -config.path filename.yml | ||||||
| ```bash | ||||||
| process-exporter [options] -config.path filename.yml | ||||||
| ``` | ||||||
|
|
||||||
| or via docker: | ||||||
|
|
||||||
| ``` | ||||||
| docker run -d --rm -p 9256:9256 --privileged -v /proc:/host/proc -v `pwd`:/config ncabatoff/process-exporter --procfs /host/proc -config.path /config/filename.yml | ||||||
| ```bash | ||||||
| docker run -d --rm -p 9256:9256 --privileged -v /proc:/host/proc -v `pwd`:/config ncabatoff/process-exporter --procfs /host/proc -config.path /config/filename.yml | ||||||
|
|
||||||
| ``` | ||||||
|
|
||||||
|
|
@@ -318,7 +318,7 @@ The extra label `state` can have these values: `Running`, `Sleeping`, `Waiting`, | |||||
|
|
||||||
| ## Group Thread Metrics | ||||||
|
|
||||||
| Since publishing thread metrics adds a lot of overhead, use the `-threads` command-line argument to disable them, | ||||||
| Since publishing thread metrics adds a lot of overhead, use the `-threads` command-line argument to disable them, | ||||||
| if necessary. | ||||||
|
|
||||||
| All these metrics start with `namedprocess_namegroup_` and have at minimum | ||||||
|
|
@@ -367,17 +367,19 @@ minimal: each time a scrape occurs, it will parse of /proc/$pid/stat and | |||||
|
|
||||||
| ## Dashboards | ||||||
|
|
||||||
| An example Grafana dashboard to view the metrics is available at https://grafana.net/dashboards/249 | ||||||
| An example Grafana dashboard to view the metrics is available at https://grafana.com/grafana/dashboards/249-named-processes/ | ||||||
|
|
||||||
| ## Building | ||||||
|
|
||||||
| Requires Go 1.13 installed. | ||||||
| Requires Go 1.21 installed. | ||||||
| ``` | ||||||
| make | ||||||
| ``` | ||||||
|
|
||||||
| ## Exposing metrics through HTTPS | ||||||
|
|
||||||
| Process exporter supports TLS and basic auth through using the --web.config.file format described below and in the [exporter-toolkit repository](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md). | ||||||
|
|
||||||
| web-config.yml | ||||||
| ``` | ||||||
| # Minimal TLS configuration example. Additionally, a certificate and a key file | ||||||
|
|
@@ -386,8 +388,10 @@ tls_server_config: | |||||
| cert_file: server.crt | ||||||
| key_file: server.key | ||||||
| ``` | ||||||
|
|
||||||
| Running | ||||||
| ``` | ||||||
|
|
||||||
| $ ./process-exporter -web.config.file web-config.yml & | ||||||
| $ curl -sk https://localhost:9256/metrics | grep process | ||||||
|
|
||||||
|
|
@@ -414,4 +418,4 @@ process_max_fds 1.048576e+06 | |||||
| process_open_fds 10 | ||||||
| ``` | ||||||
|
|
||||||
| For further information about TLS configuration, please visit: [exporter-toolkit](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md) | ||||||
| For further information about TLS configuration, please visit: [exporter-toolkit](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md) | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,42 @@ | ||
| module github.com/ncabatoff/process-exporter | ||
|
|
||
| go 1.13 | ||
| go 1.21.0 | ||
|
|
||
| require ( | ||
| github.com/google/go-cmp v0.5.6 | ||
| github.com/kr/pretty v0.3.0 // indirect | ||
| github.com/alecthomas/kingpin/v2 v2.4.0 | ||
| github.com/google/go-cmp v0.6.0 | ||
| github.com/ncabatoff/fakescraper v0.0.0-20201102132415-4b37ba603d65 | ||
| github.com/ncabatoff/go-seq v0.0.0-20180805175032-b08ef85ed833 | ||
| github.com/prometheus/client_golang v1.11.0 | ||
| github.com/prometheus/common v0.29.0 | ||
| github.com/prometheus/exporter-toolkit v0.7.0 | ||
| github.com/prometheus/procfs v0.7.3 | ||
| github.com/rogpeppe/go-internal v1.8.0 // indirect | ||
| github.com/prometheus/client_golang v1.18.0 | ||
| github.com/prometheus/common v0.46.0 | ||
| github.com/prometheus/exporter-toolkit v0.11.0 | ||
| github.com/prometheus/procfs v0.12.0 | ||
| golang.org/x/sys v0.16.0 | ||
| gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c | ||
| gopkg.in/yaml.v2 v2.4.0 | ||
| ) | ||
|
|
||
| require ( | ||
| github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect | ||
| github.com/beorn7/perks v1.0.1 // indirect | ||
| github.com/cespare/xxhash/v2 v2.2.0 // indirect | ||
| github.com/coreos/go-systemd/v22 v22.5.0 // indirect | ||
| github.com/go-kit/log v0.2.1 // indirect | ||
| github.com/go-logfmt/logfmt v0.5.1 // indirect | ||
| github.com/golang/protobuf v1.5.3 // indirect | ||
| github.com/jpillora/backoff v1.0.0 // indirect | ||
| github.com/kr/pretty v0.3.1 // indirect | ||
| github.com/kr/text v0.2.0 // indirect | ||
| github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect | ||
| github.com/prometheus/client_model v0.5.0 // indirect | ||
| github.com/rogpeppe/go-internal v1.10.0 // indirect | ||
| github.com/stretchr/testify v1.8.4 // indirect | ||
| github.com/xhit/go-str2duration/v2 v2.1.0 // indirect | ||
| golang.org/x/crypto v0.18.0 // indirect | ||
| golang.org/x/net v0.20.0 // indirect | ||
| golang.org/x/oauth2 v0.16.0 // indirect | ||
| golang.org/x/sync v0.5.0 // indirect | ||
| golang.org/x/text v0.14.0 // indirect | ||
| google.golang.org/appengine v1.6.7 // indirect | ||
| google.golang.org/protobuf v1.32.0 // indirect | ||
| ) |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
permalink