mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-02 17:19:37 +00:00
Added status output for monitoring
This commit is contained in:
1 parent
bb7371b87b
commit
5bb1a36ce1
1 file changed
+7
-2
+7
-2
@@ -30,6 +30,8 @@ import com.sap.sailing.monitoring.sysinfo.SystemInformationImpl;
|
||||
public class OSGiRestartingPortMonitor extends AbstractPortMonitor {
|
||||
Logger log = Logger.getLogger(OSGiRestartingPortMonitor.class.getName());
|
||||
|
||||
SystemInformation info = null;
|
||||
|
||||
public OSGiRestartingPortMonitor(Properties properties) {
|
||||
super(properties);
|
||||
|
||||
@@ -38,13 +40,16 @@ public class OSGiRestartingPortMonitor extends AbstractPortMonitor {
|
||||
for (int i=0; i<endpoints.length;i++) {
|
||||
endpoints[i].setBundleName(props_bundles[i].trim());
|
||||
}
|
||||
|
||||
this.info = SystemInformationImpl.getInstance();
|
||||
|
||||
log.info("Started and initialized OSGi monitor. State of SIGAR sysstats library: " + (info == null ? "INACTIVE" : "ACTIVE"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleFailure(Endpoint endpoint) {
|
||||
boolean sysinfo_available = true;
|
||||
SystemInformation info = SystemInformationImpl.getInstance();
|
||||
if (info == null) {
|
||||
if (this.info == null) {
|
||||
sysinfo_available = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user