github.com/cs3org/reva/v2@v2.27.7/pkg/rhttp/datatx/metrics/metrics.go (about) 1 // Package metrics provides prometheus metrics for the data managers.. 2 package metrics 3 4 import ( 5 "github.com/prometheus/client_golang/prometheus" 6 "github.com/prometheus/client_golang/prometheus/promauto" 7 ) 8 9 var ( 10 // DownloadsActive is the number of active downloads 11 DownloadsActive = promauto.NewGauge(prometheus.GaugeOpts{ 12 Name: "reva_download_active", 13 Help: "Number of active downloads", 14 }) 15 // UploadsActive is the number of active uploads 16 UploadsActive = promauto.NewGauge(prometheus.GaugeOpts{ 17 Name: "reva_upload_active", 18 Help: "Number of active uploads", 19 }) 20 // UploadProcessing is the number of uploads in processing 21 UploadProcessing = promauto.NewGauge(prometheus.GaugeOpts{ 22 Name: "reva_upload_processing", 23 Help: "Number of uploads in processing", 24 }) 25 // UploadSessionsInitiated is the number of upload sessions that have been initiated 26 UploadSessionsInitiated = promauto.NewCounter(prometheus.CounterOpts{ 27 Name: "reva_upload_sessions_initiated", 28 Help: "Number of uploads sessions that were initiated", 29 }) 30 // UploadSessionsBytesReceived is the number of upload sessions that have received all bytes 31 UploadSessionsBytesReceived = promauto.NewCounter(prometheus.CounterOpts{ 32 Name: "reva_upload_sessions_bytes_received", 33 Help: "Number of uploads sessions that have received all bytes", 34 }) 35 // UploadSessionsFinalized is the number of upload sessions that have received all bytes 36 UploadSessionsFinalized = promauto.NewCounter(prometheus.CounterOpts{ 37 Name: "reva_upload_sessions_finalized", 38 Help: "Number of uploads sessions that have successfully completed", 39 }) 40 // UploadSessionsAborted is the number of upload sessions that have been aborted 41 UploadSessionsAborted = promauto.NewCounter(prometheus.CounterOpts{ 42 Name: "reva_upload_sessions_aborted", 43 Help: "Number of uploads sessions that have aborted by postprocessing", 44 }) 45 // UploadSessionsDeleted is the number of upload sessions that have been deleted 46 UploadSessionsDeleted = promauto.NewCounter(prometheus.CounterOpts{ 47 Name: "reva_upload_sessions_deleted", 48 Help: "Number of uploads sessions that have been deleted by postprocessing", 49 }) 50 // UploadSessionsRestarted is the number of upload sessions that have been restarted 51 UploadSessionsRestarted = promauto.NewCounter(prometheus.CounterOpts{ 52 Name: "reva_upload_sessions_restarted", 53 Help: "Number of uploads sessions that have been restarted by postprocessing", 54 }) 55 // UploadSessionsScanned is the number of upload sessions that have been scanned by antivirus 56 UploadSessionsScanned = promauto.NewCounter(prometheus.CounterOpts{ 57 Name: "reva_upload_sessions_scanned", 58 Help: "Number of uploads sessions that have been scanned by antivirus", 59 }) 60 )