Skip to content

Commit

Permalink
Rename director metric label and metric help text
Browse files Browse the repository at this point in the history
  • Loading branch information
haoming29 committed Jan 26, 2024
1 parent a0e51c0 commit c80e8b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions director/origin_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ func LaunchPeriodicDirectorTest(ctx context.Context, originAd ServerAd) {
log.Warningln("Failed to report director test result to origin:", err)
metrics.PelicanDirectorFileTransferTestsRuns.With(
prometheus.Labels{
"server_name": originName, "server_web_url": originWebUrl, "server_type": string(originAd.Type), "status": string(metrics.FTXTestSuccess), "report_status": string(metrics.FTXTestFailed),
"server_name": originName, "server_web_url": originWebUrl, "server_type": string(originAd.Type), "status": string(metrics.FTXTestSucceeded), "report_status": string(metrics.FTXTestFailed),
},
).Inc()
} else {
metrics.PelicanDirectorFileTransferTestsRuns.With(
prometheus.Labels{
"server_name": originName, "server_web_url": originWebUrl, "server_type": string(originAd.Type), "status": string(metrics.FTXTestSuccess), "report_status": string(metrics.FTXTestSuccess),
"server_name": originName, "server_web_url": originWebUrl, "server_type": string(originAd.Type), "status": string(metrics.FTXTestSucceeded), "report_status": string(metrics.FTXTestSucceeded),
},
).Inc()
}
Expand All @@ -187,7 +187,7 @@ func LaunchPeriodicDirectorTest(ctx context.Context, originAd ServerAd) {
} else {
metrics.PelicanDirectorFileTransferTestsRuns.With(
prometheus.Labels{
"server_name": originName, "server_web_url": originWebUrl, "server_type": string(originAd.Type), "status": string(metrics.FTXTestFailed), "report_status": string(metrics.FTXTestSuccess),
"server_name": originName, "server_web_url": originWebUrl, "server_type": string(originAd.Type), "status": string(metrics.FTXTestFailed), "report_status": string(metrics.FTXTestSucceeded),
},
).Inc()
}
Expand Down
10 changes: 5 additions & 5 deletions metrics/director.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ type (
)

const (
FTXTestSuccess DirectorFTXTestStatus = "Success"
FTXTestFailed DirectorFTXTestStatus = "Failed"
FTXTestSucceeded DirectorFTXTestStatus = "Succeeded"
FTXTestFailed DirectorFTXTestStatus = "Failed"
)

var (
PelicanDirectorFileTransferTestSuite = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "pelican_director_total_ftx_test_suite",
Help: "The number of file transfer test suite the director issued",
Help: "The total number of file transfer test suite the director issued. A new test suite is a new goroutine started at origin's advertisement to the director and is cancelled when such registration expired in director's TTL cache",
}, []string{"server_name", "server_web_url", "server_type"})

PelicanDirectorActiveFileTransferTestSuite = promauto.NewGaugeVec(prometheus.GaugeOpts{
Name: "pelican_director_active_ftx_test_suite",
Help: "The number of active director file transfer test suite",
Help: "The number of active director file transfer test suite. The number of active goroutines that executes test run",
}, []string{"server_name", "server_web_url", "server_type"})

PelicanDirectorFileTransferTestsRuns = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "pelican_director_total_ftx_test_runs",
Help: "The number of file transfer test suite director issued",
Help: "The number of file transfer test runs the director issued. A test run is a cycle of upload/download/delete test file, which is executed per 15s per origin (by defult)",
}, []string{"server_name", "server_web_url", "server_type", "status", "report_status"})
)

0 comments on commit c80e8b0

Please sign in to comment.