Skip to content
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

Add PidFile option #760

Closed
SuperQ opened this issue May 26, 2020 · 7 comments
Closed

Add PidFile option #760

SuperQ opened this issue May 26, 2020 · 7 comments

Comments

@SuperQ
Copy link
Member

SuperQ commented May 26, 2020

A common way to use prometheus.NewProcessCollector() is to use a PidFn that reads a the PID from a file.

It would be nice to have PidFile as a first-class feature. Or maybe include a NewPidFileFn() helper.

@sbookworm
Copy link
Contributor

Hope to help, but I don't know how to implement the feature, could you give me some advice? thanks

@beorn7
Copy link
Member

beorn7 commented Sep 7, 2020

Happy to give some pointers. But you need to ask me for something more specific @sbookworm .

@SuperQ for a starter, perhaps you could point to code using NewProcessCollector that reads from a PID file? That code needed to be pulled into the library here.

@SuperQ
Copy link
Member Author

SuperQ commented Sep 7, 2020

Sure, we have something like this in the haproxy_exporter code.

@sbookworm
Copy link
Contributor

@SuperQ @beorn7 thanks, Let me try.

@sbookworm
Copy link
Contributor

@SuperQ sorry to bother, :)
my action:
1, create a new branch
2, changed the code and commit
3, git push origin my_branch_name

facing ERROR: Permission to prometheus/client_golang.git denied to sbookworm.
Should I apply the access for submitting code?

@beorn7
Copy link
Member

beorn7 commented Oct 9, 2020

You have to fork this repository and work in your own fork. From there, you can create a PR for this repo.

You could search for tutorials how to contribute to OSS projects on GitHub. For example, https://parbhatpuri.com/git-workflow-to-contribute-to-an-open-source-project.html might be a good starter (just googled that, did not check if it is particularly good).

@sbookworm
Copy link
Contributor

@beorn7 thanks very much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants