Merge branch 'master' into master
diff --git a/README.md b/README.md
index 2d116dc..df34c82 100644
--- a/README.md
+++ b/README.md
@@ -1,210 +1,215 @@
-RocketMQ_exporter

-==============

-

-RocketMQ exporter for Prometheus.

-

-Table of Contents

------------------

--	[Compatibility](#compatibility)

--   [Dependency](#dependency)

--   [Download](#download)

--   [Compile](#compile)

-	-   [Build Binary](#build-binary)

-	-   [Build Docker Image](#build-docker-image)

--   [Run](#run)

-	-   [Run Binary](#run-binary)

-	-   [Run Docker Image](#run-docker-image)

--   [Flags](#flags)

--   [Metrics](#metrics)

-	-   [Brokers](#brokers)

-	-   [Topics](#topics)

-	-   [Consumer Groups](#consumer-groups)

--   [Grafana Dashboard](#Grafana-Dashboard)

-

-Compatibility

--------------

-

-Support [Apache RocketMQ](https://rocketmq.apache.org) version 4.3.2 (and later).

-

-Dependency

-----------

-

--	[Prometheus](https://prometheus.io)

-

-Compile

--------

-

-### Build Binary

-

-```shell

-mvn clean install

-```

-

-### Build Docker Image

-

-```shell

-mvn package -Dmaven.test.skip=true docker:build

-```

-

-Run

----

-

-### Run Binary

-

-```shell

-java -jar rocketmq-exporter-0.0.1-SNAPSHOT.jar

-```

-

-### Run Docker Image

-

-```

-docker container run -itd --rm  -p 5557:5557  docker.io/rocketmq-exporter

-```

-

-Flags

----

-

-This image is configurable using different flags

-

-|Flag name                           | Default            | Description                                        |

-| -----------------------------------|--------------------|----------------------------------------------------|

-| `rocketmq.config.namesrvAddr`      |  127.0.0.1:9876 |name server address  for  broker cluster            |

-| `rocketmq.config.webTelemetryPath` | /metrics           |Path under which to expose metrics                  |

-| `server.port`                      | 5557               |Address to listen on for web interface and telemetry|

-| `rocketmq.config.rocketmqVersion`  | V4_3_2             |rocketmq broker version                             |

-

-Metrics

--------

-

-Documents about exposed Prometheus metrics.

-

-### Broker 

-

-**Metrics details**

-

-| Name         | Exposed information                                  |

-| ------------ | ---------------------------------------------------- |

-| `rocketmq_broker_tps` | Broker produces the number of messages per second |

-| `rocketmq_broker_qps` | Broker consumes messages per second |

-

-**Metrics output example**

-

-```txt

-# HELP rocketmq_broker_tps BrokerPutNums

-# TYPE rocketmq_broker_tps gauge

-rocketmq_broker_tps{cluster="MQCluster",broker="broker-a",} 7.0

-rocketmq_broker_tps{cluster="MQCluster",broker="broker-b",} 7.0

-# HELP rocketmq_broker_qps BrokerGetNums

-# TYPE rocketmq_broker_qps gauge

-rocketmq_broker_qps{cluster="MQCluster",broker="broker-a",} 8.0

-rocketmq_broker_qps{cluster="MQCluster",broker="broker-b",} 8.0

-```

-

-### Topics

-

-**Metrics details**

-

-| Name                | Exposed information                                |

-| ------------------- | -------------------------------------------------- |

-| `rocketmq_producer_tps`      | The number of messages produced per second per topic |

-| `rocketmq_producer_message_size` | The size of a message produced per second by a topic (in bytes) |

-| `rocketmq_producer_offset`   | The progress of a topic's production message |

-

-**Metrics output example**

-

-```txt

-# HELP rocketmq_producer_tps TopicPutNums

-# TYPE rocketmq_producer_tps gauge

-rocketmq_producer_tps{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",} 7.0

-rocketmq_producer_tps{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",} 7.0

-# HELP rocketmq_producer_message_size TopicPutMessageSize

-# TYPE rocketmq_producer_message_size gauge

-rocketmq_producer_message_size{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",} 1642.0

-rocketmq_producer_message_size{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",} 1638.0

-# HELP rocketmq_producer_offset TopicOffset

-# TYPE rocketmq_producer_offset counter

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="TBW102",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_tfq",} 1878633.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_tfq",} 3843787.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_20190304",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="BenchmarkTest",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_20190305",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="MQCluster",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",} 2798195.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="BenchmarkTest",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",} 1459666.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="MQCluster",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="SELF_TEST_TOPIC",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="OFFSET_MOVED_EVENT",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="broker-b",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="broker-a",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="SELF_TEST_TOPIC",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="RMQ_SYS_TRANS_HALF_TOPIC",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_20190305",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="OFFSET_MOVED_EVENT",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="RMQ_SYS_TRANS_HALF_TOPIC",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="TBW102",} 0.0

-rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_20190304",} 0.0

-

-```

-

-### Consumer Groups

-

-**Metrics details**

-

-| Name                                                         | Exposed information                                          |

-| ------------------------------------------------------------ | ------------------------------------------------------------ |

-| `rocketmq_consumer_tps`                                      | The number of messages consumed per second by a consumer group |

-| `rocketmq_consumer_message_size`                             | The size of the message consumed by the consumer group per second (in bytes) |

-| `rocketmq_consumer_offset`                                   | Progress of consumption message for a consumer group         |

-| `rocketmq_group_get_latency`                                 | Consumer latency on some topic for one queue                 |

-| `rocketmq_group_get_latency_by_storetime `                   | Consumption delay time of a consumer group                   |

-| `rocketmq_message_accumulation`| How far Consumer offset lag behind |

-

-**Metrics output example**

-

-```txt

-# HELP rocketmq_consumer_tps GroupGetNums

-# TYPE rocketmq_consumer_tps gauge

-rocketmq_consumer_tps{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 7.0

-rocketmq_consumer_tps{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 7.0

-# HELP rocketmq_consumer_message_size GroupGetMessageSize

-# TYPE rocketmq_consumer_message_size gauge

-rocketmq_consumer_message_size{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 1638.0

-rocketmq_consumer_message_size{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 1642.0

-# HELP rocketmq_consumer_offset GroupOffset

-# TYPE rocketmq_consumer_offset counter

-rocketmq_consumer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 1462030.0

-rocketmq_consumer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_tfq",group="DEV_CID_cfq",} 3843787.0

-rocketmq_consumer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 2800569.0

-rocketmq_consumer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_tfq",group="DEV_CID_cfq",} 1878633.0

-# HELP rocketmq_group_get_latency GroupGetLatency

-# TYPE rocketmq_group_get_latency gauge

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="0",} 0.05

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="1",} 0.0

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="7",} 0.05

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="6",} 0.01

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="3",} 0.0

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="7",} 0.03

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="4",} 0.0

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="5",} 0.03

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="6",} 0.01

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="2",} 0.0

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="3",} 0.0

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="0",} 0.0

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="4",} 0.0

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="1",} 0.03

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="5",} 0.0

-rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="2",} 0.0

-# HELP rocketmq_group_get_latency_by_storetime GroupGetLatencyByStoreTime

-# TYPE rocketmq_group_get_latency_by_storetime gauge

-rocketmq_group_get_latency_by_storetime{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 3215.0

-rocketmq_group_get_latency_by_storetime{cluster="MQCluster",broker="broker-a",topic="DEV_TID_tfq",group="DEV_CID_cfq",} 0.0

-rocketmq_group_get_latency_by_storetime{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 3232.0

-rocketmq_group_get_latency_by_storetime{cluster="MQCluster",broker="broker-b",topic="DEV_TID_tfq",group="DEV_CID_cfq",} 0.0

-```

-

-Grafana Dashboard

--------

-Grafana Dashboard ID: 10477, name: RocketMQ Exporter Overview.

-For details of the dashboard please see [RocketMQ Exporter Overview](https://grafana.com/dashboards/10477).
\ No newline at end of file
+RocketMQ_exporter
+==============
+
+RocketMQ exporter for Prometheus.
+
+Table of Contents
+-----------------
+-	[Compatibility](#compatibility)
+-   [Dependency](#dependency)
+-   [Download](#download)
+-   [Compile](#compile)
+	-   [Build Binary](#build-binary)
+	-   [Build Docker Image](#build-docker-image)
+-   [Run](#run)
+	-   [Run Binary](#run-binary)
+	-   [Run Docker Image](#run-docker-image)
+-   [Flags](#flags)
+-   [Metrics](#metrics)
+	-   [Brokers](#brokers)
+	-   [Topics](#topics)
+	-   [Consumer Groups](#consumer-groups)
+-   [Grafana Dashboard](#Grafana-Dashboard)
+-   [Use Example](#Use-Example)
+
+Compatibility
+-------------
+
+Support [Apache RocketMQ](https://rocketmq.apache.org) version 4.3.2 (and later).
+
+Dependency
+----------
+
+-	[Prometheus](https://prometheus.io)
+
+Compile
+-------
+
+### Build Binary
+
+```shell
+mvn clean install
+```
+
+### Build Docker Image
+
+```shell
+mvn package -Dmaven.test.skip=true docker:build
+```
+
+Run
+---
+
+### Run Binary
+
+```shell
+java -jar rocketmq-exporter-0.0.1-SNAPSHOT.jar
+```
+
+### Run Docker Image
+
+```
+docker container run -itd --rm  -p 5557:5557  docker.io/rocketmq-exporter
+```
+
+Flags
+---
+
+This image is configurable using different flags
+
+|Flag name                           | Default            | Description                                        |
+| -----------------------------------|--------------------|----------------------------------------------------|
+| `rocketmq.config.namesrvAddr`      |  127.0.0.1:9876 |name server address  for  broker cluster            |
+| `rocketmq.config.webTelemetryPath` | /metrics           |Path under which to expose metrics                  |
+| `server.port`                      | 5557               |Address to listen on for web interface and telemetry|
+| `rocketmq.config.rocketmqVersion`  | V4_3_2             |rocketmq broker version                             |
+
+Metrics
+-------
+
+Documents about exposed Prometheus metrics.
+
+### Broker 
+
+**Metrics details**
+
+| Name         | Exposed information                                  |
+| ------------ | ---------------------------------------------------- |
+| `rocketmq_broker_tps` | Broker produces the number of messages per second |
+| `rocketmq_broker_qps` | Broker consumes messages per second |
+
+**Metrics output example**
+
+```txt
+# HELP rocketmq_broker_tps BrokerPutNums
+# TYPE rocketmq_broker_tps gauge
+rocketmq_broker_tps{cluster="MQCluster",broker="broker-a",} 7.0
+rocketmq_broker_tps{cluster="MQCluster",broker="broker-b",} 7.0
+# HELP rocketmq_broker_qps BrokerGetNums
+# TYPE rocketmq_broker_qps gauge
+rocketmq_broker_qps{cluster="MQCluster",broker="broker-a",} 8.0
+rocketmq_broker_qps{cluster="MQCluster",broker="broker-b",} 8.0
+```
+
+### Topics
+
+**Metrics details**
+
+| Name                | Exposed information                                |
+| ------------------- | -------------------------------------------------- |
+| `rocketmq_producer_tps`      | The number of messages produced per second per topic |
+| `rocketmq_producer_message_size` | The size of a message produced per second by a topic (in bytes) |
+| `rocketmq_producer_offset`   | The progress of a topic's production message |
+
+**Metrics output example**
+
+```txt
+# HELP rocketmq_producer_tps TopicPutNums
+# TYPE rocketmq_producer_tps gauge
+rocketmq_producer_tps{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",} 7.0
+rocketmq_producer_tps{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",} 7.0
+# HELP rocketmq_producer_message_size TopicPutMessageSize
+# TYPE rocketmq_producer_message_size gauge
+rocketmq_producer_message_size{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",} 1642.0
+rocketmq_producer_message_size{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",} 1638.0
+# HELP rocketmq_producer_offset TopicOffset
+# TYPE rocketmq_producer_offset counter
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="TBW102",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_tfq",} 1878633.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_tfq",} 3843787.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_20190304",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="BenchmarkTest",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_20190305",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="MQCluster",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",} 2798195.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="BenchmarkTest",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",} 1459666.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="MQCluster",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="SELF_TEST_TOPIC",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="OFFSET_MOVED_EVENT",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="broker-b",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="broker-a",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="SELF_TEST_TOPIC",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="RMQ_SYS_TRANS_HALF_TOPIC",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_20190305",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="OFFSET_MOVED_EVENT",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="RMQ_SYS_TRANS_HALF_TOPIC",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-b",topic="TBW102",} 0.0
+rocketmq_producer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_20190304",} 0.0
+
+```
+
+### Consumer Groups
+
+**Metrics details**
+
+| Name                                                         | Exposed information                                          |
+| ------------------------------------------------------------ | ------------------------------------------------------------ |
+| `rocketmq_consumer_tps`                                      | The number of messages consumed per second by a consumer group |
+| `rocketmq_consumer_message_size`                             | The size of the message consumed by the consumer group per second (in bytes) |
+| `rocketmq_consumer_offset`                                   | Progress of consumption message for a consumer group         |
+| `rocketmq_group_get_latency`                                 | Consumer latency on some topic for one queue                 |
+| `rocketmq_group_get_latency_by_storetime `                   | Consumption delay time of a consumer group                   |
+| `rocketmq_message_accumulation`| How far Consumer offset lag behind |
+
+**Metrics output example**
+
+```txt
+# HELP rocketmq_consumer_tps GroupGetNums
+# TYPE rocketmq_consumer_tps gauge
+rocketmq_consumer_tps{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 7.0
+rocketmq_consumer_tps{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 7.0
+# HELP rocketmq_consumer_message_size GroupGetMessageSize
+# TYPE rocketmq_consumer_message_size gauge
+rocketmq_consumer_message_size{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 1638.0
+rocketmq_consumer_message_size{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 1642.0
+# HELP rocketmq_consumer_offset GroupOffset
+# TYPE rocketmq_consumer_offset counter
+rocketmq_consumer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 1462030.0
+rocketmq_consumer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_tfq",group="DEV_CID_cfq",} 3843787.0
+rocketmq_consumer_offset{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 2800569.0
+rocketmq_consumer_offset{cluster="MQCluster",broker="broker-b",topic="DEV_TID_tfq",group="DEV_CID_cfq",} 1878633.0
+# HELP rocketmq_group_get_latency GroupGetLatency
+# TYPE rocketmq_group_get_latency gauge
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="0",} 0.05
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="1",} 0.0
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="7",} 0.05
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="6",} 0.01
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="3",} 0.0
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="7",} 0.03
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="4",} 0.0
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="5",} 0.03
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="6",} 0.01
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="2",} 0.0
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="3",} 0.0
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="0",} 0.0
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="4",} 0.0
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="1",} 0.03
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="5",} 0.0
+rocketmq_group_get_latency{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",queueid="2",} 0.0
+# HELP rocketmq_group_get_latency_by_storetime GroupGetLatencyByStoreTime
+# TYPE rocketmq_group_get_latency_by_storetime gauge
+rocketmq_group_get_latency_by_storetime{cluster="MQCluster",broker="broker-b",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 3215.0
+rocketmq_group_get_latency_by_storetime{cluster="MQCluster",broker="broker-a",topic="DEV_TID_tfq",group="DEV_CID_cfq",} 0.0
+rocketmq_group_get_latency_by_storetime{cluster="MQCluster",broker="broker-a",topic="DEV_TID_topic_tfq",group="DEV_CID_consumer_cfq",} 3232.0
+rocketmq_group_get_latency_by_storetime{cluster="MQCluster",broker="broker-b",topic="DEV_TID_tfq",group="DEV_CID_cfq",} 0.0
+```
+
+Grafana Dashboard
+-------
+Grafana Dashboard ID: 10477, name: RocketMQ Exporter Overview.
+For details of the dashboard please see [RocketMQ Exporter Overview](https://grafana.com/dashboards/10477).
+
+Use Example
+-------------
+For details of the use example please refer to [use example](./rocketmq_exporter_use_example.md)
\ No newline at end of file
diff --git a/rocketmq_exporter_use_example.md b/rocketmq_exporter_use_example.md
new file mode 100644
index 0000000..ef1f527
--- /dev/null
+++ b/rocketmq_exporter_use_example.md
@@ -0,0 +1,119 @@
+# RocketMQ-Exporter Use example #

+

+## 1 Start up NameServer and Broker ##

+In order to use the RocketMQ Exporter, firstly make sure that the RocketMQ service is properly downloaded and started. Users can refer to the quick start of the RocketMQ master station for operation. Make sure the NameServer and Broker have started correctly.

+

+## 2 Compile RocketMQ-Exporter ##

+Users currently need to download the git source code and then compile it

+

+```

+git clone https://github.com/apache/rocketmq-exporter

+cd rocketmq-exporter

+mvn clean install

+```

+

+## 3 Configuration and startup ##

+RocketMQ-Exporter has the following running options

+

+operations | default value | meaning 

+---|---|---

+rocketmq.config.namesrvAddr | 127.0.0.1:9876 | MQ cluster nameSrv address 

+rocketmq.config.webTelemetryPath | /metrics | metric collection path 

+server.port | 5557 | HTTP service exposed port 

+

+The above running options can be changed either in the configuration file after downloading the code or via the command line. The compiled jar package is called rocketmq-exporter-0.0.1-SNAPSHOT.jar, which can be run as follows.

+

+```

+java -jar rocketmq-exporter-0.0.1-SNAPSHOT.jar [--rocketmq.config.namesrvAddr="127.0.0.1:9876" ...]

+```

+

+## 4 Install Prometheus ##

+Firstly go to Prometheus official download address: https://prometheus.io/download/ to download the Prometheus installation package, currently using linux installation as an example, the selected installation package is Prometheus-2.7.0-rc.1.linux-amd64.tar.gz, the Prometheus process can be started after the following steps.

+

+```

+tar -xzf prometheus-2.7.0-rc.1.linux-amd64.tar.gz

+cd prometheus-2.7.0-rc.1.linux-amd64/

+./prometheus --config.file=prometheus.yml --web.listen-address=:5555

+```

+

+The default listening port number of Prometheus is 9090. In order not  conflict with other processes on the system, we reset the listening port number to 5555 in the startup parameters. Then go to website http:// sever ip:5555 through  browser and users can verify whether the Prometheus has been successfully installed. Since the RocketMQ-Exporter process has been started, the data of RocketMQ-Exporter can be retrieved by Prometheus at this time. At this time, users only need to change the Prometheus configuration file to set the collection target to the URL address exposed by the RocketMQ Exporter. After changing the configuration file, restart the service. The content of prometheus.yml will be like as follows:

+

+```

+# my global config

+global:

+   scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.

+   evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.

+   # scrape_timeout is set to the global default (10s).

+ 

+ 

+ # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.

+ rule_files:

+   # - "first_rules.yml"

+   # - "second_rules.yml"

+   

+

+ scrape_configs:

+   - job_name: 'prometheus'

+     static_configs:

+     - targets: ['localhost:5555']

+   

+   

+   - job_name: 'exporter'

+     static_configs:

+     - targets: ['localhost:5557']

+```

+

+

+

+## 5 Create Grafana dashboard for RocketMQ ##

+

+Prometheus' own metric display platform is not as good as Grafana. In order to  better show RocketMQ's metrics, Grafana can be used to show the metrics that Prometheus gets. Firstly go to the official website https://grafana.com/grafana/download to download installation file. Here is a  an example for binary file installation.

+

+```

+wget https://dl.grafana.com/oss/release/grafana-6.2.5.linux-amd64.tar.gz 

+tar -zxvf grafana-6.2.5.linux-amd64.tar.gz

+cd grafana-5.4.3/

+```

+Similarly, in order not to conflict with the ports of other processes, users can modify the listening port in the defaults.ini file in the conf directory. Currently, the listening port of the Grafana is changed to 55555, and then use the following command to start up.

+

+```

+./bin/grafana-server web

+```

+

+Then, by accessing http:// server ip:55555 through the browser, users can verify whether the Grafana has been successfully installed. The system default username and password are admin/admin. The first time users log in to the system, users will be asked to change the password. In addition, users need to set Grafana's data source to Prometheus. If user have started up Prometheus like above, now the data source address will be  http:// server ip:5555. For the convenience of users, RocketMQ's dashboard configuration file has been uploaded to Grafana's official website  https://grafana.com/dashboards/10477/revisions. Users only need to download the configuration file and creating the RocketMQ dashboard by importing the configuration file into the Grafana.

+

+## 6 Configure alarms in Prometheus

+

+If users want to configure alarms,there are two things users should do. 

+Firstly, modify the Prometheus configuration file prometheus.yml and add the following configuration: 

+

+```

+rule_files:

+  - /etc/prometheus/rules/*.rules

+```

+

+Secondly, create an alert file in the directory /etc/prometheus/rules/. The content of rules file will be like as follows. For more details, please refer to the file [example.rules](./example.rules)

+

+```

+groups:

+- name: GaleraAlerts

+  rules:

+  - alert: RocketMQClusterProduceHigh

+    expr: sum(rocketmq_producer_tps) by (cluster) >= 10

+    for: 3m

+    labels:

+      severity: warning

+    annotations:

+      description: '{{$labels.cluster}} Sending tps too high.'

+      summary: cluster send tps too high

+  - alert: RocketMQClusterProduceLow

+    expr: sum(rocketmq_producer_tps) by (cluster) < 1

+    for: 3m

+    labels:

+      severity: warning

+    annotations:

+      description: '{{$labels.cluster}} Sending tps too low.'

+      summary: cluster send tps too low

+```

+

+