A CheckMK extension for monitoring RNX UPDU (Universal Power Distribution Unit) devices.
This project includes a pre-configured development container with CheckMK 2.3.0.
- Docker or Podman
- Visual Studio Code with Dev Containers extension
- Open the project in VS Code
- When prompted, click "Reopen in Container" or use
Ctrl+Shift+P→ "Dev Containers: Reopen in Container" - The container will automatically:
- Set up CheckMK environment
- Install required Python dependencies
- Create symbolic links for the plugin
- Apply necessary Nagios fixes for compatibility
Once the dev container is running, you need to set up the CheckMK environment:
# Set password for cmkadmin user
cmk-passwd cmkadmin
# Start CheckMK services
omd start
# Build the extension within the container
.devcontainer/build.sh
# Test the extension
mkp inspect ./build/rnx_updu-0.0.3.mkpThe CheckMK web interface is available at http://localhost:8080/cmk (user: cmkadmin, password: set above).
If you prefer to run CheckMK manually in Docker:
REV="2.3.0-latest"
docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix \
--name checkmk \
-p 8080:5000 \
-p 8000:8000 \
--tmpfs /opt/omd/sites/cmk/tmp:uid=1000,gid=1000 \
-v /etc/localtime:/etc/localtime:ro \
--volume=".:/project:rw" \
checkmk/check-mk-raw:$REV /bin/bashAccess CheckMK shell: omd su cmk
Then set up the environment:
# Set password for cmkadmin user
cmk-passwd cmkadmin
# Start CheckMK services
omd start.devcontainer/build.shRun the provided .devcontainer/build.sh script to compile the extension:
./.devcontainer/build.shThe built package will be created in the build/ directory as rnx_updu-<version>.mkp.
Install the built plugin in your CheckMK instance:
mkp add rnx_updu-0.0.3.mkp
mkp enable rnx_upduAfter installation, you can add and configure RNX UPDU hosts through the CheckMK web interface.
- Follow the development workflow above to set up the environment
- Build and install the extension:
.devcontainer/build.sh mkp add build/rnx_updu-*.mkp mkp enable rnx_updu
- Access the CheckMK web interface at
http://localhost:8080/cmk/ - Add a new host and configure it to use the RNX UPDU special agent
You can also test the plugin components individually:
# Validate plugin syntax
python3 -m py_compile src/rnx_updu/agent_based/*.py
# Check package contents
mkp inspect ./build/rnx_updu-*.mkp
# List installed packages
mkp list- CheckMK services not starting: Make sure you've run
omd startafter setting up the container - Web interface not accessible: Check that port 5000 is properly forwarded (to 8080 by default) and not blocked by firewall
- Plugin not loading: Verify the plugin is properly installed with
mkp listand enabled withmkp enable rnx_updu
Check CheckMK logs for debugging:
# View general CheckMK logs
tail -f ~/var/log/web.log
# View agent output
cmk -v --debug <hostname>
# Check for plugin errors
tail -f ~/var/log/cmc.log├── .devcontainer/ # Development container configuration
│ └── build.sh # Build script for the extension
├── src/ # Source code
│ ├── info # Package metadata
│ └── rnx_updu/ # Plugin package
│ └── agent_based/ # CheckMK agent-based plugins
├── build/ # Built packages (generated)
├── doc/ # Documentation
├── VERSION # Current version
├── RELEASE-NOTES.md # Release notes and changelog
└── README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly using the development container
- Submit a pull request
This project is licensed under the terms specified in the CheckMK licensing.