How to get cluster information like management center

190 views
Skip to first unread message

xing zhang

unread,
Jun 28, 2019, 4:17:28 AM6/28/19
to Hazelcast
Hi All:

When I deploy hazelcast cluster,   management center can be started. Lots information about the cluster is shown.

But, i use hazelcast inside a java maven project,  I want to get all members' cpu and memory status,  all maps and entries count of each map etc... 

Please tell me how to do.

Thanks!

111111.png




Thomas Kountis

unread,
Jun 28, 2019, 4:19:25 AM6/28/19
to haze...@googlegroups.com
Hi,

Have you tried enabling JMX in Hazelcast? Most of the info available on management center is also available through JMX.

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at https://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/750e22ac-938a-4c81-af4e-e776ed907bb6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ozan Kılıç

unread,
Jun 28, 2019, 4:23:50 AM6/28/19
to haze...@googlegroups.com
>But, i use hazelcast inside a java maven project,  I want to get all members' cpu and memory status,  all maps and entries count of each map etc... 

Just wanted to clarify that you can still use Management Center for embedded setups. 


xing zhang

unread,
Jun 28, 2019, 5:04:50 AM6/28/19
to Hazelcast
Wow!  But I don't know how to use.
Please tell me ,or give me an example.
Thanks

在 2019年6月28日星期五 UTC+8下午4:23:50,Ozan Kılıç写道:
>But, i use hazelcast inside a java maven project,  I want to get all members' cpu and memory status,  all maps and entries count of each map etc... 

Just wanted to clarify that you can still use Management Center for embedded setups. 


On Fri, Jun 28, 2019 at 11:19 AM Thomas Kountis <thomas...@hazelcast.com> wrote:
Hi,

Have you tried enabling JMX in Hazelcast? Most of the info available on management center is also available through JMX.
On Fri 28 Jun 2019 at 09:17, xing zhang <profzh...@gmail.com> wrote:
Hi All:

When I deploy hazelcast cluster,   management center can be started. Lots information about the cluster is shown.

But, i use hazelcast inside a java maven project,  I want to get all members' cpu and memory status,  all maps and entries count of each map etc... 

Please tell me how to do.

Thanks!

111111.png




--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haze...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haze...@googlegroups.com.

Ozan Kılıç

unread,
Jun 28, 2019, 5:15:48 AM6/28/19
to haze...@googlegroups.com

xing zhang

unread,
Jun 28, 2019, 7:28:15 AM6/28/19
to Hazelcast
Thank U very much!

But I went to a problem when setting up Management Center in my maven project.

my pom.xml like this(version 3.12 not found):
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-all</artifactId>
<version>3.11</version>
</dependency>

Config:
Config conf = new Config();
conf.getManagementCenterConfig().setEnabled(true);
conf.getManagementCenterConfig().setUrl("http://localhost:8081/hazelcast-mancenter");

When start the project, information behind is found:
[localhost]:5701 [dev] [3.11] Failed to connect to: http://localhost:18081/hazelcast-mancenter/collector.do
[localhost]:5701 [dev] [3.11] Failed to pull tasks from Management Center
Tomcat initialized with port(s): 18081 (http)



在 2019年6月28日星期五 UTC+8下午5:15:48,Ozan Kılıç写道:

Ozan Kılıç

unread,
Jun 28, 2019, 7:55:55 AM6/28/19
to haze...@googlegroups.com
Hi,

[localhost]:5701 [dev] [3.11] Failed to connect to: http://localhost:18081/hazelcast-mancenter/collector.do

the port above is 18081. Apparently, you wanted to set it to 8081. Correct it and see how it goes.
If it doesn't solve the problem, please share the management center logs too. 



To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.

To post to this group, send email to haze...@googlegroups.com.
Visit this group at https://groups.google.com/group/hazelcast.

xing zhang

unread,
Jun 30, 2019, 11:12:53 PM6/30/19
to Hazelcast
Sorry, I will re-describe my question.

my pom.xml like this:
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-all</artifactId>
<version>3.11</version>
</dependency>

Config:
Config conf = new Config();
conf.setProperty("hazelcast.logging.type", "log4j");
conf.getNetworkConfig().setPublicAddress(Consts.hazelcastHost);
conf.getNetworkConfig().setPort(Consts.hazelcastPort);
conf.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(true);
conf.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(false);

conf.getManagementCenterConfig().setEnabled(true);
conf.getManagementCenterConfig().setUrl("http://localhost:5709/hazelcast-mancenter");
conf.setInstanceName(instanceName);


When start the project, information behind is found:

[LOCAL] [dev] [3.11] Prefer IPv4 stack is true, prefer IPv6 addresses is false
[LOCAL] [dev] [3.11] Picked [192.168.1.67]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=5701], bind any local is true
[LOCAL] [dev] [3.11] Using public address: [localhost]:5701
[localhost]:5701 [dev] [3.11] Hazelcast 3.11 (20181023 - 1500bbb) starting at [localhost]:5701
[localhost]:5701 [dev] [3.11] Copyright (c) 2008-2018, Hazelcast, Inc. All Rights Reserved.
[localhost]:5701 [dev] [3.11] A non-empty group password is configured for the Hazelcast member. Starting with Hazelcast version 3.8.2, members with the same group name, but with different group passwords (that do not use authentication) form a cluster. The group password configuration will be removed completely in a future release.
[localhost]:5701 [dev] [3.11] Backpressure is disabled
[localhost]:5701 [dev] [3.11] Creating MulticastJoiner
[localhost]:5701 [dev] [3.11] Starting 8 partition threads and 5 generic threads (1 dedicated for priority tasks)
[localhost]:5701 [dev] [3.11] Diagnostics disabled. To enable add -Dhazelcast.diagnostics.enabled=true to the JVM arguments.
[localhost]:5701 [dev] [3.11] [localhost]:5701 is STARTING
[localhost]:5701 [dev] [3.11] 

Members {size:1, ver:1} [
Member [localhost]:5701 - 6b6acbd6-6723-4229-a89b-b0332d93fa34 this
]

[localhost]:5701 [dev] [3.11] Hazelcast will connect to Hazelcast Management Center on address: 
[localhost]:5701 [dev] [3.11] [localhost]:5701 is STARTED
[localhost]:5701 [dev] [3.11] Initializing cluster partition table arrangement...
[localhost]:5701 [dev] [3.11] Failed to pull tasks from Management Center
[localhost]:5701 [dev] [3.11] Failed to connect to: http://localhost:5709/hazelcast-mancenter/collector.do

Still failed!

I'm not sure hazelcast-all in pom.xml  includes  Management Center. 


在 2019年6月28日星期五 UTC+8下午7:55:55,Ozan Kılıç写道:

xing zhang

unread,
Jul 1, 2019, 1:03:38 AM7/1/19
to Hazelcast
Now, I download hazelcast-management-center, and run it.

it works.



在 2019年7月1日星期一 UTC+8上午11:12:53,xing zhang写道:
Reply all
Reply to author
Forward
0 new messages