Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set ipmi sel default timeout to 24h #50

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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