use of org.apache.ignite.spi.metric.jmx.JmxMetricExporterSpi in project ignite by apache.
the class ConfiguringMetrics method newMetrics.
@Test
void newMetrics() {
// tag::new-metric-framework[]
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setMetricExporterSpi(new JmxMetricExporterSpi(), new SqlViewMetricExporterSpi());
Ignite ignite = Ignition.start(cfg);
// end::new-metric-framework[]
ignite.close();
}
use of org.apache.ignite.spi.metric.jmx.JmxMetricExporterSpi in project ignite by apache.
the class ConfiguringMetrics method jmxExporter.
@Test
void jmxExporter() {
// tag::metrics-filter[]
IgniteConfiguration cfg = new IgniteConfiguration();
JmxMetricExporterSpi jmxExporter = new JmxMetricExporterSpi();
// export cache metrics only
jmxExporter.setExportFilter(mreg -> mreg.name().startsWith("cache."));
cfg.setMetricExporterSpi(jmxExporter);
// end::metrics-filter[]
Ignition.start(cfg).close();
}
use of org.apache.ignite.spi.metric.jmx.JmxMetricExporterSpi in project ignite by apache.
the class GridTransactionsSystemUserTimeMetricsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setGridLogger(testLog);
boolean isClient = igniteInstanceName.contains(CLIENT);
if (!isClient) {
CacheConfiguration ccfg = new CacheConfiguration(CACHE_NAME);
ccfg.setAtomicityMode(TRANSACTIONAL);
ccfg.setBackups(1);
ccfg.setWriteSynchronizationMode(FULL_SYNC);
cfg.setCacheConfiguration(ccfg);
}
cfg.setMetricExporterSpi(new JmxMetricExporterSpi());
cfg.setCommunicationSpi(new TestCommunicationSpi());
return cfg;
}
use of org.apache.ignite.spi.metric.jmx.JmxMetricExporterSpi in project ignite by apache.
the class JmxExporterSpiTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
cfg.setDataStorageConfiguration(new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true)));
JmxMetricExporterSpi jmxSpi = new JmxMetricExporterSpi();
jmxSpi.setExportFilter(mgrp -> !mgrp.name().startsWith(FILTERED_PREFIX));
cfg.setMetricExporterSpi(jmxSpi);
return cfg;
}
use of org.apache.ignite.spi.metric.jmx.JmxMetricExporterSpi in project ignite by apache.
the class GridServiceMetricsTest method getConfiguration.
/**
* {@inheritDoc}
*/
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
// JMX metrics exposition to see actual namings and placement of the metrics.
cfg.setMetricExporterSpi(new JmxMetricExporterSpi());
return cfg;
}
Aggregations