medmfc-monitoring-agent-hcmr
Repository: ckalkav/medmfc-monitoring-agent-hcmr
Purpose
The HCMR agent is a passive observer running on copernicus01. It converts the legacy production-script state into normalized telemetry for the central monitoring platform.
It does not modify or control the production upload scripts.
Repository tree
medmfc-monitoring-agent-hcmr/
├── .gitignore
├── README.md
│
├── agent/
│ └── medmfc_hcmr_agent.py
│
├── config/
│ └── hcmr-agent.env.example
│
├── docs/
│ └── agent.md
│
├── scripts/
│ ├── install.sh
│ ├── test.sh
│ └── update.sh
│
└── systemd/
└── medmfc-hcmr-agent.service
Observed production evidence
Cycle 00 progress:
/opt/atoll/poseidon/mfcNeptUpload_v9-Q1.log
Cycle 12 progress:
/opt/atoll/poseidon/mfcNeptUpload_v9-Q12.log
Cron logs:
/opt/atoll/misgw/MFS_VER4E/logs/mds-medmfc-upload-v9-00-log
/opt/atoll/misgw/MFS_VER4E/logs/mds-medmfc-upload-v9-12-log
Local status mapping
flowchart TD
P[Read progress / process state] --> E{upError=1?}
E -->|Yes| FAILED[FAILED]
E -->|No| R{reSuccess=1?}
R -->|Yes| SUCCESS[SUCCESS]
R -->|No| D{upDone=1?}
D -->|Yes| WAIT[WAITING_RESPONSE]
D -->|No| U{upStarted=1?}
U -->|Yes| UP[UPLOADING]
U -->|No| F{filesFound=1?}
F -->|Yes| READY[FILES_READY]
F -->|No| I{nepSleep=1?}
I -->|Yes| IDLE[IDLE]
I -->|No| PROC{Upload process running?}
PROC -->|Yes| WF[WAITING_FILES]
PROC -->|No| STOP[STOPPED]
Local SUCCESS is not final system success. The central monitoring platform performs independent MDS/S3 confirmation and promotes the cycle to MDS_CONFIRMED.
Heartbeat behavior
- local polling: approximately every 30 seconds;
- telemetry on state change;
- heartbeat at least every five minutes;
- stale-progress warning during active
WAITING_FILES; - idle state is excluded from the short stale-progress rule.
Deployment
Checkout:
/opt/medmfc-monitoring-agent-hcmr
Service:
medmfc-hcmr-agent.service
Local protected configuration:
/etc/medmfc-monitoring/hcmr-agent.env
Updates are performed using the repository update script followed by systemd restart.