mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-11-04 02:35:07 +01:00 
			
		
		
		
	Derived metrics (#57)
* Add time-based derivatived (e.g. bandwidth) to some collectors * Add documentation * Add comments * Fix: Only compute rates with a valid previous state * Only compute rates with a valid previous state * Define const values for net/dev fields * Set default config values * Add comments * Refactor: Consolidate data structures * Refactor: Consolidate data structures * Refactor: Avoid struct deep copy * Refactor: Avoid redundant tag maps * Refactor: Use int64 type for absolut values Co-authored-by: Holger Obermaier <40787752+ho-ob@users.noreply.github.com>
This commit is contained in:
		@@ -5,17 +5,23 @@
 | 
			
		||||
  "netstat": {
 | 
			
		||||
    "include_devices": [
 | 
			
		||||
      "eth0"
 | 
			
		||||
    ]
 | 
			
		||||
    ],
 | 
			
		||||
    "send_abs_values" : true,
 | 
			
		||||
    "send_derived_values" : true
 | 
			
		||||
  }
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The `netstat` collector reads data from `/proc/net/dev` and outputs a handful **node** metrics. With the `include_devices` list you can specify which network devices should be measured. **Note**: Most other collectors use an _exclude_ list instead of an include list.
 | 
			
		||||
 | 
			
		||||
Metrics:
 | 
			
		||||
* `net_bytes_in` (`unit=bytes/sec`)
 | 
			
		||||
* `net_bytes_out` (`unit=bytes/sec`)
 | 
			
		||||
* `net_pkts_in` (`unit=packets/sec`)
 | 
			
		||||
* `net_pkts_out` (`unit=packets/sec`)
 | 
			
		||||
* `net_bytes_in` (`unit=bytes`)
 | 
			
		||||
* `net_bytes_out` (`unit=bytes`)
 | 
			
		||||
* `net_pkts_in` (`unit=packets`)
 | 
			
		||||
* `net_pkts_out` (`unit=packets`)
 | 
			
		||||
* `net_bytes_in_bw` (`unit=bytes/sec` if `send_derived_values == true`)
 | 
			
		||||
* `net_bytes_out_bw` (`unit=bytes/sec` if `send_derived_values == true`)
 | 
			
		||||
* `net_pkts_in_bw` (`unit=packets/sec` if `send_derived_values == true`)
 | 
			
		||||
* `net_pkts_out_bw` (`unit=packets/sec` if `send_derived_values == true`)
 | 
			
		||||
 | 
			
		||||
The device name is added as tag `device`.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user