-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
WIP: Scrape json metrics from nginx vts #325
Conversation
@gianrubio we need two implementations, one for the default nginx status info and another for vts. This must be optional. We cannot force users to use the vts module and the default information does not contains all the information vts provides. |
@aledbf got it! I'll do that |
Don't know if this is related, but we're using this as a sidecar container here: https://github.com/hnlq715/nginx-vts-exporter So my question is, wouldn't be simplier to create a example deployment POD, with ingress + the vts exporter? |
224f748
to
23c2592
Compare
23c2592
to
39b6909
Compare
@@ -40,7 +42,10 @@ func (em exeMatcher) MatchAndName(nacl common.NameAndCmdline) (bool, string) { | |||
} | |||
|
|||
func (n *NGINXController) setupMonitor(args []string) { | |||
pc, err := newProcessCollector(true, exeMatcher{"nginx", args}) | |||
var enableVts = true |
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.
@aledbf when the nginxController starts the configmap are empty. Could I change the enable-vts-metrics from annotation to an argument?
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.
@gianrubio please no. Keep in mind we must support to switch the implementation if the enable-vts-metrics
value is updated in the configmap.
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.
Ok, so what method is the recommend to call the setupMonitor? Is the reload method?
func (n NGINXController) Reload(data []byte) ([]byte, bool, error) {
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.
@gianrubio I think after this line is the most appropriate place.
39b6909
to
8eced17
Compare
Coverage decreased (-1.3%) to 44.452% when pulling 8eced17aca208af5fab12e7dab3813a9c498f60d on gianrubio:ngx-vts-prometheus into 0aabfba on kubernetes:master. |
Coverage decreased (-1.4%) to 44.416% when pulling 645509e80102a5c295029e3d66cea033cca6f23a on gianrubio:ngx-vts-prometheus into 0aabfba on kubernetes:master. |
645509e
to
951cd26
Compare
10b7de2
to
3fc59b9
Compare
upgrade vts to the latest version
3fc59b9
to
6db5c9e
Compare
@aledbf could you review again? |
This PR add the ability to ingress scrape nginx-vts and convert json format to prometheus. I'm still working on this, it's one of my firsts golang codes so reviews are welcome.
Screenshot
TODO
Fixes #72, #305, #239