public String toJson() {
   return String.format(
       "{\"agentName\":\"%s\",\"agentHostname\":\"%s\",\"time\":\"%s\",\"subject\":\"%s\",\"predicate\":\"%s\",\"value\":\"%s\"}",
       this.agentName,
       AgentHostname.get(agentName),
       ISO8601.format(new Date(time)),
       subject,
       predicate,
       value);
 }
Beispiel #2
0
 public String toJson() {
   return String.format(
       "{\"id\":\"%s\",\"agentName\":\"%s\",\"agentHostname\":\"%s\",\"time\":\"%s\",\"shortMessage\":\"%s\",\"message\":\"%s\"}",
       this.id,
       this.agentName,
       AgentHostname.get(this.agentName),
       ISO8601.format(new Date(time)),
       shortMessage,
       message);
 }