Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for MustNewConstMetric (0.13 sec)

  1. cmd/metrics.go

    	nodesUp, nodesDown := globalNotificationSys.GetPeerOnlineCount()
    	ch <- prometheus.MustNewConstMetric(
    		prometheus.NewDesc(
    			prometheus.BuildFQName(minioNamespace, "nodes", "online"),
    			"Total number of MinIO nodes online",
    			nil, nil),
    		prometheus.GaugeValue,
    		float64(nodesUp),
    	)
    	ch <- prometheus.MustNewConstMetric(
    		prometheus.NewDesc(
    			prometheus.BuildFQName(minioNamespace, "nodes", "offline"),
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 12:04:40 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  2. cmd/metrics-v3-types.go

    			labelValues := make([]string, 0, len(v.Labels))
    			for _, k := range desc.VariableLabels {
    				labelValues = append(labelValues, v.Labels[k])
    			}
    			metrics = append(metrics,
    				prometheus.MustNewConstMetric(promDesc, desc.Type.toProm(), v.Value,
    					labelValues...))
    		}
    	}
    	return metrics
    }
    
    // Set - sets a metric value along with any provided labels. It is used only
    // with Gauge and Counter metrics.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jul 30 22:28:46 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  3. cmd/metrics-v2.go

    			if metric.Histogram == nil {
    				return true
    			}
    			for k, v := range metric.Histogram {
    				labels = append(labels, metric.HistogramBucketLabel)
    				values = append(values, k)
    				ch <- prometheus.MustNewConstMetric(
    					prometheus.NewDesc(
    						prometheus.BuildFQName(string(metric.Description.Namespace),
    							string(metric.Description.Subsystem),
    							string(metric.Description.Name)),
    						metric.Description.Help,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 12:04:40 UTC 2024
    - 131.9K bytes
    - Viewed (0)
Back to top