Search in sources :

Example 1 with PayLoadFields

use of org.sakuli.services.forwarder.gearman.model.PayLoadFields in project sakuli by ConSol.

the class NagiosCheckResultBuilder method build.

@Override
public NagiosCheckResult build() {
    extractData(testSuite, gearmanProperties);
    NagiosCheckResult result = new NagiosCheckResult(queueName, uuid);
    SortedMap<PayLoadFields, String> payload = new TreeMap<>();
    payload.put(TYPE, type);
    //host name from properties file can overwrites the determined of the suite
    if (hostProperties != null) {
        payload.put(HOST, hostProperties);
    } else {
        payload.put(HOST, hostSuite);
    }
    payload.put(START_TIME, startTime);
    payload.put(FINISH_TIME, finishTime);
    payload.put(RETURN_CODE, returnCode);
    payload.put(SERVICE_DESC, serviceDesc);
    payload.put(OUTPUT, output.getOutputString());
    result.setPayload(payload);
    return result;
}
Also used : PayLoadFields(org.sakuli.services.forwarder.gearman.model.PayLoadFields) NagiosCheckResult(org.sakuli.services.forwarder.gearman.model.NagiosCheckResult) TreeMap(java.util.TreeMap)

Aggregations

TreeMap (java.util.TreeMap)1 NagiosCheckResult (org.sakuli.services.forwarder.gearman.model.NagiosCheckResult)1 PayLoadFields (org.sakuli.services.forwarder.gearman.model.PayLoadFields)1