Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for GetPeerOnlineCount (0.25 sec)

  1. cmd/metrics-v3-cache.go

    type nodesOnline struct {
    	Online, Offline int
    }
    
    func newNodesUpDownCache() *cachevalue.Cache[nodesOnline] {
    	loadNodesUpDown := func() (v nodesOnline, err error) {
    		v.Online, v.Offline = globalNotificationSys.GetPeerOnlineCount()
    		return
    	}
    	return cachevalue.NewFromFunc(1*time.Minute,
    		cachevalue.Opts{ReturnLastGood: true},
    		loadNodesUpDown)
    }
    
    type driveIOStatMetrics struct {
    	readsPerSec    float64
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 23:56:12 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  2. cmd/notification.go

    	if len(peerClients) == 0 {
    		return nil
    	}
    	idx := xxhash.Sum64String(s) % uint64(len(peerClients))
    	return peerClients[idx]
    }
    
    // GetPeerOnlineCount gets the count of online and offline nodes.
    func (sys *NotificationSys) GetPeerOnlineCount() (nodesOnline, nodesOffline int) {
    	nodesOnline = 1 // Self is always online.
    	nodesOffline = 0
    	nodesOnlineIndex := make([]bool, len(sys.peerClients))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 12 18:13:36 GMT 2024
    - 44.5K bytes
    - Viewed (0)
  3. cmd/metrics.go

    	networkMetricsPrometheus(ch)
    	httpMetricsPrometheus(ch)
    	healingMetricsPrometheus(ch)
    }
    
    func nodeHealthMetricsPrometheus(ch chan<- prometheus.Metric) {
    	nodesUp, nodesDown := globalNotificationSys.GetPeerOnlineCount()
    	ch <- prometheus.MustNewConstMetric(
    		prometheus.NewDesc(
    			prometheus.BuildFQName(minioNamespace, "nodes", "online"),
    			"Total number of MinIO nodes online",
    			nil, nil),
    		prometheus.GaugeValue,
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 02 06:48:36 GMT 2024
    - 16.9K bytes
    - Viewed (0)
  4. cmd/metrics-v2.go

    		metricsGroupOpts: opts,
    	}
    	mg.RegisterRead(func(_ context.Context) (metrics []MetricV2) {
    		metrics = make([]MetricV2, 0, 16)
    		nodesUp, nodesDown := globalNotificationSys.GetPeerOnlineCount()
    		metrics = append(metrics, MetricV2{
    			Description: getNodeOnlineTotalMD(),
    			Value:       float64(nodesUp),
    		})
    		metrics = append(metrics, MetricV2{
    			Description: getNodeOfflineTotalMD(),
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 25 22:01:31 GMT 2024
    - 132.6K bytes
    - Viewed (0)
Back to top