| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 294 |
| Technical Name |
server_info_monitor |
| License | LGPL-3 |
| Website | https://fl1.cz |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 294 |
| Technical Name |
server_info_monitor |
| License | LGPL-3 |
| Website | https://fl1.cz |
Server Info Monitor
REST API endpoint to monitor Odoo instances with multi-database support
A lightweight module that exposes server information via a secure REST API. Perfect for DevOps dashboards, multi-instance monitoring, and automated health checks. Now with full multi-database support, module statistics, and orphan module detection.
Key Features
Multi-Database Support
Query any database on the same Odoo instance via query parameter or header. Monitor all your databases from a single endpoint.
Server Version Info
Get Odoo version, version_info array, and series. Instantly know if you're running Community or Enterprise.
License Monitoring
Track Enterprise expiration dates, license codes, renewal reasons, and detect neutralized (demo/test) databases.
User Statistics
Monitor internal users, portal users, active users (last 30 days), and inactive accounts with last login dates.
Module Inventory
List all available and installed modules with versions, authors, application flags, and pending upgrades count.
Addons Paths
See all configured addons paths on the server. Useful for understanding module deployment structure.
New in v18.0.1.2.0
Orphan Module Cleanup Endpoint
New Endpoint: POST /api/server/cleanup-orphans
Safely removes orphan modules from the database. Orphan modules are modules that exist in the database but are no longer present in the filesystem.
Safe States Only
Only removes modules in uninstalled and uninstallable states. Does NOT touch installed, to upgrade, to install, or to remove modules.
Dry-Run Mode
Preview what would be deleted before executing with ?dry_run=true. Always recommended to run dry-run first.
Recoverable
Modules will automatically reappear if re-added to addons path and 'Update Apps List' is run. No permanent data loss.
Multi-Database Support
Use ?db=database_name to target a specific database on multi-database instances.
Cleanup Endpoint Usage
Step 1 - Dry-Run (Recommended):
curl -X POST -H "Authorization: Bearer YOUR_TOKEN" "https://your-odoo.com/api/server/cleanup-orphans?dry_run=true"
Dry-Run Response:
{
"success": true,
"dry_run": true,
"message": "Would remove 194 orphan modules",
"modules_to_remove": [
{"name": "old_module", "state": "uninstalled", "version": "18.0.1.0.0"}
]
}
Step 2 - Execute Cleanup:
curl -X POST -H "Authorization: Bearer YOUR_TOKEN" "https://your-odoo.com/api/server/cleanup-orphans"
Execute Response:
{
"success": true,
"dry_run": false,
"message": "Removed 194 orphan modules",
"removed_modules": [
{"name": "old_module", "state": "uninstalled", "version": "18.0.1.0.0"}
]
}
With Database Specification:
curl -X POST -H "Authorization: Bearer YOUR_TOKEN" "https://your-odoo.com/api/server/cleanup-orphans?db=production&dry_run=true"
v18.0.1.1.0 Features
Enhanced Module Monitoring
Module Statistics
Comprehensive module state counts: installed, uninstalled, to_upgrade, to_install, to_remove, uninstallable, and orphan modules at a glance.
Orphan Module Detection
Detect "ghost" modules - modules in the database but missing from the filesystem. Safe read-only check for cleanup planning.
Path Existence Check
Each module now includes a path_exists boolean indicating whether it exists in the filesystem.
Complete State Information
All modules (available and installed) now include their state field for complete visibility into module lifecycle.
API Endpoints
Server Info: GET /api/server/info
Retrieve server, license, users, and modules information.
Cleanup Orphans: POST /api/server/cleanup-orphans
Remove orphan modules from database (safe states only).
Authentication: Bearer token via Authorization header
Query Parameters:
?db=database_name- Specify target database (for multi-db instances)?refresh=true- Refresh module list before returning
Alternative Database Selection:
- Header:
X-Odoo-Database: database_name - Fallback: Uses config db_name if not specified
Usage Examples
Basic Request (single database instance):
curl -H "Authorization: Bearer YOUR_TOKEN" https://your-odoo.com/api/server/info
Multi-Database - Query Parameter:
curl -H "Authorization: Bearer YOUR_TOKEN" "https://your-odoo.com/api/server/info?db=production"
Multi-Database - Header:
curl -H "Authorization: Bearer YOUR_TOKEN" -H "X-Odoo-Database: production" https://your-odoo.com/api/server/info
With Module List Refresh:
curl -H "Authorization: Bearer YOUR_TOKEN" "https://your-odoo.com/api/server/info?db=production&refresh=true"
Response Data Structure
Server Section
- version (e.g., "18.0+e" for Enterprise)
- version_info array [18, 0, 0, "final", 0, "e"]
- serie (e.g., "18.0")
License Section
- is_enterprise (true/false)
- expiration_date
- enterprise_code
- expiration_reason
- is_neutralized
Users Section
- total_internal (backend users)
- active_last_30_days
- total_portal
- total_inactive
- User list with id, login, name, last_activity
Modules Section
- Module statistics by state (installed, uninstalled, orphan, etc.)
- Orphan modules list (DB entries without filesystem)
- Available modules (total + detailed list)
- Installed modules (total + detailed list)
- Version, author, application, state, path_exists per module
Complete JSON Response Example
{
"success": true,
"timestamp": "2026-01-23T12:00:00",
"database": "production_db",
"server": {"version": "18.0+e", "serie": "18.0"},
"license": {
"is_enterprise": true,
"expiration_date": "2027-12-16",
"enterprise_code": "M22110752881618",
"is_neutralized": false
},
"users": {
"total_internal": 25,
"active_last_30_days": 18,
"total_portal": 150,
"total_inactive": 5,
"list": [{"id": 2, "login": "admin", "name": "Administrator", "last_activity": "2026-01-23T09:21:23"}]
},
"addons_paths": ["/opt/odoo/addons", "/opt/odoo/enterprise"],
"modules": {
"stats": {
"installed": 225,
"uninstalled": 1400,
"to_upgrade": 2,
"to_install": 1,
"to_remove": 0,
"uninstallable": 50,
"orphan": 3
},
"orphan_modules": [
{"name": "old_module", "state": "to install", "version": "18.0.1.0.0"}
],
"available": {
"total": 1745,
"list": [{"name": "sale", "version": "18.0.1.0", "author": "Odoo S.A.", "application": true, "state": "installed", "path_exists": true}]
},
"installed": {
"total": 225,
"to_upgrade": 0,
"list": [{"name": "sale", "version": "18.0.1.0", "author": "Odoo S.A.", "application": true, "state": "installed", "path_exists": true}]
}
}
}
Use Cases
DevOps Dashboard
Monitor all your Odoo instances from a single dashboard. Track versions, uptime, and health status in real-time.
Multi-Database Monitoring
Single endpoint for all databases on the same instance. Perfect for multi-tenant deployments and staging environments.
Update Planning
Identify servers with pending module upgrades. Plan maintenance windows effectively across all databases.
License Management
Get alerts before Enterprise licenses expire. Track expiration reasons and renewal status across instances.
User Audit
Identify inactive users and optimize license usage. Track activity patterns and last login times per database.
Compliance Documentation
Document installed modules per instance for audits and compliance requirements. Export module inventories.
Orphan Module Cleanup
Detect modules stuck in the database after addon paths are removed. Plan cleanup operations safely with read-only detection.
Module Health Dashboard
Get instant module state statistics. Know exactly how many modules are installed, pending upgrade, or orphaned.
Configuration
After installation, configure the API token in:
Settings → Technical → System Parameters
Key: server_info_monitor.token
Default token: srvmon_a7b3c9d2e5f8
IMPORTANT: Change this token in production environments!
Error Responses
400 Bad Request
Database not specified (when no default available in multi-db mode)
401 Unauthorized
Invalid or missing authentication token
404 Not Found
Specified database does not exist on this instance
500 Internal Error
Internal server error (check Odoo logs for details)
Security
Bearer Token Authentication
Only requests with valid Authorization header can access the API. No session or cookie required.
Controlled Access
GET endpoint is read-only. POST cleanup requires explicit action and supports dry-run mode for safe preview.
Safe Cleanup Operations
Cleanup only removes modules in safe states (uninstalled, uninstallable). Installed modules are never touched.
Reversible Actions
Removed orphan modules can be restored by re-adding to addons path and running 'Update Apps List'.
Technical Details
Dependencies
Only requires base module. No external Python packages needed. Minimal footprint.
Compatibility
Odoo 18 Community and Enterprise. Works with both editions and multi-database configurations.
Support
For support, feature requests, and bug reports, please visit our website or contact us directly.
Website: https://fl1.cz
Email: info@fl1.cz
Please log in to comment on this module