mirror of
https://github.com/prometheus-community/ipmi_exporter
synced 2025-01-12 18:01:03 +00:00
Merge pull request #22 from soundcloud/bitfehler/timeout
Allow setting the session timeout
This commit is contained in:
commit
f2e4ae38ce
@ -187,6 +187,10 @@ func freeipmiConfig(config IPMIConfig) string {
|
||||
if config.Password != "" {
|
||||
fmt.Fprintf(&b, "password %s\n", config.Password)
|
||||
}
|
||||
if config.Timeout != 0 {
|
||||
fmt.Fprintf(&b, "session-timeout %d\n", config.Timeout)
|
||||
}
|
||||
fmt.Println(b.String())
|
||||
return b.String()
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ type IPMIConfig struct {
|
||||
Password string `yaml:"pass"`
|
||||
Privilege string `yaml:"privilege"`
|
||||
Driver string `yaml:"driver"`
|
||||
Timeout uint32 `yaml:"timeout"`
|
||||
Collectors []string `yaml:"collectors"`
|
||||
ExcludeSensorIDs []int64 `yaml:"exclude_sensor_ids"`
|
||||
|
||||
|
@ -12,8 +12,14 @@ modules:
|
||||
# module=default is specified.
|
||||
user: "default_user"
|
||||
pass: "example_pw"
|
||||
# The below settings correspond to driver-type, privilege-level, and
|
||||
# session-timeout respectively, see `man 5 freeipmi.conf`.
|
||||
driver: "LAN_2_0"
|
||||
privilege: "user"
|
||||
# The session timeout is in milliseconds. Note that a scrape can take up
|
||||
# to (session-timeout * #-of-collectors) milliseconds, so set the scrape
|
||||
# timeout in Prometheus accordingly.
|
||||
timeout: 10000
|
||||
# Available collectors are bmc, ipmi, and dcmi
|
||||
# If not specified, all three are used
|
||||
collectors:
|
||||
|
Loading…
Reference in New Issue
Block a user