本文整理汇总了Java中com.appdynamics.extensions.conf.MonitorConfiguration.checkIfInitialized方法的典型用法代码示例。如果您正苦于以下问题:Java MonitorConfiguration.checkIfInitialized方法的具体用法?Java MonitorConfiguration.checkIfInitialized怎么用?Java MonitorConfiguration.checkIfInitialized使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.appdynamics.extensions.conf.MonitorConfiguration
的用法示例。
在下文中一共展示了MonitorConfiguration.checkIfInitialized方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
private void initialize(Map<String, String> argsMap) {
if (!initialized) {
final String configFilePath = argsMap.get(CONFIG_ARG);
MetricWriteHelper metricWriteHelper = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration(METRIC_PREFIX, new TaskRunnable(), metricWriteHelper);
conf.setConfigYml(configFilePath);
conf.checkIfInitialized(MonitorConfiguration.ConfItem.CONFIG_YML, MonitorConfiguration.ConfItem.METRIC_PREFIX,
MonitorConfiguration.ConfItem.METRIC_WRITE_HELPER, MonitorConfiguration.ConfItem.EXECUTOR_SERVICE);
this.configuration = conf;
initXstream();
initialized = true;
}
}
开发者ID:Appdynamics,项目名称:azure-servicebus-monitoring-extension,代码行数:18,代码来源:AzureServiceBusMonitor.java
示例2: initialize
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
private void initialize(String configFile, String metricFile) {
if (!initialized) {
MetricWriteHelper metricWriteHelper = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration(METRIC_PREFIX, new TaskRunnable(), metricWriteHelper);
conf.setConfigYml(configFile);
conf.setMetricsXml(metricFile, Stat.Stats.class);
conf.checkIfInitialized(MonitorConfiguration.ConfItem.CONFIG_YML, MonitorConfiguration.ConfItem.METRICS_XML, MonitorConfiguration.ConfItem.EXECUTOR_SERVICE,
MonitorConfiguration.ConfItem.METRIC_PREFIX, MonitorConfiguration.ConfItem.METRIC_WRITE_HELPER);
this.configuration = conf;
initialized = true;
}
}
示例3: initAmbariConfig
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
protected MonitorConfiguration initAmbariConfig(Map<String, String> taskArgs) {
logger.info("Initializing the Ambari Monitor Configuration");
String configFilename = getConfigFilename(taskArgs.get(CONFIG_ARG));
MetricWriteHelper metricWriteHelper = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration("Custom Metrics|HadoopMonitor|Ambari",
new AmbariMonitorExecutor(), metricWriteHelper);
String xmlPath = getPath(taskArgs, AMBARI_METRICS_XML_ARG, "monitors/HadoopMonitor/metrics-ambari.xml");
conf.setMetricsXml(xmlPath, MetricConfig.class);
conf.setConfigYml(configFilename, "ambariMonitor");
if (conf.isEnabled()) {
conf.checkIfInitialized(ConfItem.CONFIG_YML, ConfItem.METRIC_PREFIX,
ConfItem.METRIC_WRITE_HELPER, ConfItem.METRICS_XML);
} else {
logger.info("The Ambari Monitor is not enabled");
}
return conf;
}
示例4: initResourceManagerConfig
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
protected MonitorConfiguration initResourceManagerConfig(Map<String, String> taskArgs) {
logger.info("Initializing the Resource Manager Monitor Configuration");
String configFilename = getConfigFilename(taskArgs.get(CONFIG_ARG));
MetricWriteHelper metricWriteHelper = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration("Custom Metrics|HadoopMonitor|ResourceManager",
new RMMonitorExecutor(), metricWriteHelper);
String xmlPath = getPath(taskArgs, RM_METRICS_XML_ARG, "monitors/HadoopMonitor/metrics-resource-manager.xml");
conf.setMetricsXml(xmlPath, MetricConfig.class);
conf.setConfigYml(configFilename, new ConfigReloader(), "resourceManagerMonitor");
if (conf.isEnabled()) {
conf.checkIfInitialized(ConfItem.CONFIG_YML, ConfItem.METRIC_PREFIX, ConfItem.METRIC_WRITE_HELPER);
} else{
logger.info("The Resource Manager Monitor is not enabled");
}
return conf;
}
示例5: configure
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
private void configure(Map<String, String> argsMap) {
logger.info("Initializing the Linux Configuration");
MetricWriteHelper metricWriteHelper = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration(metricPrefix, new TaskRunnable(), metricWriteHelper);
configFileName = argsMap.get("config-file");
if(Strings.isNullOrEmpty(configFileName)){
configFileName = "monitors/LinuxMonitor/config.yml";
}
conf.setConfigYml(configFileName);
conf.checkIfInitialized(MonitorConfiguration.ConfItem.CONFIG_YML, MonitorConfiguration.ConfItem.EXECUTOR_SERVICE,
MonitorConfiguration.ConfItem.METRIC_PREFIX, MonitorConfiguration.ConfItem.METRIC_WRITE_HELPER);
this.configuration = conf;
String prefix = (String)this.configuration.getConfigYml().get("metricPrefix");
if(!Strings.isNullOrEmpty(prefix)){
metricPrefix = prefix;
}
initialized = true;
}
示例6: initialize
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
private void initialize(String configFile) {
if (!initialized) {
MetricWriteHelper metricWriteHelper = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration(METRIC_PREFIX, new TaskRunnable(), metricWriteHelper);
conf.setConfigYml(configFile, new MonitorConfiguration.FileWatchListener() {
public void onFileChange(File file) {
connect();
}
});
conf.checkIfInitialized(MonitorConfiguration.ConfItem.CONFIG_YML, MonitorConfiguration.ConfItem.METRIC_PREFIX, MonitorConfiguration.ConfItem.METRIC_WRITE_HELPER);
this.configuration = conf;
connect();
initialized = true;
}
}
示例7: initialize
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
private void initialize(Map<String, String> taskArgs) {
if(!initialized) {
final String configFilePath = taskArgs.get(CONFIG_ARG);
MetricWriteHelper metricWriteHelper = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration(METRIC_PREFIX, new TaskRunnable(), metricWriteHelper);
String metricXMLFilePath = getPath(taskArgs, METRIC_XML_ARG, "monitors/MarkLogicMonitor/metrics.xml");
conf.setMetricsXml(metricXMLFilePath, MetricConfig.class);
conf.setConfigYml(configFilePath);
conf.checkIfInitialized(ConfItem.CONFIG_YML, ConfItem.METRICS_XML, ConfItem.EXECUTOR_SERVICE, ConfItem.HTTP_CLIENT, ConfItem.METRIC_PREFIX, ConfItem.METRIC_WRITE_HELPER);
this.configuration = conf;
initialized = true;
}
}
示例8: initialize
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
private void initialize(Map<String, String> taskArgs) {
if (!initialized) {
//read the config.
final String configFilePath = taskArgs.get(CONFIG_ARG);
MetricWriteHelper metricWriteHelper = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration(METRIC_PREFIX, new TaskRunnable(), metricWriteHelper);
conf.setConfigYml(configFilePath);
conf.checkIfInitialized(MonitorConfiguration.ConfItem.CONFIG_YML, MonitorConfiguration.ConfItem.EXECUTOR_SERVICE,
MonitorConfiguration.ConfItem.METRIC_PREFIX, MonitorConfiguration.ConfItem.METRIC_WRITE_HELPER);
this.configuration = conf;
initialized = true;
}
}
示例9: initialize
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
protected void initialize(Map<String, String> argsMap) {
if (configuration == null) {
MetricWriteHelper metricWriter = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration("Custom Metrics|Solr|", new TaskRunner(), metricWriter);
final String configFilePath = argsMap.get("config-file");
conf.setConfigYml(configFilePath);
conf.checkIfInitialized(MonitorConfiguration.ConfItem.METRIC_PREFIX, MonitorConfiguration.ConfItem.CONFIG_YML, MonitorConfiguration.ConfItem.HTTP_CLIENT
, MonitorConfiguration.ConfItem.EXECUTOR_SERVICE);
this.configuration = conf;
}
}
示例10: initialize
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
private void initialize(Map<String, String> taskArgs) {
if(!initialized) {
logger.debug("Initializing Elastic Search Monitor configuration");
final String configFilePath = taskArgs.get(CONFIG_ARG);
MetricWriteHelper metricWriteHelper = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration(METRIC_PREFIX, new TaskRunnable(), metricWriteHelper);
conf.setConfigYml(configFilePath);
conf.checkIfInitialized(MonitorConfiguration.ConfItem.CONFIG_YML, MonitorConfiguration.ConfItem.EXECUTOR_SERVICE, MonitorConfiguration.ConfItem.HTTP_CLIENT, MonitorConfiguration.ConfItem.METRIC_PREFIX, MonitorConfiguration.ConfItem.METRIC_WRITE_HELPER);
this.configuration = conf;
initialized = true;
}
}
示例11: initialize
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
private void initialize(Map<String, String> argsMap) {
if (!initialized) {
final String configFilePath = argsMap.get(CONFIG_ARG);
MetricWriteHelper metricWriteHelper = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration(METRIC_PREFIX, new TaskRunnable(), metricWriteHelper);
conf.setConfigYml(configFilePath);
conf.checkIfInitialized(MonitorConfiguration.ConfItem.CONFIG_YML, MonitorConfiguration.ConfItem.METRIC_PREFIX,
MonitorConfiguration.ConfItem.METRIC_WRITE_HELPER, MonitorConfiguration.ConfItem.HTTP_CLIENT, MonitorConfiguration.ConfItem.EXECUTOR_SERVICE);
this.configuration = conf;
initialized = true;
}
}
示例12: initialize
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
protected void initialize (Map<String, String> argsMap) {
if (configuration == null) {
MetricWriteHelper metricWriter = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration("Custom Metrics|Cassandra|", new TaskRunner(),
metricWriter);
final String configFilePath = argsMap.get("config-file");
conf.setConfigYml(configFilePath);
conf.checkIfInitialized(MonitorConfiguration.ConfItem.METRIC_PREFIX, MonitorConfiguration.ConfItem
.CONFIG_YML, MonitorConfiguration.ConfItem.HTTP_CLIENT, MonitorConfiguration.ConfItem
.EXECUTOR_SERVICE);
this.configuration = conf;
}
}
示例13: initialize
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
private void initialize(Map<String, String> taskArgs) {
if (configuration == null) {
MetricWriteHelper metricWriter = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration("Custom Metrics|ActiveMQ|", new TaskRunner(), metricWriter);
final String configFilePath = taskArgs.get("config-file");
conf.setConfigYml(configFilePath);
conf.checkIfInitialized(MonitorConfiguration.ConfItem.METRIC_PREFIX, MonitorConfiguration.ConfItem
.CONFIG_YML, MonitorConfiguration.ConfItem.HTTP_CLIENT, MonitorConfiguration.ConfItem
.EXECUTOR_SERVICE);
this.configuration = conf;
}
}
示例14: initialize
import com.appdynamics.extensions.conf.MonitorConfiguration; //导入方法依赖的package包/类
protected void initialize(Map<String, String> argsMap) {
if (configuration == null) {
MetricWriteHelper metricWriter = MetricWriteHelperFactory.create(this);
MonitorConfiguration conf = new MonitorConfiguration("Custom Metrics|WebServer|NGinX", new TaskRunner(),metricWriter);
final String configFilePath = argsMap.get("config-file");
conf.setConfigYml(configFilePath);
conf.checkIfInitialized(MonitorConfiguration.ConfItem.METRIC_PREFIX, MonitorConfiguration.ConfItem.CONFIG_YML, MonitorConfiguration.ConfItem.HTTP_CLIENT
, MonitorConfiguration.ConfItem.EXECUTOR_SERVICE);
this.configuration = conf;
}
}