-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMK-20526 Change-Id: I6b642f796fabb2545dbafaf9556b780098758561
- Loading branch information
1 parent
ba3fdc4
commit 062550d
Showing
2 changed files
with
49 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright (C) 2024 Checkmk GmbH - License: GNU General Public License v2 | ||
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and | ||
# conditions defined in the file COPYING, which is part of this source code package. | ||
|
||
|
||
from cmk.ccc import version | ||
from cmk.ccc.crash_reporting import ABCCrashReport, CrashReportStore, VersionInfo | ||
|
||
from cmk.utils.paths import crash_dir, omd_root | ||
|
||
|
||
class _OMDCrashReport(ABCCrashReport[VersionInfo]): | ||
@classmethod | ||
def type(cls) -> str: | ||
return "omd" | ||
|
||
|
||
def report_crash() -> str: | ||
crash = _OMDCrashReport.from_exception(crash_dir, version.get_general_version_infos(omd_root)) | ||
CrashReportStore().save(crash) | ||
return crash.ident_to_text() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters