pub is not a project
This commit is contained in:
parent
6253b9f9b4
commit
23e6cebfba
2
nginx.go
2
nginx.go
|
@ -57,7 +57,7 @@ func (e *NginxExporter) Collect(ch chan<- prometheus.Metric) {
|
|||
e.error_responses.Collect(ch)
|
||||
}
|
||||
|
||||
var nginxProjectRe = regexp.MustCompile("(?i)^\\w+ /([^/?]+)/[^\\s]* HTTP")
|
||||
var nginxProjectRe = regexp.MustCompile("(?i)^\\w+ /(?:pub/)?([^/?]+)/[^\\s]* HTTP")
|
||||
|
||||
func (e *NginxExporter) processLogLine(line string) {
|
||||
lineReader := strings.NewReader(line)
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
func IsMirroredProject(project string) bool {
|
||||
if _, err := os.Stat(fmt.Sprintf("/mirror/root/%s", project)); err == nil {
|
||||
return true
|
||||
return project != "pub"
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue