use of com.axway.ats.agent.components.monitoring.operations.clients.InternalSystemMonitoringOperations in project ats-framework by Axway.
the class SystemMonitor method startSystemMonitoringProcess.
private void startSystemMonitoringProcess(String monitoredHost) throws MonitoringException {
log.debug("Starting the system monitoring process on " + monitoredHost);
try {
InternalSystemMonitoringOperations sysMonitoringActions = new InternalSystemMonitoringOperations(monitoredHost);
sysMonitoringActions.startMonitoring();
} catch (AgentException e) {
throw new MonitoringException("Could not start the system monitoring process on " + monitoredHost, e);
}
}
use of com.axway.ats.agent.components.monitoring.operations.clients.InternalSystemMonitoringOperations in project ats-framework by Axway.
the class SystemMonitor method stopSystemMonitoringProcess.
private void stopSystemMonitoringProcess(String monitoredHost) throws MonitoringException {
log.debug("Stopping system monitoring on " + monitoredHost);
try {
InternalSystemMonitoringOperations sysMonitoringActions = new InternalSystemMonitoringOperations(monitoredHost);
sysMonitoringActions.stopMonitoring();
log.debug("Successfully stopped system monitoring on " + monitoredHost);
} catch (AgentException e) {
throw new MonitoringException("Could not stop the system monitoring process on " + monitoredHost, e);
}
}
use of com.axway.ats.agent.components.monitoring.operations.clients.InternalSystemMonitoringOperations in project ats-framework by Axway.
the class SystemStatsLoggerTask method run.
/* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
public void run() {
log.debug("Getting system monitoring results for " + monitoredHost);
try {
InternalSystemMonitoringOperations sysMonitoringActions = new InternalSystemMonitoringOperations(monitoredHost);
List<MonitorResults> monitorResults = sysMonitoringActions.getCollectedResults();
if (monitorResults.size() > 0) {
// update the DB definitions if needed
for (MonitorResults monitorResult : monitorResults) {
updateDatabaseRepository(monitoredHost, monitorResult.getReadings());
}
//log the results to the database
int resultsAddeed = logResults(monitorResults);
log.debug("Successfully sent " + resultsAddeed + " system monitoring results to the logging database");
} else {
log.warn("No new system monitoring results to log");
}
} catch (Exception e) {
log.error("Could not log system monitoring results for " + monitoredHost + ". Will skip to next iteration", e);
}
}
use of com.axway.ats.agent.components.monitoring.operations.clients.InternalSystemMonitoringOperations in project ats-framework by Axway.
the class SystemMonitor method initializeSystemMonitoringProcess.
private void initializeSystemMonitoringProcess(String monitoredHost, Set<FullReadingBean> readings) throws MonitoringException {
log.debug("Initializing the system monitoring process on " + monitoredHost);
try {
InternalSystemMonitoringOperations sysMonitoringActions = new InternalSystemMonitoringOperations(monitoredHost);
sysMonitoringActions.initializeMonitoring(new ArrayList<FullReadingBean>(readings), startTimestamp, pollInterval);
} catch (AgentException e) {
throw new MonitoringException("Could not start the system monitoring process on " + monitoredHost + ". For more details check loader logs on that machine", e);
}
}
Aggregations