Skip to content

Latest commit

 

History

History
 
 

hazelcast

Agent Check: Hazelcast

Overview

This check monitors Hazelcast v4.0+.

Setup

Installation

The Hazelcast check is included in the Datadog Agent package. No additional installation is needed on your server.

Configuration

Host

To configure this check for an Agent running on a host:

Metric collection
  1. Edit the hazelcast.d/conf.yaml file, in the conf.d/ folder at the root of your Agent's configuration directory to start collecting your Hazelcast performance data. See the sample hazelcast.d/conf.yaml for all available configuration options.

    This check has a limit of 350 metrics per instance. The number of returned metrics is indicated in the info page. You can specify the metrics you are interested in by editing the configuration below. To learn how to customize the metrics to collect, see the JMX Checks documentation for more detailed instructions. If you need to monitor more metrics, contact Datadog support.

  2. Restart the Agent.

Log collection
  1. Hazelcast supports many different logging adapters. Here is an example of a log4j2.properties file:

    rootLogger=file
    rootLogger.level=info
    property.filepath=/path/to/log/files
    property.filename=hazelcast
    
    appender.file.type=RollingFile
    appender.file.name=RollingFile
    appender.file.fileName=${filepath}/${filename}.log
    appender.file.filePattern=${filepath}/${filename}-%d{yyyy-MM-dd}-%i.log.gz
    appender.file.layout.type=PatternLayout
    appender.file.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} [%thread] %level{length=10} %c{1}:%L - %m%n
    appender.file.policies.type=Policies
    appender.file.policies.time.type=TimeBasedTriggeringPolicy
    appender.file.policies.time.interval=1
    appender.file.policies.time.modulate=true
    appender.file.policies.size.type=SizeBasedTriggeringPolicy
    appender.file.policies.size.size=50MB
    appender.file.strategy.type=DefaultRolloverStrategy
    appender.file.strategy.max=100
    
    rootLogger.appenderRefs=file
    rootLogger.appenderRef.file.ref=RollingFile
    
    #Hazelcast specific logs.
    
    #log4j.logger.com.hazelcast=debug
    
    #log4j.logger.com.hazelcast.cluster=debug
    #log4j.logger.com.hazelcast.partition=debug
    #log4j.logger.com.hazelcast.partition.InternalPartitionService=debug
    #log4j.logger.com.hazelcast.nio=debug
    #log4j.logger.com.hazelcast.hibernate=debug
    
  2. By default, Datadog's integration pipeline supports the following conversion pattern:

    %d{yyyy-MM-dd HH:mm:ss} [%thread] %level{length=10} %c{1}:%L - %m%n
    

    Clone and edit the integration pipeline if you have a different format.

  3. Collecting logs is disabled by default in the Datadog Agent. Enable it in your datadog.yaml file:

    logs_enabled: true
  4. Add the following configuration block to your hazelcast.d/conf.yaml file. Change the path and service parameter values based on your environment. See the sample hazelcast.d/conf.yaml for all available configuration options.

    logs:
      - type: file
        path: /var/log/hazelcast.log
        source: hazelcast
        service: <SERVICE>
        log_processing_rules:
          - type: multi_line
            name: log_start_with_date
            pattern: \d{4}\.\d{2}\.\d{2}
  5. Restart the Agent.

Containerized

Metric collection

For containerized environments, see the Autodiscovery with JMX guide.

Log collection

Collecting logs is disabled by default in the Datadog Agent. To enable it, see Docker log collection.

Parameter Value
<LOG_CONFIG> {"source": "hazelcast", "service": "<SERVICE_NAME>"}

Validation

Run the Agent's status subcommand and look for hazelcast under the JMXFetch section:

========
JMXFetch
========
  Initialized checks
  ==================
    hazelcast
      instance_name : hazelcast-localhost-9999
      message :
      metric_count : 46
      service_check_count : 0
      status : OK

Data Collected

Metrics

See metadata.csv for a list of metrics provided by this check.

Service Checks

hazelcast.can_connect:
Returns CRITICAL if the Agent is unable to connect to and collect metrics from the monitored Hazelcast instance, otherwise returns OK.

hazelcast.mc_cluster_state:
Represents the state of the Hazelcast Management Center as indicated by its health check.

Events

Hazelcast does not include any events.

Service Checks

See service_checks.json for a list of service checks provided by this integration.

Troubleshooting

Need help? Contact Datadog support.