The file is located in /opt/spm/spm-monitor/run, it is named like /opt/spm/spm-monitor/run/53fcaf0a-de07-4b46-bacc-0f60f6bcbf33--default-monitor-0.status (same format as .lock files, but with different extension). Few examples of content:
startedAt=1595431789086
lastUpdate=1595432809975
metricsCollected=false
metricsSent=false
connectionStatus=FAILED
connectionErrors={Cannot load db driver class. Please check if the JDBC driver is in classpath=1595432214479}
I am not entirely happy with the implementation - AgentStatusRecorder instance being static and sprinkling N places in code with logic that calls different AgentStatusRecorder methods. Ideally this would be done in transparent and generic way, but making it right would require huge refactoring, so decided against it.
Start writing agent status info into file
The file is located in
/opt/spm/spm-monitor/run
, it is named like/opt/spm/spm-monitor/run/53fcaf0a-de07-4b46-bacc-0f60f6bcbf33--default-monitor-0.status
(same format as.lock
files, but with different extension). Few examples of content:I am not entirely happy with the implementation - AgentStatusRecorder instance being static and sprinkling N places in code with logic that calls different AgentStatusRecorder methods. Ideally this would be done in transparent and generic way, but making it right would require huge refactoring, so decided against it.