Merge pull request #58 from gianrubio/branch/invalid-port
Fix "invalid port in upstream" on nginx controller
This commit is contained in:
commit
825a4a60ad
2 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ func (em exeMatcher) MatchAndName(nacl common.NameAndCmdline) (bool, string) {
|
|||
func (n *NGINXController) setupMonitor(args []string) {
|
||||
pc, err := newProcessCollector(true, exeMatcher{"nginx", args})
|
||||
if err != nil {
|
||||
glog.Fatalf("unexpedted error registering nginx collector: %v", err)
|
||||
glog.Fatalf("unexpected error registering nginx collector: %v", err)
|
||||
}
|
||||
err = prometheus.Register(pc)
|
||||
if err != nil {
|
||||
|
|
|
@ -982,7 +982,7 @@ func (ic *GenericController) getEndpoints(
|
|||
}
|
||||
|
||||
// check for invalid port value
|
||||
if targetPort == -1 {
|
||||
if targetPort <=0 {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue