Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Ganglia3.6.1+jmxtrans+strom-0.9.4 integration

Shulou Source: shulou.com Published: 2022-06-03 06:01:50 10月05日 Update

1. Install ganglia from a previous blog (the following example uses ganglia Multicast, and unicast)

Http://chengyanbin.blog.51cto.com/3900113/1591373

2. Install jmxtrans

Http://chengyanbin.blog.51cto.com/3900113/1654754

3. Install storm

Http://chengyanbin.blog.51cto.com/3900113/1654757

4. Modify storm configuration file storm..yaml

# nimbus config nimbus.childopts: "- verbose:gc-XX:+PrintGCTimeStamps-XX:+PrintGCDetails-Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.port=12345-Xmx1024m" # supervisor config supervisor.childopts: "- verbose:gc-XX:+PrintGCTimeStamps-XX:+PrintGCDetails-Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.port=12346-Xmx256m"

5. Add two json files to jmxtrans

Obtain the jvm information of nimbus and supervisor nodes respectively. The following file only lists some parameters. If necessary, you can add data in queries to monitor more parameters. Specific parameters of MBean can be viewed through jconsole.

Nimbus.json

{"servers": [{"host": "master", "port": "12345" "queries": [{"outputWriters": [{"@ class": "com.googlecode.jmxtrans.model.output.GangliaWriter", "settings": {"groupName": "nimbus" "host": "239.2.11.71", "port": "8649"}}], "obj": "java.lang:type=Memory" "resultAlias": "nimbus.heap", "attr": ["ObjectPendingFinalizationCount"]} {"outputWriters": [{"@ class": "com.googlecode.jmxtrans.model.output.GangliaWriter", "settings": {"groupName": "nimbus" "host": "239.2.11.71", "port": "8649"}}], "obj": "java.lang:name=Copy,type=GarbageCollector" "resultAlias": "nimbus.gc", "attr": ["CollectionCount", "CollectionTime"]} {"outputWriters": [{"@ class": "com.googlecode.jmxtrans.model.output.GangliaWriter", "settings": {"groupName": "nimbus" "host": "239.2.11.71", "port": "8649"}}], "obj": "java.lang:name=Code Cache,type=MemoryPool" "resultAlias": "nimbus.threads", "attr": ["CollectionUsageThreshold", "CollectionUsageThresholdCount", "UsageThreshold", "UsageThresholdCount"]} {"outputWriters": [{"@ class": "com.googlecode.jmxtrans.model.output.GangliaWriter", "settings": {"groupName": "nimbus" "host": "239.2.11.71", "port": "8649"}}], "obj": "java.lang:type=Runtime" "resultAlias": "nimbus.runtime", "attr": ["StartTime", "Uptime"]}], "numQueryThreads": 2}]}

Supervisor.json

{"servers": [{"host": "node1", "port": "12346" "queries": [{"outputWriters": [{"@ class": "com.googlecode.jmxtrans.model.output.GangliaWriter", "settings": {"groupName": "supervisor" "host": "239.2.11.71", "port": "8649"}}], "obj": "java.lang:type=Memory" "resultAlias": "supervisor.heap", "attr": ["ObjectPendingFinalizationCount"]} {"outputWriters": [{"@ class": "com.googlecode.jmxtrans.model.output.GangliaWriter", "settings": {"groupName": "supervisor" "host": "239.2.11.71", "port": "8649"}}], "obj": "java.lang:name=Copy,type=GarbageCollector" "resultAlias": "supervisor.gc", "attr": ["CollectionCount", "CollectionTime"]} {"outputWriters": [{"@ class": "com.googlecode.jmxtrans.model.output.GangliaWriter", "settings": {"groupName": "supervisor" "host": "239.2.11.71", "port": "8649"}}], "obj": "java.lang:name=Code Cache,type=MemoryPool" "resultAlias": "supervisor.threads", "attr": ["CollectionUsageThreshold", "CollectionUsageThresholdCount", "UsageThreshold", "UsageThresholdCount"]} {"outputWriters": [{"@ class": "com.googlecode.jmxtrans.model.output.GangliaWriter", "settings": {"groupName": "supervisor" "host": "239.2.11.71", "port": "8649"}}], "obj": "java.lang:type=Runtime" "resultAlias": "supervisor.runtime", "attr": ["StartTime", "Uptime"]}], "numQueryThreads": 2}]}

The two json files must note that host is the hostname. If you write ip, there will be two displays on the same node in ganglia, which looks a little awkward, and we all use hostname. Ganglia gmnod and gmetad do not need to be restarted, using automatic collection.

Description:

To modify the json file, you need to restart jmxtrans and view the jmxtrans log / var/log/jmxtrans/jmxtrans.log.

Service jmxtrans restart

Let's take a look at the main interface of ganglia to monitor two nodes.

The above picture does not show the monitoring indicators, so put it below. You can see that the monitoring data of supervisor has been collected into ganglia.

The following picture shows the page of the master node, and you can see that the monitoring data of the nimbus group has already shown that the supervisor group of the node1 node is too lazy to go to the above picture. You can understand it and go to the wall if you don't understand.

Tags: Files nodes monitoring two parameters data above way awkward below host information blog can be passed metrics logs more interface examples parts Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Xiaomi Redmi MariaDB MySQL