-
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.
Graylog changed API call for quering alerts and events. Added graph for showing alerts and events. Signed-off-by: Sven Rueß <[email protected]>
- Loading branch information
1 parent
e688886
commit f90f92f
Showing
5 changed files
with
175 additions
and
77 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
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,54 @@ | ||
#!/usr/bin/env python3 | ||
|
||
""" | ||
Kuhn & Rueß GmbH | ||
Consulting and Development | ||
https://kuhn-ruess.de | ||
""" | ||
|
||
|
||
from cmk.gui.i18n import _ | ||
from cmk.gui.plugins.metrics.utils import graph_info, metric_info | ||
|
||
# . | ||
# .--Metrics-------------------------------------------------------------. | ||
# | __ __ _ _ | | ||
# | | \/ | ___| |_ _ __(_) ___ ___ | | ||
# | | |\/| |/ _ \ __| '__| |/ __/ __| | | ||
# | | | | | __/ |_| | | | (__\__ \ | | ||
# | |_| |_|\___|\__|_| |_|\___|___/ | | ||
# | | | ||
# +----------------------------------------------------------------------+ | ||
# | Definitions of metrics | | ||
# '----------------------------------------------------------------------' | ||
|
||
metric_info["graylog_alerts"] = { | ||
"title": "Total amount of alerts", | ||
"unit": "count", | ||
"color": "blue", | ||
} | ||
metric_info["graylog_events"] = { | ||
"title": "Total amount of events", | ||
"unit": "count", | ||
"color": "green", | ||
} | ||
|
||
# . | ||
# .--Graphs--------------------------------------------------------------. | ||
# | ____ _ | | ||
# | / ___|_ __ __ _ _ __ | |__ ___ | | ||
# | | | _| '__/ _` | '_ \| '_ \/ __| | | ||
# | | |_| | | | (_| | |_) | | | \__ \ | | ||
# | \____|_| \__,_| .__/|_| |_|___/ | | ||
# | |_| | | ||
# +----------------------------------------------------------------------+ | ||
# | Definitions of time series graphs | | ||
# '----------------------------------------------------------------------' | ||
|
||
graph_info["graylog_alerts"] = { | ||
"title": _("Graylog alerts and events"), | ||
"metrics": [ | ||
("graylog_alerts", "line"), | ||
("graylog_events", "line"), | ||
], | ||
} |
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
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
Oops, something went wrong.