104 |
|
String date = new Long(System.currentTimeMillis()).toString(); |
105 |
|
String hostname = _socket.getInetAddress().getHostName(); |
106 |
|
String ipadd = _socket.getInetAddress().getHostAddress(); |
107 |
– |
String xml = "<packet type=\"heartbeat\" machine_name=\""+hostname+"\" date=\""+date+"\" ip=\""+ipadd+"\"></packet>"; |
107 |
|
|
108 |
+ |
// run the service checks for this host |
109 |
+ |
String checks = PluginServiceCheckManager.getInstance().runServiceChecks(hostname); |
110 |
+ |
|
111 |
+ |
// build the heartbeat packet |
112 |
+ |
String xml = "<packet type=\"heartbeat\" machine_name=\""+hostname+"\" date=\""+date+"\" ip=\""+ipadd+"\">" + checks + "</packet>"; |
113 |
+ |
|
114 |
+ |
// get it to be sent on |
115 |
|
_queue.add(xml); |
116 |
|
|
117 |
|
} catch (Exception e) { |