Skip to content

Commit 0a5ebb9

Browse files
committed
rewrite in python
1 parent 8375555 commit 0a5ebb9

File tree

6 files changed

+538
-1164
lines changed

6 files changed

+538
-1164
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
22
!/action.yml
3-
!/mkp-builder.sh
4-
!/mkp-builder.pl
3+
!/mkp-builder.py
54
!/LICENSE
65
!/*.md
76
!/.gitignore

action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ runs:
9696
run: |
9797
echo "::group::Verifying MKP build script"
9898
99-
# Use the versioned mkp-builder.pl script from this action
99+
# Use the versioned mkp-builder.py script from this action
100100
# This ensures version consistency between action and script
101-
MKP_SCRIPT="${{ github.action_path }}/mkp-builder.pl"
101+
MKP_SCRIPT="${{ github.action_path }}/mkp-builder.py"
102102
103103
if [[ ! -f "$MKP_SCRIPT" ]]; then
104-
echo "::error::mkp-builder.pl not found in action directory: $MKP_SCRIPT"
104+
echo "::error::mkp-builder.py not found in action directory: $MKP_SCRIPT"
105105
exit 1
106106
fi
107107
@@ -130,7 +130,7 @@ runs:
130130
echo "::group::Building MKP package"
131131
132132
# Use the versioned script directly
133-
MKP_SCRIPT="${{ github.action_path }}/mkp-builder.pl"
133+
MKP_SCRIPT="${{ github.action_path }}/mkp-builder.py"
134134
135135
# Build command arguments
136136
BUILD_ARGS=("--version" "${{ inputs.version }}")

cmk-plugin-guide.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ CheckMK agent-based check plugins consist of two main components:
2929
└── server_side_calls/ # Special agents (using cmk.server_side_calls.v1)
3030
3131
~/local/lib/python3/cmk/base/cee/plugins/bakery/
32-
└── # Agent bakery plugins (using cmk.base.plugins.bakery.bakery_api.v1)
32+
└── # Agent bakery plugins (using cmk.base.pyugins.bakery.bakery_api.v1)
3333
3434
~/local/share/check_mk/agents/plugins/
3535
└── # Agent plugin source files
@@ -792,7 +792,7 @@ def check_my_service_levels(item: str, params: Mapping[str, Any], section: Dict[
792792

793793
## Agent Bakery Integration
794794

795-
The Agent Bakery allows centralized configuration and deployment of agent plugins across multiple hosts using the `cmk.base.plugins.bakery.bakery_api.v1` API.
795+
The Agent Bakery allows centralized configuration and deployment of agent plugins across multiple hosts using the `cmk.base.pyugins.bakery.bakery_api.v1` API.
796796

797797
**Important**: CheckMK 2.3 bakery integration requires **two separate files**:
798798
1. **Bakery Plugin** - Technical logic for plugin generation and deployment
@@ -803,7 +803,7 @@ The Agent Bakery allows centralized configuration and deployment of agent plugin
803803
# File: ~/local/lib/check_mk/base/cee/plugins/bakery/my_service.py
804804

805805
import json
806-
from cmk.base.plugins.bakery.bakery_api.v1 import (
806+
from cmk.base.pyugins.bakery.bakery_api.v1 import (
807807
register,
808808
Plugin,
809809
PluginConfig,
@@ -932,7 +932,7 @@ rule_spec_my_service_bakery = AgentConfig(
932932
```python
933933
# File: ~/local/lib/check_mk/base/cee/plugins/bakery/my_service_advanced.py
934934

935-
from cmk.base.plugins.bakery.bakery_api.v1 import (
935+
from cmk.base.pyugins.bakery.bakery_api.v1 import (
936936
register,
937937
Plugin,
938938
PluginConfig,
@@ -1734,7 +1734,7 @@ python3 -m py_compile ~/local/lib/python3/cmk_addons/plugins/agent_based/my_serv
17341734
import logging
17351735

17361736
# Set up logging
1737-
logger = logging.getLogger("cmk.base.plugins.agent_based.my_service")
1737+
logger = logging.getLogger("cmk.base.pyugins.agent_based.my_service")
17381738

17391739
def parse_my_service(string_table: list[list[str]]) -> Dict[str, Any]:
17401740
"""Parse with debugging"""
@@ -1775,7 +1775,7 @@ from typing import List
17751775
from cmk.agent_based.v2 import Result, State, Service
17761776

17771777
# Import your plugin functions
1778-
from cmk_addons.plugins.agent_based.my_service import (
1778+
from cmk_addons.pyugins.agent_based.my_service import (
17791779
parse_my_service,
17801780
discover_my_service,
17811781
check_my_service,
@@ -2351,7 +2351,7 @@ perfometer_temperature = Perfometer(
23512351
```python
23522352
# File: ~/local/lib/check_mk/base/cee/plugins/bakery/temperature_monitor.py
23532353

2354-
from cmk.base.plugins.bakery.bakery_api.v1 import (
2354+
from cmk.base.pyugins.bakery.bakery_api.v1 import (
23552355
register,
23562356
Plugin,
23572357
OS,

0 commit comments

Comments
 (0)