1、配置目录:
path=`check_mk_agent |grep AgentDirectory|head -n1|awk ‘{print $2}‘`
cp jolokia.cfg ${path}
2、插件目录:
path=`check_mk_agent |grep PluginsDirectory|head -n1|awk ‘{print $2}‘`
cp mk_jolokia ${path}
chmod +x mk_jolokia
3、安装WAR包:
参考文章 https://jolokia.org/tutorial.html
tomcat配置:
tar zxvf apache-tomcat-7.*.tar.gz
cd apache-tomcat-7.*
cd webapps
wget http://search.maven.org/remotecontent?filepath=org/jolokia/jolokia-war/1.3.4/jolokia-war-1.3.4.war -O jolokia.war
启动tomcat:
cd ../bin
./startup.sh
查看jolkia版本
curl http://127.0.0.1:8080/jolokia/version
4、编辑check mk相关配置:vi /etc/check-mk-agent/jolokia.cfg
suburi = "jolokia"
instance = None
#Configuration for multiple instances. Not-specified
#values will be taken from the upper settings
instances = [
{
"port" : 7082,
"instance" : "yousite.com",
}
]
原文地址:http://blog.51cto.com/backkom/2070089
时间: 2024-11-05 19:34:58