This check monitors Hazelcast v4.0+.
The Hazelcast check is included in the Datadog Agent package. No additional installation is needed on your server.
To configure this check for an Agent running on a host:
-
Edit the
hazelcast.d/conf.yaml
file, in theconf.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.
-
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
-
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.
-
Collecting logs is disabled by default in the Datadog Agent. Enable it in your
datadog.yaml
file:logs_enabled: true
-
Add the following configuration block to your
hazelcast.d/conf.yaml
file. Change thepath
andservice
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}
For containerized environments, see the Autodiscovery with JMX guide.
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>"} |
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
See metadata.csv for a list of metrics provided by this check.
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.
Hazelcast does not include any events.
See service_checks.json for a list of service checks provided by this integration.
Need help? Contact Datadog support.