feat: pass config overrides to managed monitor
This commit is contained in:
@@ -3,7 +3,11 @@ import { existsSync } from 'fs';
|
||||
|
||||
export interface ManagedMonitorConfig {
|
||||
managedMonitor?: string;
|
||||
backendUrl?: string;
|
||||
identifier?: string;
|
||||
apiKey?: string;
|
||||
monitor_port?: number;
|
||||
reportIntervalSec?: number;
|
||||
logLevel?: string;
|
||||
}
|
||||
|
||||
@@ -24,7 +28,11 @@ export function startManagedMonitor(
|
||||
}
|
||||
|
||||
const args: string[] = [];
|
||||
if (config.monitor_port) args.push('--port', String(config.monitor_port));
|
||||
if (config.backendUrl) args.push('--backend-url', String(config.backendUrl));
|
||||
if (config.identifier) args.push('--identifier', String(config.identifier));
|
||||
if (config.apiKey) args.push('--api-key', String(config.apiKey));
|
||||
if (config.monitor_port) args.push('--monitor-port', String(config.monitor_port));
|
||||
if (config.reportIntervalSec) args.push('--report-interval', String(config.reportIntervalSec));
|
||||
if (config.logLevel) args.push('--log-level', String(config.logLevel));
|
||||
|
||||
monitorProcess = spawn(config.managedMonitor, args, {
|
||||
|
||||
Reference in New Issue
Block a user