반응형
제안서 항목의 일환으로 telegraf 와 jolokia 연동을 맡았다.
뭐.. 수정할 여력이 생긴다면 수정하겟드아
*참고 : 졸로키아의 proxy mode 와 agent 모드..... 가 바뀐거같다
근데 아무리봐도
아키텍쳐 설계 그림보면 아닌데.... 두가지 방법이 잇는거같은데 차이점은 알겟는데 뭐가몬지 모르겟다
글이 왜 깨지지?
- 설치
- Tomcat 설치
- tar -xvf apache-tomcat-8.5.31.tar.gz
- Jolokia 설치
- cd apache-tomcat-8.5.31/webapps
- mv jolokia-war-1.2.3.war jolokia.war
- mv remotecontent\?filepath\=org%2Fjolokia%2Fjolokia-jvm%2F1.5.0%2Fjolokia-jvm-1.5.0-agent.jar jolokia-jvm-1.5.0-agent.jar
- java -jar jolokia-jvm-1.5.0-agent.jar[tcore-ic@tcore-ic-test jolokia]$ java -jar jolokia-jvm-1.5.0-agent.jar7921 org.apache.zookeeper.server.quorum.QuorumPeerMain /home/tcore-ic/applications/zookeeper/bin/../conf/6098 org.apache.catalina.startup.Bootstrap start8652 kafka.Kafka config/server.properties908 jolokia-jvm-1.5.0-agent.jar32287 kafka.tools.ConsoleConsumer --zookeeper tcore-ic-test:2181/kafka --topic telegraf
- java -jar jolokia-jvm-1.5.0-agent.jar start catalina[tcore-ic@tcore-ic-test jolokia]$ java -jar jolokia-jvm-1.5.0-agent.jar start catalinaJolokia is already attached to process matching "catalina" (PID: 6098)http://127.0.0.1:8778/jolokia/
- Jmx 설정3-1. Jmx 변수 설정tomcat/bin/catalina.batset CATALINA_OPTS="-Dcom.sun.management.jmxremot -Dcom.sun.management.jmxremote.port=9309 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false”혹은[tcore-ic@tcore-ic-test bin]$ cat setenv.shexport JAVA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9309 - Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"3-2. Tomcat 시작./startup
- 실행확인
- Tomcat 실행확인
- Jolokia 실행확인[tcore-ic@tcore-ic-test webapps]$ curl http://localhost:8778/jolokia/read/java.lang:type=Memory{"request":{"mbean":"java.lang:type=Memory","type":"read"},"value":{"ObjectPendingFinalizationCount":0,"Verbose":false,"HeapMemoryUsage":{"init":513802240,"committed":257949696,"max":7285506048,"used":23310944},"NonHeapMemoryUsage":{"init":2555904,"committed":33210368,"max":-1,"used":31935240},"ObjectName":{"objectName":"java.lang:type=Memory"}},"timestamp":1526876824,"status":200}
- Telegraf 설정
- vi /etc/telegraf/telegraf.conf[[outputs.influxdb]]urls = ["http://tcore-ic-test:8086"]database = "telegraf"
- Influx DB 확인
- DB 확인[root@tcore-ic-test telegraf]# influxConnected to http://localhost:8086 version 1.5.2InfluxDB shell version: 1.5.2> show databases;name: databasesname----_internalmontelegraf> use telegrafUsing database telegraf
> show measurements
name: measurements
name
----
cpu
disk
diskio
http
http_response
httpjson
jolokia
kernel
mem
net_response
ping
processes
swap
system
zookeeper
>
>
>
> show tag keys from jolokia
name: jolokia
tagKey
------
host
jolokia_host
jolokia_name
jolokia_port
>
>
> show tag values from jolokia with key=host
name: jolokia
key value
--- -----
host tcore-ic-test
>
>
> show field keys from jolokia
name: jolokia
fieldKey fieldType
-------- ---------
heap_memory_usage_committed float
heap_memory_usage_init float
heap_memory_usage_max float
heap_memory_usage_used float
thread_count_DaemonThreadCount float
thread_count_PeakThreadCount float
thread_count_ThreadCount float
thread_count_TotalStartedThreadCount float
>
>
> select host, heap_memory_usage_max, heap_memory_usage_used, thread_count_DaemonThreadCount from jolokia limit 10;
name: jolokia
반응형
'Develope > Programming' 카테고리의 다른 글
[Jolokia + Telegraf] Agent Mode, Proxy Mode 실행방법 및 테스트 (0) | 2018.06.12 |
---|---|
[JAVA] CSV Mapper 를 이용하여 CSV 파일 매핑하기 (0) | 2018.06.01 |
[JAVA] Gmail API 이용해서 메일 보내기 (파일 첨부) (0) | 2018.03.19 |
[Kafka] 1. 카프카 설치 및 실행 (분산 클러스터링) (0) | 2018.01.04 |
[JAVA] 2차원 배열 Deep copy, swallow Copy (0) | 2017.12.04 |