Skip to content

Commit

Permalink
Migrate from legacy plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
jiuka committed Jul 3, 2023
1 parent d675615 commit ed342bd
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/symlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ done;
rm -rfv $OMD_ROOT/local/lib/python3/cmk/base/plugins/agent_based
ln -sv $WORKSPACE/agent_based $OMD_ROOT/local/lib/python3/cmk/base/plugins/agent_based

for DIR in 'wato' 'metrics'; do
rm -rfv $OMD_ROOT/local/lib/python3/cmk/gui/plugins/$DIR
ln -sv $WORKSPACE/$DIR $OMD_ROOT/local/lib/python3/cmk/gui/plugins/$DIR
done;

mkdir -p $OMD_ROOT/local/lib/python3/cmk/base/cee/plugins
ln -sv $WORKSPACE/bakery $OMD_ROOT/local/lib/python3/cmk/base/cee/plugins/bakery

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from cmk.gui.i18n import _

from cmk.gui.plugins.metrics import (
from cmk.gui.plugins.metrics.utils import (
check_metrics,
metric_info,
graph_info,
Expand All @@ -32,6 +32,7 @@
'transferred': {'name': 'veeam_o365jobs_transferred'},
'duration': {'name': 'veeam_o365jobs_duration'},
'items': {'name': 'veeam_o365jobs_items'},
'age': {'name': 'veeam_o365jobs_age'},
}


Expand All @@ -53,6 +54,12 @@
'color': '#00b336',
}

metric_info['veeam_o365jobs_age'] = {
'title': _('Time since last successfull run'),
'unit': 's',
'color': '#00b336',
}


graph_info['veeam_o365jobs_transferred'] = {
'title': _('Veeam for Office 365 Job'),
Expand All @@ -76,6 +83,12 @@
'range': (0, 'veeam_o365jobs_items:max'),
}

graph_info['veeam_o365jobs_age'] = {
'title': _('Veeam for Office 365 Job'),
'metrics': [('veeam_o365jobs_age', 'area')],
'range': (0, 'veeam_o365jobs_age:max'),
}


perfometer_info.append({
'type': 'stacked',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from cmk.gui.i18n import _

from cmk.gui.plugins.metrics import (
from cmk.gui.plugins.metrics.utils import (
check_metrics,
metric_info,
graph_info,
Expand Down
15 changes: 8 additions & 7 deletions package
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
'windows/plugins/veeam_o365_status.ps1',
],
'checkman': ['veeam_o365jobs', 'veeam_o365licenses'],
'gui': [
'metrics/veeam_o365jobs.py',
'metrics/veeam_o365licenses.py',
'wato/agent_bakery/veeam_o365.py',
'wato/check_parameters/veeam_o365licenses.py',
'wato/check_parameters/veeam_o365jobs.py',
],
'lib': [
'python3/cmk/base/cee/plugins/bakery/veeam_o365.py',
],
'web': [
'plugins/metrics/veeam_o365jobs.py',
'plugins/metrics/veeam_o365licenses.py',
'plugins/wato/agent_bakery_veeam_o365.py',
'plugins/wato/check_parameters_veeam_o365licenses.py',
'plugins/wato/check_parameters_veeam_o365jobs.py',
]},
},
'name': 'veeam_o365',
'title': u'Veeam for Office 365 Checks',
'version': '2.6.1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from cmk.gui.valuespec import (
DropdownChoice,
)
from cmk.gui.plugins.wato import (
from cmk.gui.plugins.wato.utils import (
HostRulespec,
rulespec_registry,
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
TextAscii,
Tuple,
)
from cmk.gui.plugins.wato import (
from cmk.gui.plugins.wato.utils import (
CheckParameterRulespecWithItem,
RulespecGroupCheckParametersApplications,
rulespec_registry,
Expand Down

0 comments on commit ed342bd

Please sign in to comment.