Search in sources :

Example 6 with MonitoringResponse

use of com.sequenceiq.common.api.telemetry.response.MonitoringResponse in project cloudbreak by hortonworks.

the class TelemetryConverter method createMonitoringResponseFromSource.

private MonitoringResponse createMonitoringResponseFromSource(Telemetry telemetry) {
    MonitoringResponse monitoringResponse = null;
    if (telemetry.getMonitoring() != null) {
        LOGGER.debug("Setting monitoring telemetry settings (response).");
        Monitoring monitoring = telemetry.getMonitoring();
        monitoringResponse = new MonitoringResponse();
        monitoringResponse.setRemoteWriteUrl(monitoring.getRemoteWriteUrl());
    }
    return monitoringResponse;
}
Also used : MonitoringResponse(com.sequenceiq.common.api.telemetry.response.MonitoringResponse) Monitoring(com.sequenceiq.common.api.telemetry.model.Monitoring)

Example 7 with MonitoringResponse

use of com.sequenceiq.common.api.telemetry.response.MonitoringResponse in project cloudbreak by hortonworks.

the class TelemetryConverter method convert.

public TelemetryResponse convert(Telemetry telemetry) {
    TelemetryResponse response = null;
    if (telemetry != null) {
        LoggingResponse loggingResponse = createLoggingResponseFromSource(telemetry);
        MonitoringResponse monitoringResponse = createMonitoringResponseFromSource(telemetry);
        WorkloadAnalyticsResponse waResponse = createWorkloadAnalyticsResponseFromSource(telemetry);
        response = new TelemetryResponse();
        response.setLogging(loggingResponse);
        response.setMonitoring(monitoringResponse);
        response.setWorkloadAnalytics(waResponse);
        response.setFluentAttributes(telemetry.getFluentAttributes());
        response.setRules(telemetry.getRules());
        createFeaturesResponseFromSource(response, telemetry.getFeatures());
    }
    return response;
}
Also used : TelemetryResponse(com.sequenceiq.common.api.telemetry.response.TelemetryResponse) WorkloadAnalyticsResponse(com.sequenceiq.common.api.telemetry.response.WorkloadAnalyticsResponse) LoggingResponse(com.sequenceiq.common.api.telemetry.response.LoggingResponse) MonitoringResponse(com.sequenceiq.common.api.telemetry.response.MonitoringResponse)

Aggregations

MonitoringResponse (com.sequenceiq.common.api.telemetry.response.MonitoringResponse)7 TelemetryResponse (com.sequenceiq.common.api.telemetry.response.TelemetryResponse)3 MonitoringRequest (com.sequenceiq.common.api.telemetry.request.MonitoringRequest)2 TelemetryRequest (com.sequenceiq.common.api.telemetry.request.TelemetryRequest)2 LoggingResponse (com.sequenceiq.common.api.telemetry.response.LoggingResponse)2 Monitoring (com.sequenceiq.common.api.telemetry.model.Monitoring)1 FeaturesRequest (com.sequenceiq.common.api.telemetry.request.FeaturesRequest)1 LoggingRequest (com.sequenceiq.common.api.telemetry.request.LoggingRequest)1 FeaturesResponse (com.sequenceiq.common.api.telemetry.response.FeaturesResponse)1 WorkloadAnalyticsResponse (com.sequenceiq.common.api.telemetry.response.WorkloadAnalyticsResponse)1 Test (org.junit.Test)1