fix: correct plugin import path in docs, wire up orphaned footer template

docs/PLUGIN_DEVELOPMENT.md referenced a nonexistent hbd/plugin.py and
hbd/plugins/ directory; the real module is hbd/client/plugin.py with
plugins under hbd/client/plugins/, as README.md and the actual code
already use. Anyone following the doc would hit ModuleNotFoundError.

foot.html was never included by any template (confirmed via git grep
and template audit) despite being actively maintained; wired it into
about.html. menu.html was fully commented out and unreferenced, so
removed it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Andreas Wrede
2026-07-31 09:51:36 -04:00
co-authored by Claude Sonnet 5
parent 4c3a63e645
commit 1e46f33648
3 changed files with 12 additions and 12 deletions
+10 -10
View File
@@ -21,7 +21,7 @@ Heartbeat's plugin system is designed to be simple yet powerful. Plugins are Pyt
### Key Concepts
- **Plugin Registry**: Central registry that manages all loaded plugins
- **Plugin Loader**: Automatically discovers and loads plugins from the `hbd/plugins/` directory
- **Plugin Loader**: Automatically discovers and loads plugins from the `hbd/client/plugins/` directory
- **Plugin Types**: InfoPlugin (static data) and MonitorPlugin (periodic metrics)
- **Async/Await**: All plugin methods are async for non-blocking operation
@@ -64,7 +64,7 @@ Decide whether your plugin collects static information (InfoPlugin) or dynamic m
### Step 2: Create Plugin File
Create a new Python file in `hbd/plugins/` directory:
Create a new Python file in `hbd/client/plugins/` directory:
```python
"""
@@ -82,7 +82,7 @@ try:
except ImportError:
psutil = None
from hbd.plugin import MonitorPlugin # or InfoPlugin
from hbd.client.plugin import MonitorPlugin # or InfoPlugin
logger = logging.getLogger(__name__)
@@ -193,7 +193,7 @@ from pathlib import Path
# Add parent directory to path
sys.path.insert(0, str(Path(__file__).parent))
from hbd.plugins.my_awesome_plugin import MyAwesomePlugin
from hbd.client.plugins.my_awesome_plugin import MyAwesomePlugin
async def test():
# Create plugin instance
@@ -224,7 +224,7 @@ Understanding the plugin lifecycle helps you implement plugins correctly:
```
1. Plugin Discovery
└─> Loader scans hbd/plugins/ directory
└─> Loader scans hbd/client/plugins/ directory
└─> Finds Python files (except those starting with _)
└─> Imports modules
@@ -378,7 +378,7 @@ Document your plugin thoroughly:
### Example 1: Simple InfoPlugin
```python
from hbd.plugin import InfoPlugin
from hbd.client.plugin import InfoPlugin
import platform
class SimpleInfoPlugin(InfoPlugin):
@@ -406,7 +406,7 @@ plugin = SimpleInfoPlugin
### Example 2: MonitorPlugin with State
```python
from hbd.plugin import MonitorPlugin
from hbd.client.plugin import MonitorPlugin
import time
class CounterPlugin(MonitorPlugin):
@@ -442,7 +442,7 @@ plugin = CounterPlugin
### Example 3: Plugin with External Command
```python
from hbd.plugin import MonitorPlugin
from hbd.client.plugin import MonitorPlugin
import asyncio
class CommandPlugin(MonitorPlugin):
@@ -561,7 +561,7 @@ python -m hbd.hbc -c test_config.yaml --verbose
## Further Reading
- [Plugin Framework Source](../hbd/plugin.py) - Core plugin implementation
- [Built-in Plugins](../hbd/plugins/) - Examples of working plugins
- [Plugin Framework Source](../hbd/client/plugin.py) - Core plugin implementation
- [Built-in Plugins](../hbd/client/plugins/) - Examples of working plugins
- [Nagios Integration](NAGIOS_INTEGRATION.md) - Running external plugins
- [Configuration Guide](../hbd/config_example.yaml) - Full configuration reference