Skip to content

Commit

Permalink
Set ipmi sel default timeout to 24h
Browse files Browse the repository at this point in the history
  • Loading branch information
sudeephb committed Nov 17, 2023
1 parent 7efb9ef commit 7614af9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion prometheus_hardware_exporter/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
)
from .config import (
DEFAULT_CONFIG,
DEFAULT_IPMI_SEL_INTERVAL,
DEFAULT_REDFISH_CLIENT_MAX_RETRY,
DEFAULT_REDFISH_CLIENT_TIMEOUT,
DEFAULT_REDFISH_DISCOVER_CACHE_TTL,
Expand Down Expand Up @@ -70,7 +71,7 @@ def parse_command_line() -> argparse.Namespace:
parser.add_argument(
"--ipmi-sel-interval",
help="The duration for how many seconds to collect SEL records",
default=300,
default=DEFAULT_IPMI_SEL_INTERVAL,
type=int,
)
parser.add_argument(
Expand Down
3 changes: 2 additions & 1 deletion prometheus_hardware_exporter/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

DEFAULT_CONFIG = os.path.join(os.environ.get("SNAP_DATA", "./"), "config.yaml")

DEFAULT_IPMI_SEL_INTERVAL = 86400
DEFAULT_REDFISH_CLIENT_TIMEOUT = 3
DEFAULT_REDFISH_CLIENT_MAX_RETRY = 1
DEFAULT_REDFISH_DISCOVER_CACHE_TTL = 86400
Expand All @@ -25,7 +26,7 @@ class Config(BaseModel):
level: str = "DEBUG"
enable_collectors: List[str] = []

ipmi_sel_interval: int = 300
ipmi_sel_interval: int = DEFAULT_IPMI_SEL_INTERVAL

redfish_host: str = "127.0.0.1"
redfish_username: str = ""
Expand Down

0 comments on commit 7614af9

Please sign in to comment.