public List<MonitorStat> retrieve(String traceId, Map<String, Object> conditions) throws Exception { return retrieve(traceId, conditions, ThunderConstant.ENCODING_UTF_8); }
public void actionPerformed(ActionEvent e) { Map<String, String> splunkValue = new HashMap<String, String>(); splunkValue.put(ThunderConstant.SPLUNK_HOST_ATTRIBUTE_NAME, hostComboBox.getSelectedItem().toString()); splunkValue.put(ThunderConstant.SPLUNK_PORT_ATTRIBUTE_NAME, portTextField.getText().trim()); splunkValue.put(ThunderConstant.SPLUNK_USER_NAME_ATTRIBUTE_NAME, userNameTextField.getText().trim()); splunkValue.put(ThunderConstant.SPLUNK_PASSWORD_ATTRIBUTE_NAME, passwordField.getPasswordText().trim()); PropertiesContext.addPropertiesMap(splunkValue); try { MonitorController.getSplunkLogServiceMonitorRetriever().dispose(); MonitorController.getSplunkLogServiceMonitorRetriever().initialize(PropertiesContext.getProperties()); } catch (Exception ex) { } if (MonitorController.getSplunkLogServiceMonitorRetriever().enabled()) { JBasicOptionPane.showMessageDialog(HandleManager.getFrame(TraceTopology.this), ConsoleLocale.getString("start_success"), SwingLocale.getString("information"), JBasicOptionPane.INFORMATION_MESSAGE); } else { JBasicOptionPane.showMessageDialog(HandleManager.getFrame(TraceTopology.this), ConsoleLocale.getString("start_failure"), SwingLocale.getString("error"), JBasicOptionPane.ERROR_MESSAGE); } } });
public void initialize(ThunderProperties properties) throws Exception { this.properties = properties; if (service == null) { try { ServiceArgs loginArgs = new ServiceArgs(); loginArgs.setHost(properties.getString(ThunderConstant.SPLUNK_HOST_ATTRIBUTE_NAME)); loginArgs.setPort(properties.getInteger(ThunderConstant.SPLUNK_PORT_ATTRIBUTE_NAME)); loginArgs.setUsername(properties.getString(ThunderConstant.SPLUNK_USER_NAME_ATTRIBUTE_NAME)); loginArgs.setPassword(properties.getString(ThunderConstant.SPLUNK_PASSWORD_ATTRIBUTE_NAME)); loginArgs.setSSLSecurityProtocol(SSLSecurityProtocol.TLSv1_2); service = Service.connect(loginArgs); } catch (Exception e) { LOG.error("Initialize Splunk connection failed", e); dispose(); } } }
public static List<MonitorStat> retrieveFromSplunk(String traceId, Map<String, Object> conditions) throws Exception { return splunkLogServiceMonitorRetriever.retrieve(traceId, conditions); }
public List<MonitorStat> retrieve(String traceId) throws Exception { return retrieve(traceId, null); }