Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit 02b14f56 authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

update project

parent 6b5effa0
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# 2021-08-14: rewritten for CMK 2.0 # 2021-08-14: rewritten for CMK 2.0
# #
# sample string_table # sample string_table
# [[u'1', u'192.167.10.10', u'1469790660', u'898864', u'189144']] # [['1', '192.167.10.10', '1469790660', '898864', '189144']]
# #
import time import time
from dataclasses import dataclass from dataclasses import dataclass
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
# 2021-08-14: rewritten for CMK 2.0 # 2021-08-14: rewritten for CMK 2.0
# #
# sample string_table SamrtEvent activated # sample string_table SamrtEvent activated
# [[u'1', u'1', u'34221335', u'0', u'0', u'', u'']] # [['1', '1', '34221335', '0', '0', '', '']]
# #
# SmartEvent running not local # SmartEvent running not local
# [[u'1', u'2', u'0', u'0', u'0', u'Not connected to SEM', u'Event distributor is not connected.']] # [['1', '2', '0', '0', '0', 'Not connected to SEM', 'Event distributor is not connected.']]
# #
# sample string_table SmartEvent not activated # sample string_table SmartEvent not activated
# [[u'0', u'0', u'0', u'0', u'2', u'CPSEAD not running', u'CPSEAD not running - process appears to be down']] # [['0', '0', '0', '0', '2', 'CPSEAD not running', 'CPSEAD not running - process appears to be down']]
# #
import time import time
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
# [['632058124697', '0', '395742854', '226516575191', '0', '858574699888']] # [['632058124697', '0', '395742854', '226516575191', '0', '858574699888']]
# #
# not activated # not activated
# [[u'0', u'0', u'0', u'0', u'0', u'0']] # [['0', '0', '0', '0', '0', '0']]
# #
# sample section # sample section
# CheckpointEvaDb(currentdbsize=632058124697, dbcapacity=0, dbdiskspace=226516575191, # CheckpointEvaDb(currentdbsize=632058124697, dbcapacity=0, dbdiskspace=226516575191,
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
# 2021-08-13: rewritten for CMK 2.0 # 2021-08-13: rewritten for CMK 2.0
# #
# sample info SamrtEvent activated # sample info SamrtEvent activated
# [[u'1', u'2305546', u'7606198', u'1469790658', u'0', u'', u'']] # [['1', '2305546', '7606198', '1469790658', '0', '', '']]
# #
# sample info SmartEvent not localy running # sample info SmartEvent not localy running
# [[u'1', u'0', u'0', u'', u'2', u'CPSEMD not running', u'CPSEMD not running - process appears to be down']] # [['1', '0', '0', '', '2', 'CPSEMD not running', 'CPSEMD not running - process appears to be down']]
# #
# sample info SmartEvent not activated) # sample info SmartEvent not activated)
# [[u'0', u'0', u'0', u'', u'2', u'CPSEMD not running', u'CPSEMD not running - process appears to be down']] # [['0', '0', '0', '', '2', 'CPSEMD not running', 'CPSEMD not running - process appears to be down']]
# #
import time import time
......
File added
No preview for this file type
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# License: GNU General Public License v2
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date : 2018-03-12
#
# Check Point Eventia metrics plugins
# checkpoint_eva
# checkpoint_eva_db
# checkpoint_eva_jobs
#
# 2023-05-29: moved to ~/local/lib7check_mk/gui/plugins/wato
#
from cmk.gui.i18n import _
from cmk.gui.plugins.metrics.utils import (
metric_info,
graph_info,
perfometer_info,
)
##############################################################################
#
# define metrics for perfdata
#
##############################################################################
metric_info['checkpoint_eva_neweventshandled'] = {
'title': _('New events'),
'unit': '1/s',
'color': '26/a',
}
metric_info['checkpoint_eva_updateshandled'] = {
'title': _('Updates'),
'unit': '1/s',
'color': '21/a',
}
metric_info['checkpoint_eva_numprocessedlogs_sec'] = {
'title': _('Processed logs'),
'unit': '1/s',
'color': '26/a',
}
metric_info['checkpoint_eva_cu_events'] = {
'title': _('Events'),
'unit': '1/s',
'color': '11/a',
}
metric_info['checkpoint_eva_cu_uptime'] = {
'title': _('Uptime'),
'unit': 's',
'color': '21/a',
}
metric_info['checkpoint_eva_db_db_disk_space'] = {
'title': _('Database disc space free'),
'unit': 'bytes',
'color': '21/a',
}
metric_info['checkpoint_eva_db_db_capacity'] = {
'title': _('Database capacity'),
'unit': 'bytes',
'color': '31/a',
}
metric_info['checkpoint_eva_db_db_size'] = {
'title': _('Database size'),
'unit': 'bytes',
'color': '11/a',
}
metric_info['checkpoint_eva_db_dbsize_percent'] = {
'title': _('Database space used'),
'unit': '%',
'color': '26/a',
}
metric_info['checkpoint_eva_db_events_in_db'] = {
'title': _('Events in Database'),
'unit': 'count',
'color': '41/a',
}
metric_info['checkpoint_eva_db_disk_size'] = {
'title': _('Disk Size'),
'unit': 'bytes',
'color': '42/a',
}
metric_info['checkpoint_eva_jobs_analyzed_log'] = {
'title': _('Analyzed logs'),
'unit': '1/s',
'color': '26/a',
}
metric_info['checkpoint_eva_jobs_position_in_file'] = {
'title': _('Position in file'),
'unit': 'count',
'color': '21/a',
}
##############################################################################
#
# how to graph perdata
#
##############################################################################
graph_info['checkpoint_eva_status'] = {
'title': _('Check Point Eventia Status: Events/Updates'),
'metrics': [
('checkpoint_eva_neweventshandled', 'line'),
('checkpoint_eva_updateshandled', '-line'),
],
}
graph_info['checkpoint_eva__correlation_unit_status'] = {
'title': _('Check Point Eventia correlation unit status'),
'metrics': [
('checkpoint_eva_numprocessedlogs_sec', 'line'),
],
}
graph_info['checkpoint_eva_db_percent'] = {
'title': _('Check Point Eventia database space used'),
'metrics': [
('checkpoint_eva_db_dbsize_percent', 'area'),
],
'range': (0, 110),
'scalars': [
('checkpoint_eva_db_dbsize_percent:crit', _('crit')),
('checkpoint_eva_db_dbsize_percent:warn', _('warn')),
],
}
graph_info['checkpoint_eva_db_disk'] = {
'title': _('Check Point Eventia Database/Disk'),
'metrics': [
('checkpoint_eva_db_db_size', 'stack'),
('checkpoint_eva_db_db_disk_space', 'stack'),
('checkpoint_eva_db_db_capacity', 'line'),
('checkpoint_eva_db_disk_size', 'line')
],
'range': (0, 'checkpoint_eva_db_disk_size:max'),
}
graph_info['checkpoint_eva_db_events'] = {
'title': _('Check Point Eventia events in database'),
'metrics': [
('checkpoint_eva_db_events_in_db', 'area'),
],
}
graph_info['checkpoint_eva_job_analyzed'] = {
'title': _('Check Point Eventia Job: Analyzed events'),
'metrics': [
('checkpoint_eva_jobs_analyzed_log', 'line'),
],
}
graph_info['checkpoint_eva_job_position'] = {
'title': _('Check Point Eventia Job: Position in file'),
'metrics': [
('checkpoint_eva_jobs_position_in_file', 'line'),
],
}
##############################################################################
#
# define perf-o-meter
#
##############################################################################
perfometer_info.append(('stacked', [
{
'type': 'logarithmic',
'metric': 'checkpoint_eva_neweventshandled',
'half_value': 1000.0,
'exponent': 2,
},
{
'type': 'logarithmic',
'metric': 'checkpoint_eva_updateshandled',
'half_value': 1000.0,
'exponent': 2,
},
]))
perfometer_info.append(('stacked', [
{
'type': 'logarithmic',
'metric': 'checkpoint_eva_cu_uptime',
'half_value': 2592000.0,
'exponent': 2,
},
{
'type': 'linear',
'segments': ['checkpoint_eva_cu_events'],
'total': 100,
}
]))
perfometer_info.append(('stacked', [
{
'type': 'linear',
'segments': ['checkpoint_eva_db_dbsize_percent'],
'total': 100,
},
{
'type': 'logarithmic',
'metric': 'checkpoint_eva_db_events_in_db',
'half_value': 100000000.0,
'exponent': 5,
},
]))
perfometer_info.append({
'type': 'logarithmic',
'metric': 'checkpoint_eva_jobs_analyzed_log',
'half_value': 100.0,
'exponent': 2,
})
perfometer_info.append({
'type': 'logarithmic',
'metric': 'checkpoint_eva_numprocessedlogs_sec',
'half_value': 1000.0,
'exponent': 2,
})
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# License: GNU General Public License v2
#
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
#
#
# 2022-11-30: fixed CheckParameterRulespecWithoutItem (from CheckParameterRulespecWithItem)
# 2023-05-29: moved to ~/local/lib7check_mk/gui/plugins/wato
#
from cmk.gui.i18n import _
from cmk.gui.valuespec import (
Dictionary,
Tuple,
Integer,
)
from cmk.gui.plugins.wato.utils import (
CheckParameterRulespecWithoutItem,
rulespec_registry,
RulespecGroupCheckParametersNetworking,
)
def _parameter_valuespec_checkpoint_eva_db():
return Dictionary(
elements=[
('levels_db_size_percent',
Tuple(
title=_('Levels for Database space used'),
elements=[
Integer(title=_('Warning at'), default_value=80, unit=_('%')),
Integer(title=_('Critical at'), default_value=85, unit=_('%')),
])),
],
)
rulespec_registry.register(
CheckParameterRulespecWithoutItem(
check_group_name='checkpoint_eva_db',
group=RulespecGroupCheckParametersNetworking,
match_type='dict',
parameter_valuespec=_parameter_valuespec_checkpoint_eva_db,
title=lambda: _('Check Point Eventia Database'),
))
...@@ -8,12 +8,10 @@ ...@@ -8,12 +8,10 @@
'checkpoint_eva_jobs.py', 'checkpoint_eva_jobs.py',
'checkpoint_eva_cu_status.py', 'checkpoint_eva_cu_status.py',
'checkpoint_eva_cu.py'], 'checkpoint_eva_cu.py'],
'web': ['plugins/metrics/checkpoint_eva.py', 'gui': ['metrics/checkpoint_eva.py', 'wato/checkpoint_eva_db.py']},
'plugins/wato/checkpoint_eva_db.py']},
'name': 'checkpoint_smart_event', 'name': 'checkpoint_smart_event',
'num_files': 7,
'title': 'Check Point Smart Event', 'title': 'Check Point Smart Event',
'version': '20221130.v0.3.5a', 'version': '0.4.0-20230529',
'version.min_required': '2.0.0', 'version.min_required': '2.1.0b1',
'version.packaged': '2021.09.20', 'version.packaged': '2.1.0p21',
'version.usable_until': None} 'version.usable_until': None}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment