Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for MustNewConstMetric (0.2 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"),
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 02 06:48:36 GMT 2024
    - 16.9K 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.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 14.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,
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 11 21:22:15 GMT 2024
    - 132.1K bytes
    - Viewed (0)
Back to top