mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +01:00
Add documentaion for IPMI receiver
This commit is contained in:
parent
bd0105b370
commit
18bffd7c14
@ -19,16 +19,16 @@ import (
|
|||||||
type IPMIReceiverClientConfig struct {
|
type IPMIReceiverClientConfig struct {
|
||||||
|
|
||||||
// Hostname the IPMI service belongs to
|
// Hostname the IPMI service belongs to
|
||||||
Protocol string
|
Protocol string // Protocol / tool to use for IPMI sensor reading
|
||||||
DriverType string
|
DriverType string // Out of band IPMI driver
|
||||||
Fanout int
|
Fanout int // Maximum number of simultaneous IPMI connections
|
||||||
NumHosts int
|
NumHosts int // Number of remote IPMI devices with the same configuration
|
||||||
IPMIHosts string
|
IPMIHosts string // List of remote IPMI devices to communicate with
|
||||||
IPMI2HostMapping map[string]string
|
IPMI2HostMapping map[string]string // Mapping between IPMI device name and host name
|
||||||
Username string
|
Username string // User name to authenticate with
|
||||||
Password string
|
Password string // Password to use for authentication
|
||||||
CLIOptions []string
|
CLIOptions []string // Additional command line options for ipmi-sensors
|
||||||
isExcluded map[string]bool
|
isExcluded map[string]bool // is metric excluded
|
||||||
}
|
}
|
||||||
|
|
||||||
type IPMIReceiver struct {
|
type IPMIReceiver struct {
|
||||||
@ -178,7 +178,6 @@ func (r *IPMIReceiver) doReadMetric() {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
r.sink <- y
|
r.sink <- y
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for command end
|
// Wait for command end
|
||||||
@ -249,29 +248,30 @@ func NewIPMIReceiver(name string, config json.RawMessage) (Receiver, error) {
|
|||||||
configJSON := struct {
|
configJSON := struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
|
|
||||||
// Maximum number of simultaneous IPMI connections (default: 64)
|
|
||||||
Fanout int `json:"fanout,omitempty"`
|
|
||||||
// Out of band IPMI driver (default: LAN_2_0)
|
|
||||||
DriverType string `json:"driver_type,omitempty"`
|
|
||||||
|
|
||||||
// How often the IPMI sensor metrics should be read and send to the sink (default: 30 s)
|
// How often the IPMI sensor metrics should be read and send to the sink (default: 30 s)
|
||||||
IntervalString string `json:"interval,omitempty"`
|
IntervalString string `json:"interval,omitempty"`
|
||||||
|
|
||||||
|
// Maximum number of simultaneous IPMI connections (default: 64)
|
||||||
|
Fanout int `json:"fanout,omitempty"`
|
||||||
|
|
||||||
|
// Out of band IPMI driver (default: LAN_2_0)
|
||||||
|
DriverType string `json:"driver_type,omitempty"`
|
||||||
|
|
||||||
// Default client username, password and endpoint
|
// Default client username, password and endpoint
|
||||||
Username *string `json:"username"` // User name to authenticate with
|
Username *string `json:"username"` // User name to authenticate with
|
||||||
Password *string `json:"password"` // Password to use for authentication
|
Password *string `json:"password"` // Password to use for authentication
|
||||||
Endpoint *string `json:"endpoint"` // URL of the IPMI service
|
Endpoint *string `json:"endpoint"` // URL of the IPMI device
|
||||||
|
|
||||||
// Globally excluded metrics
|
// Globally excluded metrics
|
||||||
ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
|
ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
|
||||||
|
|
||||||
ClientConfigs []struct {
|
ClientConfigs []struct {
|
||||||
Endpoint *string `json:"endpoint"` // URL of the IPMI service
|
|
||||||
Fanout int `json:"fanout,omitempty"` // Maximum number of simultaneous IPMI connections (default: 64)
|
Fanout int `json:"fanout,omitempty"` // Maximum number of simultaneous IPMI connections (default: 64)
|
||||||
DriverType string `json:"driver_type,omitempty"` // Out of band IPMI driver (default: LAN_2_0)
|
DriverType string `json:"driver_type,omitempty"` // Out of band IPMI driver (default: LAN_2_0)
|
||||||
HostList []string `json:"host_list"` // List of hosts with the same client configuration
|
HostList []string `json:"host_list"` // List of hosts with the same client configuration
|
||||||
Username *string `json:"username"` // User name to authenticate with
|
Username *string `json:"username"` // User name to authenticate with
|
||||||
Password *string `json:"password"` // Password to use for authentication
|
Password *string `json:"password"` // Password to use for authentication
|
||||||
|
Endpoint *string `json:"endpoint"` // URL of the IPMI service
|
||||||
|
|
||||||
// Per client excluded metrics
|
// Per client excluded metrics
|
||||||
ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
|
ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
|
||||||
|
48
receivers/ipmiReceiver.md
Normal file
48
receivers/ipmiReceiver.md
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
## IPMI Receiver
|
||||||
|
|
||||||
|
The IPMI Receiver uses `ipmi-sensors` from the [FreeIPMI](https://www.gnu.org/software/freeipmi/) project to read IPMI sensor readings and sensor data repository (SDR) information. The available metrics depend on the sensors provided by the hardware vendor but typically contain temperature, fan speed, voltage and power metrics.
|
||||||
|
|
||||||
|
### Configuration structure
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"<IPMI receiver name>": {
|
||||||
|
"type": "ipmi",
|
||||||
|
"interval": "30s",
|
||||||
|
"fanout": 256,
|
||||||
|
"username": "<Username>",
|
||||||
|
"password": "<Password>",
|
||||||
|
"endpoint": "ipmi-sensors://%h-p",
|
||||||
|
"exclude_metrics": [ "fan_speed", "voltage" ],
|
||||||
|
"client_config": [
|
||||||
|
{
|
||||||
|
"host_list": ["n1", "n2", "n3", "n4" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"host_list": [ "n5", "n6" ],
|
||||||
|
"driver_type": "LAN",
|
||||||
|
"cli_options": [ "--workaround-flags=..." ],
|
||||||
|
"password": "<Password 2>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Global settings:
|
||||||
|
|
||||||
|
- `interval`: How often the IPMI sensor metrics should be read and send to the sink (default: 30 s)
|
||||||
|
|
||||||
|
Global and per IPMI device settings (per IPMI device settings overwrite the global settings):
|
||||||
|
|
||||||
|
- `exclude_metrics`: list of excluded metrics e.g. fan_speed, power, temperature, utilization, voltage
|
||||||
|
- `fanout`: Maximum number of simultaneous IPMI connections (default: 64)
|
||||||
|
- `driver_type`: Out of band IPMI driver (default: LAN_2_0)
|
||||||
|
- `username`: User name to authenticate with
|
||||||
|
- `password`: Password to use for authentication
|
||||||
|
- `endpoint`: URL of the IPMI device (placeholder `%h` gets replaced by the hostname)
|
||||||
|
|
||||||
|
Per IPMI device settings:
|
||||||
|
|
||||||
|
- `host_list`: List of hosts with the same client configuration
|
||||||
|
- `cli_options`: Additional command line options for ipmi-sensors
|
Loading…
Reference in New Issue
Block a user