NOTICE: All information contained herein is, and remains
the property of TechnoCore Automate.
Updated : 2026-03-16
ObjServiceMonitor is a workflow-facing service that delegates
infrastructure monitoring to ObjMonitor.Monitor. It provides a
standard process(context) entry point and typer CLI for running
system data collection cycles.
This service does not perform monitoring itself — it is a thin
orchestration layer that creates a Monitor instance sharing its
database connection and calls Monitor.run_collection(mode).
Workflow / CLI
|
ObjServiceMonitor.process(context)
|
ObjMonitor.Monitor.run_collection(mode)
|
collect_fast / collect_db / collect_system / collect_ports / ...
The Monitor class in factory.core/ObjMonitor.py contains all
the actual collection logic. This service wraps it with:
process(context) for workflow integrationrun_workflow_direct() for backward compatibilitypatch_param() for service placeholder substitutiontyper CLI for manual invocation| Mode | Description | Typical Use |
|---|---|---|
fast |
CPU, RAM, disk metrics only | Frequent polling (every minute) |
collect |
Standard collection (metrics + DB health) | Regular monitoring (every 5 min) |
daily |
Full sweep: ports, HTTPS certs, DNS, ISP, files | Scheduled daily job |
os |
OS and environment information | On-demand / deployment checks |
All modes delegate to ObjMonitor.Monitor.run_collection(mode)
which returns a dict of collected data.
Creates a Monitor instance and runs the specified collection mode.
Returns the raw result dict from Monitor.run_collection().
Replaces service placeholders in text strings:
| Placeholder | Replaced with |
|---|---|
$id$ |
self._Def_serviceid |
$param1$ |
self.Param1 |
$param2$ |
self.Param2 |
$param3$ |
self.Param3 |
Also calls super().patch_param(text) for standard ObjData
placeholders.
Workflow entry point. Reads command from context (defaults to
"collect") and returns the collection result as JSON in
_monitor_result.
Legacy workflow entry point preserved for backward compatibility
with existing workflow definitions. Uses param1 as the collection
mode (defaults to "collect" if empty).
The process(context) method dispatches to collect() based on
the command key in the workflow context.
| Command | Result Key | Description |
|---|---|---|
collect |
_monitor_result (JSON) |
Standard collection |
fast |
_monitor_result (JSON) |
Quick metrics |
daily |
_monitor_result (JSON) |
Full sweep |
os |
_monitor_result (JSON) |
OS/environment info |
Example workflow context:
context = {"command": "fast"}
result = svc.process(context)
metrics = json.loads(result["_monitor_result"])
# Standard collection (default mode)
python ObjServiceMonitor.py collect
# Specify a mode
python ObjServiceMonitor.py collect daily
# Quick system metrics
python ObjServiceMonitor.py fast
# Full daily sweep
python ObjServiceMonitor.py daily
ObjMonitor.Monitor — the actual collection engine infactory.core/ObjMonitor.pyObjConstants.IconConstants — status icons for debug outputfrom ObjServiceMonitor import ObjServiceApi
svc = ObjServiceApi()
# Quick metrics
result = svc.collect("fast")
# Standard collection
result = svc.collect("collect")
# Full daily sweep
result = svc.collect("daily")
# Via workflow context
context = {"command": "fast"}
svc.process(context)
print(context["_monitor_result"])
Updated : 2026-03-16
cythonize -3 -a -i ObjServiceMonitor.py
Compiling /home/axion/projects/axion/factory.service/package.core/ObjServiceMonitor.py because it changed..[1/1] Cythonizing /home/axion/projects/axion/factory.service/package.core/ObjServiceMonitor.py
Updated : 2026-03-16