use of com.sequenceiq.node.health.client.CdpNodeStatusMonitorClientException in project cloudbreak by hortonworks.
the class NodeStatusService method saltPing.
public RPCResponse<NodeStatusProto.SaltHealthReport> saltPing(Long stackId) {
Stack stack = stackService.getByIdWithListsInTransaction(stackId);
MDCBuilder.buildMdcContext(stack);
LOGGER.debug("Retrieving salt ping report from the hosts of stack: {}", stack.getResourceCrn());
try (CdpNodeStatusMonitorClient client = factory.getClient(stack, stack.getPrimaryGatewayInstance())) {
return client.saltPing(false, false);
} catch (CdpNodeStatusMonitorClientException e) {
throw new CloudbreakServiceException("Could not get salt ping report from stack.");
}
}
use of com.sequenceiq.node.health.client.CdpNodeStatusMonitorClientException in project cloudbreak by hortonworks.
the class NodeStatusService method getSystemMetrics.
public RPCResponse<NodeStatusProto.NodeStatusReport> getSystemMetrics(Stack stack) {
MDCBuilder.buildMdcContext(stack);
LOGGER.debug("Retrieving system metrics report from the hosts of stack: {}", stack.getResourceCrn());
try (CdpNodeStatusMonitorClient client = factory.getClient(stack, stack.getPrimaryGatewayInstance())) {
return client.systemMetricsReport();
} catch (CdpNodeStatusMonitorClientException e) {
throw new CloudbreakServiceException("Could not get system metrics report from stack.");
}
}
use of com.sequenceiq.node.health.client.CdpNodeStatusMonitorClientException in project cloudbreak by hortonworks.
the class NodeStatusService method getMeteringReport.
public RPCResponse<NodeStatusProto.NodeStatusReport> getMeteringReport(Stack stack) {
MDCBuilder.buildMdcContext(stack);
LOGGER.debug("Retrieving metering report from the hosts of stack: {}", stack.getResourceCrn());
try (CdpNodeStatusMonitorClient client = factory.getClient(stack, stack.getPrimaryGatewayInstance())) {
return client.nodeMeteringReport();
} catch (CdpNodeStatusMonitorClientException e) {
throw new CloudbreakServiceException("Could not get metering report from stack.");
}
}
use of com.sequenceiq.node.health.client.CdpNodeStatusMonitorClientException in project cloudbreak by hortonworks.
the class NodeStatusService method getSaltReport.
public RPCResponse<NodeStatusProto.SaltHealthReport> getSaltReport(Long stackId) {
Stack stack = stackService.getByIdWithListsInTransaction(stackId);
MDCBuilder.buildMdcContext(stack);
LOGGER.debug("Retrieving salt report from the hosts of stack: {}", stack.getResourceCrn());
try (CdpNodeStatusMonitorClient client = factory.getClient(stack, stack.getPrimaryGatewayInstance())) {
return client.saltReport();
} catch (CdpNodeStatusMonitorClientException e) {
throw new CloudbreakServiceException("Could not get salt report from stack.");
}
}
use of com.sequenceiq.node.health.client.CdpNodeStatusMonitorClientException in project cloudbreak by hortonworks.
the class NodeStatusService method getServicesReport.
public RPCResponse<NodeStatusProto.NodeStatusReport> getServicesReport(Stack stack) {
MDCBuilder.buildMdcContext(stack);
LOGGER.debug("Retrieving services report from the hosts of stack: {}", stack.getResourceCrn());
try (CdpNodeStatusMonitorClient client = factory.getClient(stack, stack.getPrimaryGatewayInstance())) {
return client.nodeServicesReport();
} catch (CdpNodeStatusMonitorClientException e) {
throw new CloudbreakServiceException("Could not get services report from stack.");
}
}
Aggregations