org.elasticsearch.monitor.jvm.JvmService Java Examples

The following examples show how to use org.elasticsearch.monitor.jvm.JvmService. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NodeSysExpression.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public NodeSysExpression(ClusterService clusterService,
                         OsService osService,
                         NodeService nodeService,
                         JvmService jvmService,
                         NodeEnvironment nodeEnvironment,
                         Discovery discovery,
                         ThreadPool threadPool,
                         ExtendedNodeInfo extendedNodeInfo) {
    this.nodeService = nodeService;
    this.osService = osService;
    this.jvmService = jvmService;
    this.nodeEnvironment = nodeEnvironment;
    this.extendedNodeInfo = extendedNodeInfo;
    childImplementations.put(SysNodesTableInfo.SYS_COL_HOSTNAME,
            new NodeHostnameExpression(clusterService));
    childImplementations.put(SysNodesTableInfo.SYS_COL_REST_URL,
            new NodeRestUrlExpression(clusterService));
    childImplementations.put(SysNodesTableInfo.SYS_COL_ID,
            new NodeIdExpression(clusterService));
    childImplementations.put(SysNodesTableInfo.SYS_COL_NODE_NAME,
            new NodeNameExpression(discovery));
    childImplementations.put(SysNodesTableInfo.SYS_COL_PORT,
            new NodePortExpression(nodeService));
    childImplementations.put(SysNodesTableInfo.SYS_COL_VERSION,
            new NodeVersionExpression());
    childImplementations.put(SysNodesTableInfo.SYS_COL_THREAD_POOLS,
            new NodeThreadPoolsExpression(threadPool));
    childImplementations.put(SysNodesTableInfo.SYS_COL_OS_INFO,
            new NodeOsInfoExpression(osService.info()));
}
 
Example #2
Source File: MonitorService.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public MonitorService(Settings settings, JvmMonitorService jvmMonitorService,
                      OsService osService, ProcessService processService, JvmService jvmService,
                      FsService fsService) {
    super(settings);
    this.jvmMonitorService = jvmMonitorService;
    this.osService = osService;
    this.processService = processService;
    this.jvmService = jvmService;
    this.fsService = fsService;
}
 
Example #3
Source File: MonitorModule.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
protected void configure() {
    // bind default implementations
    bind(ProcessProbe.class).toInstance(ProcessProbe.getInstance());
    bind(OsProbe.class).toInstance(OsProbe.getInstance());
    bind(FsProbe.class).asEagerSingleton();

    // bind other services
    bind(ProcessService.class).asEagerSingleton();
    bind(OsService.class).asEagerSingleton();
    bind(JvmService.class).asEagerSingleton();
    bind(FsService.class).asEagerSingleton();

    bind(JvmMonitorService.class).asEagerSingleton();
}
 
Example #4
Source File: MonitorService.java    From crate with Apache License 2.0 5 votes vote down vote up
public MonitorService(Settings settings,
                      NodeEnvironment nodeEnvironment,
                      ThreadPool threadPool,
                      ClusterInfoService clusterInfoService) {
    this.jvmGcMonitorService = new JvmGcMonitorService(settings, threadPool);
    this.osService = new OsService(settings);
    this.processService = new ProcessService(settings);
    this.jvmService = new JvmService(settings);
    this.fsService = new FsService(settings, nodeEnvironment, clusterInfoService);
}
 
Example #5
Source File: ModelManager.java    From anomaly-detection with Apache License 2.0 4 votes vote down vote up
/**
 * Constructor.
 *
 * @param nodeFilter utility class to select nodes
 * @param jvmService jvm info
 * @param rcfSerde RCF model serialization
 * @param checkpointDao model checkpoint storage
 * @param gson thresholding model serialization
 * @param clock clock for system time
 * @param modelDesiredSizePercentage percentage of heap for the desired size of a model
 * @param modelMaxSizePercentage percentage of heap for the max size of a model
 * @param rcfNumTrees number of trees used in RCF
 * @param rcfNumSamplesInTree number of samples in a RCF tree
 * @param rcfTimeDecay time decay for RCF
 * @param rcfNumMinSamples minimum samples for RCF to score
 * @param thresholdMinPvalue min P-value for thresholding
 * @param thresholdMaxRankError  max rank error for thresholding
 * @param thresholdMaxScore max RCF score to thresholding
 * @param thresholdNumLogNormalQuantiles num of lognormal quantiles for thresholding
 * @param thresholdDownsamples the number of samples to keep during downsampling
 * @param thresholdMaxSamples the max number of samples before downsampling
 * @param thresholdingModelClass class of thresholding model
 * @param minPreviewSize minimum number of data points for preview
 * @param modelTtl time to live for hosted models
 * @param checkpointInterval interval between checkpoints
 * @param shingleSize required shingle size before RCF emitting anomaly scores
 * @param clusterService cluster service object
 */
public ModelManager(
    DiscoveryNodeFilterer nodeFilter,
    JvmService jvmService,
    RandomCutForestSerDe rcfSerde,
    CheckpointDao checkpointDao,
    Gson gson,
    Clock clock,
    double modelDesiredSizePercentage,
    double modelMaxSizePercentage,
    int rcfNumTrees,
    int rcfNumSamplesInTree,
    double rcfTimeDecay,
    int rcfNumMinSamples,
    double thresholdMinPvalue,
    double thresholdMaxRankError,
    double thresholdMaxScore,
    int thresholdNumLogNormalQuantiles,
    int thresholdDownsamples,
    long thresholdMaxSamples,
    Class<? extends ThresholdingModel> thresholdingModelClass,
    int minPreviewSize,
    Duration modelTtl,
    Duration checkpointInterval,
    int shingleSize,
    ClusterService clusterService
) {

    this.nodeFilter = nodeFilter;
    this.jvmService = jvmService;
    this.rcfSerde = rcfSerde;
    this.checkpointDao = checkpointDao;
    this.gson = gson;
    this.clock = clock;
    this.modelDesiredSizePercentage = modelDesiredSizePercentage;
    this.modelMaxSizePercentage = modelMaxSizePercentage;
    this.rcfNumTrees = rcfNumTrees;
    this.rcfNumSamplesInTree = rcfNumSamplesInTree;
    this.rcfTimeDecay = rcfTimeDecay;
    this.rcfNumMinSamples = rcfNumMinSamples;
    this.thresholdMinPvalue = thresholdMinPvalue;
    this.thresholdMaxRankError = thresholdMaxRankError;
    this.thresholdMaxScore = thresholdMaxScore;
    this.thresholdNumLogNormalQuantiles = thresholdNumLogNormalQuantiles;
    this.thresholdDownsamples = thresholdDownsamples;
    this.thresholdMaxSamples = thresholdMaxSamples;
    this.thresholdingModelClass = thresholdingModelClass;
    this.minPreviewSize = minPreviewSize;
    this.modelTtl = modelTtl;
    this.checkpointInterval = checkpointInterval;

    this.forests = new ConcurrentHashMap<>();
    this.thresholds = new ConcurrentHashMap<>();
    this.shingleSize = shingleSize;

    clusterService.getClusterSettings().addSettingsUpdateConsumer(MODEL_MAX_SIZE_PERCENTAGE, it -> this.modelMaxSizePercentage = it);
}
 
Example #6
Source File: MemoryCircuitBreaker.java    From anomaly-detection with Apache License 2.0 4 votes vote down vote up
public MemoryCircuitBreaker(JvmService jvmService) {
    super(defaultThreshold);
    this.jvmService = jvmService;
}
 
Example #7
Source File: MemoryCircuitBreaker.java    From anomaly-detection with Apache License 2.0 4 votes vote down vote up
public MemoryCircuitBreaker(short threshold, JvmService jvmService) {
    super(threshold);
    this.jvmService = jvmService;
}
 
Example #8
Source File: MonitorService.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
public JvmService jvmService() {
    return this.jvmService;
}
 
Example #9
Source File: MonitorService.java    From crate with Apache License 2.0 4 votes vote down vote up
public JvmService jvmService() {
    return this.jvmService;
}
 
Example #10
Source File: ADCircuitBreakerService.java    From anomaly-detection with Apache License 2.0 2 votes vote down vote up
/**
 * Constructor.
 *
 * @param jvmService jvm info
 */
public ADCircuitBreakerService(JvmService jvmService) {
    this.jvmService = jvmService;
}