Merge pull request #16366 from kustosz/role-info-in-jmx-api
+clu #15489 expose cluster member roles in JMX getClusterStatus
This commit is contained in:
commit
c73603f707
4 changed files with 39 additions and 9 deletions
|
|
@ -42,19 +42,31 @@ trait ClusterNodeMBean {
|
|||
* "members": [
|
||||
* {
|
||||
* "address": "akka.tcp://system@host1:2552",
|
||||
* "status": "Up"
|
||||
* "status": "Up",
|
||||
* "roles": [
|
||||
* "frontend"
|
||||
* ]
|
||||
* },
|
||||
* {
|
||||
* "address": "akka.tcp://system@host2:2552",
|
||||
* "status": "Up"
|
||||
* "status": "Up",
|
||||
* "roles": [
|
||||
* "frontend"
|
||||
* ]
|
||||
* },
|
||||
* {
|
||||
* "address": "akka.tcp://system@host3:2552",
|
||||
* "status": "Down"
|
||||
* "status": "Down",
|
||||
* "roles": [
|
||||
* "backend"
|
||||
* ]
|
||||
* },
|
||||
* {
|
||||
* "address": "akka.tcp://system@host4:2552",
|
||||
* "status": "Joining"
|
||||
* "status": "Joining",
|
||||
* "roles": [
|
||||
* "backend"
|
||||
* ]
|
||||
* }
|
||||
* ],
|
||||
* "unreachable": [
|
||||
|
|
@ -137,7 +149,10 @@ private[akka] class ClusterJmx(cluster: Cluster, log: LoggingAdapter) {
|
|||
val members = clusterView.members.toSeq.sorted(Member.ordering).map { m ⇒
|
||||
s"""{
|
||||
| "address": "${m.address}",
|
||||
| "status": "${m.status}"
|
||||
| "status": "${m.status}",
|
||||
| "roles": [
|
||||
| ${m.roles.map("\"" + _ + "\"").mkString(",\n ")}
|
||||
| ]
|
||||
| }""".stripMargin
|
||||
} mkString (",\n ")
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ object MBeanMultiJvmSpec extends MultiNodeConfig {
|
|||
|
||||
commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString("""
|
||||
akka.cluster.jmx.enabled = on
|
||||
akka.cluster.roles = [testNode]
|
||||
""")).withFallback(MultiNodeClusterSpec.clusterConfig))
|
||||
|
||||
}
|
||||
|
|
@ -119,19 +120,31 @@ abstract class MBeanSpec
|
|||
| "members": [
|
||||
| {
|
||||
| "address": "${sortedNodes(0)}",
|
||||
| "status": "Up"
|
||||
| "status": "Up",
|
||||
| "roles": [
|
||||
| "testNode"
|
||||
| ]
|
||||
| },
|
||||
| {
|
||||
| "address": "${sortedNodes(1)}",
|
||||
| "status": "Up"
|
||||
| "status": "Up",
|
||||
| "roles": [
|
||||
| "testNode"
|
||||
| ]
|
||||
| },
|
||||
| {
|
||||
| "address": "${sortedNodes(2)}",
|
||||
| "status": "Up"
|
||||
| "status": "Up",
|
||||
| "roles": [
|
||||
| "testNode"
|
||||
| ]
|
||||
| },
|
||||
| {
|
||||
| "address": "${sortedNodes(3)}",
|
||||
| "status": "Up"
|
||||
| "status": "Up",
|
||||
| "roles": [
|
||||
| "testNode"
|
||||
| ]
|
||||
| }
|
||||
| ],
|
||||
| "unreachable": [
|
||||
|
|
|
|||
|
|
@ -624,6 +624,7 @@ From JMX you can:
|
|||
|
||||
* see what members that are part of the cluster
|
||||
* see status of this node
|
||||
* see roles of each member
|
||||
* join this node to another node in cluster
|
||||
* mark any node in the cluster as down
|
||||
* tell any node in the cluster to leave
|
||||
|
|
|
|||
|
|
@ -672,6 +672,7 @@ From JMX you can:
|
|||
|
||||
* see what members that are part of the cluster
|
||||
* see status of this node
|
||||
* see roles of each member
|
||||
* join this node to another node in cluster
|
||||
* mark any node in the cluster as down
|
||||
* tell any node in the cluster to leave
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue