Fix systemd example for configuring nginx_exporter.service
by bruno-espino · Pull Request #650 · nginx/nginx-prometheus-exporter (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
jjngx merged 2 commits intonginx:mainfrombruno-espino:fix/systemd-example
Jun 21, 2024
Conversation5 Commits2 Checks12 Files changed
Conversation
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
[ Show hidden characters]({{ revealButtonHref }})
when implementing nginx exporter, I used the example under examples/systemd
but I was not seeing my nginx stub metrics.
When enabling journal logging for the service and checking with systemctl status nginx_exporter -l
I could see the nginx.scrape-uri
was not being parsed correctly. Hence why I couldn't see my stub metrics.
After removing both ""
I was able to see my metrics
Checklist
Before creating a PR, run through this checklist and mark each as complete.
- I have read the CONTRIBUTING
guide - I have proven my fix is effective or that my feature works
- I have checked that all unit tests pass after adding my changes
- I have ensured the README is up to date
- I have rebased my branch onto main
- I will ensure my PR is targeting the main branch and pulling from my branch on my own fork
when implementing nginx exporter, I was not seeing my nginx stub metrics. When enabling journal logging for the service and checking with "systemctl status nginx_exporter -l" I could see the nginx.scrape-uri was not being parsed correctly. Hency why I couldn't see my stub metrics. After removing both "" I was able to see my metrics
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bruno-espino thanks for opening the PR!
Just out of curiosity, which OS/version are you using? I tried this on Ubuntu 23.10 and it's not complaining about the quotes, it's just stripping them out...
Hi @bruno-espino thanks for opening the PR!
Just out of curiosity, which OS/version are you using? I tried this on Ubuntu 23.10 and it's not complaining about the quotes, it's just stripping them out...
Hey @lucacome!
I faced this issue on Amazon Linux 2, with systemd version 219
Maybe it's not the OS but the systemd version, which is quite old and might not support the quotes for parsing
lucacome added documentation
Pull requests/issues for documentation
and removed bug
An issue reporting a potential bug
labels
This was referenced
Jul 28, 2024
Labels
Issues or PRs opened by an external contributor
Pull requests/issues for documentation