pub is not a project

This commit is contained in:
Zachary Seguin 2017-06-21 18:52:10 -04:00
parent 6253b9f9b4
commit 23e6cebfba
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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
}