Skip to content

Commit

Permalink
make HealthMonitor thresholds configurable #8556 (#10321)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5612704)
  • Loading branch information
rymsha committed Nov 3, 2023
1 parent 36887d4 commit 93e36f4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@

int system_hazelcast_mastership_claim_timeout_seconds() default 120;

String system_hazelcast_health_monitoring_level() default "SILENT";

int system_hazelcast_health_monitoring_threshold_cpu_percentage() default 70;

int system_hazelcast_health_monitoring_threshold_memory_percentage() default 90;

int hazelcast_wait_seconds_before_join() default 5;

int hazelcast_max_wait_seconds_before_join() default 20;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ public Config configure()
config.setProperty( GroupProperty.PHONE_HOME_ENABLED.getName(),
String.valueOf( hazelcastConfig.system_hazelcast_phone_home_enabled() ) );

config.setProperty( GroupProperty.HEALTH_MONITORING_LEVEL.getName(),
String.valueOf( hazelcastConfig.system_hazelcast_health_monitoring_level() ) );

config.setProperty( GroupProperty.HEALTH_MONITORING_THRESHOLD_CPU_PERCENTAGE.getName(),
String.valueOf( hazelcastConfig.system_hazelcast_health_monitoring_threshold_cpu_percentage() ) );

config.setProperty( GroupProperty.HEALTH_MONITORING_THRESHOLD_MEMORY_PERCENTAGE.getName(),
String.valueOf( hazelcastConfig.system_hazelcast_health_monitoring_threshold_memory_percentage() ) );

config.setProperty( GroupProperty.WAIT_SECONDS_BEFORE_JOIN.getName(),
String.valueOf( hazelcastConfig.hazelcast_wait_seconds_before_join() ) );

Expand Down
25 changes: 17 additions & 8 deletions modules/runtime/src/home/config/com.enonic.xp.hazelcast.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,35 @@
## Bind both server-socket and client-sockets to any local interface.
#system.hazelcast.socket.bind.any=true

# Initial expected cluster size to wait before node to start completely
## Initial expected cluster size to wait before node to start completely
#system.hazelcast.initial.min.cluster.size=2

# Prefer IPv4 Stack, don't use IPv6
## Prefer IPv4 Stack, don't use IPv6
#system.hazelcast.prefer.ipv4.stack=true

# The number of incremental ports, starting with the port number defined in the network configuration, that is used to connect to a host.
## The number of incremental ports, starting with the port number defined in the network configuration, that is used to connect to a host.
#system.hazelcast.tcp.join.port.try.count=1

# Maximum timeout of heartbeat in seconds for a member to assume it is dead.
## Maximum timeout of heartbeat in seconds for a member to assume it is dead.
#system.hazelcast.max.no.heartbeat.seconds=60

# Heartbeat send interval in seconds.
## Heartbeat send interval in seconds.
#system.hazelcast.heartbeat.interval.seconds=5

# Timeout which defines when master candidate gives up waiting for response to its mastership claim.
## Timeout which defines when master candidate gives up waiting for response to its mastership claim.
#system.hazelcast.mastership.claim.timeout.seconds=120

# Wait time before join operation
## Health monitoring log level. NOISY, SILENT, OFF
#system.hazelcast.health.monitoring.level=SILENT

## When the health monitoring level is SILENT, logs are printed only when the CPU usage exceeds this threshold.
#system.hazelcast.health.monitoring.threshold.cpu.percentage=70

## When the health monitoring level is SILENT, logs are printed only when the memory usage exceeds this threshold.
#system.hazelcast.health.monitoring.threshold.memory.percentage=90

## Wait time before join operation
#hazelcast.wait.seconds.before.join=5

# Maximum wait time before join operation
## Maximum wait time before join operation
#hazelcast.max.wait.seconds.before.join=20

0 comments on commit 93e36f4

Please sign in to comment.