mirror of
				https://github.com/prometheus/node_exporter.git
				synced 2025-08-20 18:33:52 -07:00 
			
		
		
		
	AIX: Remove redundant disk blocks metric, fix times
Signed-off-by: Johannes Ziemke <github@5pi.de> Signed-off-by: Shashwat Hiregoudar <shashwat.h@flipkart.com>
This commit is contained in:
		
							parent
							
								
									ed39f60612
								
							
						
					
					
						commit
						c230ccfef9
					
				| 
						 | 
				
			
			@ -33,9 +33,6 @@ type diskstatsCollector struct {
 | 
			
		|||
	bsize  typedDesc
 | 
			
		||||
	qdepth typedDesc
 | 
			
		||||
 | 
			
		||||
	rblks typedDesc
 | 
			
		||||
	wblks typedDesc
 | 
			
		||||
 | 
			
		||||
	rserv typedDesc
 | 
			
		||||
	wserv typedDesc
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -84,22 +81,6 @@ func NewDiskstatsCollector(logger *slog.Logger) (Collector, error) {
 | 
			
		|||
			),
 | 
			
		||||
			prometheus.GaugeValue,
 | 
			
		||||
		},
 | 
			
		||||
		rblks: typedDesc{
 | 
			
		||||
			prometheus.NewDesc(
 | 
			
		||||
				prometheus.BuildFQName(namespace, diskSubsystem, "read_blocks_total"),
 | 
			
		||||
				"The total number of read blocks.",
 | 
			
		||||
				diskLabelNames, nil,
 | 
			
		||||
			),
 | 
			
		||||
			prometheus.CounterValue,
 | 
			
		||||
		},
 | 
			
		||||
		wblks: typedDesc{
 | 
			
		||||
			prometheus.NewDesc(
 | 
			
		||||
				prometheus.BuildFQName(namespace, diskSubsystem, "written_blocks_total"),
 | 
			
		||||
				"The total number of written blocks.",
 | 
			
		||||
				diskLabelNames, nil,
 | 
			
		||||
			),
 | 
			
		||||
			prometheus.CounterValue,
 | 
			
		||||
		},
 | 
			
		||||
		rserv: typedDesc{
 | 
			
		||||
			prometheus.NewDesc(
 | 
			
		||||
				prometheus.BuildFQName(namespace, diskSubsystem, "read_time_seconds_total"),
 | 
			
		||||
| 
						 | 
				
			
			@ -151,14 +132,12 @@ func (c *diskstatsCollector) Update(ch chan<- prometheus.Metric) error {
 | 
			
		|||
		}
 | 
			
		||||
		ch <- c.rbytes.mustNewConstMetric(float64(stat.Rblks*512), stat.Name)
 | 
			
		||||
		ch <- c.wbytes.mustNewConstMetric(float64(stat.Wblks*512), stat.Name)
 | 
			
		||||
		ch <- c.time.mustNewConstMetric(float64(stat.Time)/c.tickPerSecond, stat.Name)
 | 
			
		||||
		ch <- c.time.mustNewConstMetric(float64(stat.Time)/float64(c.tickPerSecond), stat.Name)
 | 
			
		||||
 | 
			
		||||
		ch <- c.bsize.mustNewConstMetric(float64(stat.BSize), stat.Name)
 | 
			
		||||
		ch <- c.qdepth.mustNewConstMetric(float64(stat.QDepth), stat.Name)
 | 
			
		||||
		ch <- c.rblks.mustNewConstMetric(float64(stat.Rblks), stat.Name)
 | 
			
		||||
		ch <- c.wblks.mustNewConstMetric(float64(stat.Wblks), stat.Name)
 | 
			
		||||
		ch <- c.rserv.mustNewConstMetric(float64(stat.Rserv)/c.tickPerSecond, stat.Name)
 | 
			
		||||
		ch <- c.wserv.mustNewConstMetric(float64(stat.Wserv)/c.tickPerSecond, stat.Name)
 | 
			
		||||
		ch <- c.rserv.mustNewConstMetric(float64(stat.Rserv)/1e9, stat.Name)
 | 
			
		||||
		ch <- c.wserv.mustNewConstMetric(float64(stat.Wserv)/1e9, stat.Name)
 | 
			
		||||
		ch <- c.xfers.mustNewConstMetric(float64(stat.Xfers), stat.Name)
 | 
			
		||||
		ch <- c.xrate.mustNewConstMetric(float64(stat.XRate), stat.Name)
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue