|
|
|
@ -30,7 +30,7 @@ func NewProftpdExporter(transferLogPath string) (*ProftpdExporter, error) {
|
|
|
|
|
prometheus.SummaryOpts{ |
|
|
|
|
Namespace: Namespace, |
|
|
|
|
Subsystem: subsystem, |
|
|
|
|
Name: "responses", |
|
|
|
|
Name: "responses_sent_bytes", |
|
|
|
|
Help: "Summary of FTP responses", |
|
|
|
|
}, |
|
|
|
|
[]string{"project", "network", "protocol"}), |
|
|
|
@ -38,7 +38,7 @@ func NewProftpdExporter(transferLogPath string) (*ProftpdExporter, error) {
|
|
|
|
|
prometheus.SummaryOpts{ |
|
|
|
|
Namespace: Namespace, |
|
|
|
|
Subsystem: subsystem, |
|
|
|
|
Name: "error_responses", |
|
|
|
|
Name: "error_responses_sent_bytes", |
|
|
|
|
Help: "Summary of error FTP responses", |
|
|
|
|
}, |
|
|
|
|
[]string{"project", "network", "protocol"}), |
|
|
|
@ -121,10 +121,12 @@ func (e *ProftpdExporter) processLogLine(line string) {
|
|
|
|
|
// Increment totals
|
|
|
|
|
e.responses.With(labels).Observe(size) |
|
|
|
|
|
|
|
|
|
// Ensure an error version is created
|
|
|
|
|
errorObserver := e.error_responses.With(labels) |
|
|
|
|
|
|
|
|
|
if !success { |
|
|
|
|
e.error_responses.With(labels).Observe(size) |
|
|
|
|
errorObserver.Observe(size) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (e *ProftpdExporter) Monitor() { |
|
|
|
|