use of com.axway.ats.agent.components.monitoring.model.agents.AtsSystemMonitoringAgent in project ats-framework by Axway.
the class InternalSystemMonitoringOperations method initializeMonitoring.
@Action(name = "Internal System Monitoring Operations Initialize Monitoring")
public void initializeMonitoring(@Parameter(name = "readings") List<FullReadingBean> readings, @Parameter(name = "startTimestamp") long startTimestamp, @Parameter(name = "pollInterval") int pollInterval) throws Exception {
monitoringAgent = new AtsSystemMonitoringAgent(startTimestamp, pollInterval);
Map<String, List<FullReadingBean>> readingsPerMonitor = new HashMap<String, List<FullReadingBean>>();
// load all the monitors and initialize them
for (FullReadingBean reading : readings) {
List<FullReadingBean> readingsForThisMonitor = readingsPerMonitor.get(reading.getMonitorName());
if (readingsForThisMonitor == null) {
readingsForThisMonitor = new ArrayList<FullReadingBean>();
readingsPerMonitor.put(reading.getMonitorName(), readingsForThisMonitor);
}
readingsForThisMonitor.add(reading);
}
for (String monitorClassName : readingsPerMonitor.keySet()) {
initializeMonitor(monitorClassName, readingsPerMonitor.get(monitorClassName), pollInterval);
}
}
Aggregations