feat: update to version 0.1.3 with new CLI flags, logging enhancements, and Windows MSI installer
This commit is contained in:
87
README.md
87
README.md
@@ -1,6 +1,6 @@
|
||||
# Series 4 Ingest Agent
|
||||
|
||||
**Version:** 0.1.2
|
||||
**Version:** 0.1.3
|
||||
|
||||
Micromate (Series 4) ingest agent for Seismo Fleet Manager (SFM).
|
||||
|
||||
@@ -27,10 +27,16 @@ Series 4 Ingest Agent is a Python-based monitoring tool that scans for Micromate
|
||||
|
||||
## Installation
|
||||
|
||||
1. Clone or copy this repository to your THOR PC/VM
|
||||
2. Ensure Python 3.6+ is installed
|
||||
3. Configure `config.json` (see Configuration section)
|
||||
4. Run the agent:
|
||||
1. Download and run the MSI installer (Windows, admin required)
|
||||
2. Edit config at `C:\ProgramData\ThorIngest\config.json`
|
||||
3. The service starts automatically and runs on boot
|
||||
|
||||
No command line is required for normal use. The installer sets up the Windows Service.
|
||||
|
||||
For development or manual runs:
|
||||
1. Ensure Python 3.6+ is installed
|
||||
2. Configure `config.json` (see Configuration section)
|
||||
3. Run the agent:
|
||||
|
||||
```bash
|
||||
python series4_ingest.py
|
||||
@@ -38,7 +44,11 @@ python series4_ingest.py
|
||||
|
||||
## Configuration
|
||||
|
||||
All configuration is managed through `config.json` in the same directory as the script.
|
||||
All configuration is managed through `config.json` in:
|
||||
|
||||
```
|
||||
C:\ProgramData\ThorIngest\config.json
|
||||
```
|
||||
|
||||
### config.json Structure
|
||||
|
||||
@@ -75,16 +85,35 @@ If `config.json` is missing or malformed, the agent will:
|
||||
|
||||
## Usage
|
||||
|
||||
### Start the Agent
|
||||
### Start the Agent (manual)
|
||||
|
||||
```bash
|
||||
python series4_ingest.py
|
||||
```
|
||||
|
||||
### Common Flags
|
||||
|
||||
- `--config <path>`: Override config file path
|
||||
- `--log-dir <path>`: Override log directory
|
||||
- `--once`: Run one scan and exit
|
||||
- `--version`: Print version and exit
|
||||
|
||||
### Run Once (manual)
|
||||
|
||||
```bash
|
||||
python series4_ingest.py --once
|
||||
```
|
||||
|
||||
### Show Version
|
||||
|
||||
```bash
|
||||
python series4_ingest.py --version
|
||||
```
|
||||
|
||||
### Console Output Example
|
||||
|
||||
```
|
||||
Series 4 Ingest Agent — Micromate Heartbeat (v0.1.2)
|
||||
Series 4 Ingest Agent — Micromate Heartbeat (v0.1.3)
|
||||
THORDATA root: C:\THORDATA
|
||||
Now: 2025-12-08 14:30:00
|
||||
--------------------------------------------------------------------------------
|
||||
@@ -96,10 +125,48 @@ Total units: 3
|
||||
Next scan in 60 seconds...
|
||||
```
|
||||
|
||||
### Stop the Agent
|
||||
### Stop the Agent (manual)
|
||||
|
||||
Press `Ctrl+C` to gracefully stop the agent.
|
||||
|
||||
## Windows Service Installation
|
||||
|
||||
The MSI installs a Windows Service named `ThorIngest` using NSSM. It runs at startup.
|
||||
|
||||
**Check status**
|
||||
|
||||
```
|
||||
sc query ThorIngest
|
||||
```
|
||||
|
||||
**Start / stop**
|
||||
|
||||
```
|
||||
sc start ThorIngest
|
||||
sc stop ThorIngest
|
||||
```
|
||||
|
||||
**Service Logs**
|
||||
|
||||
Logs are written to:
|
||||
```
|
||||
C:\ProgramData\ThorIngest\logs\thor_ingest.log
|
||||
```
|
||||
|
||||
## Updating
|
||||
|
||||
1. Download the newer MSI from the internal file share/URL.
|
||||
2. Run the MSI to upgrade in place.
|
||||
3. Your existing config and logs are preserved.
|
||||
|
||||
## Building the EXE (PyInstaller)
|
||||
|
||||
```bash
|
||||
pyinstaller --onefile --name thor-ingest-agent series4_ingest.py
|
||||
```
|
||||
|
||||
The output EXE will be in `dist/`.
|
||||
|
||||
## Status Classification
|
||||
|
||||
Units are classified based on the age of their last MLG file:
|
||||
@@ -178,7 +245,7 @@ C:\THORDATA\
|
||||
## Troubleshooting
|
||||
|
||||
### Config file not found
|
||||
If you see `[WARN] Config file not found`, create `config.json` in the same directory as `series4_ingest.py`.
|
||||
If you see `[WARN] Config file not found`, create `config.json` in `C:\ProgramData\ThorIngest\config.json` (or pass `--config`).
|
||||
|
||||
### THORDATA path doesn't exist
|
||||
Verify the `thordata_path` in `config.json` points to the correct directory.
|
||||
|
||||
Reference in New Issue
Block a user