我在寻找OpenDaylight控制器中可用的日志记录框架。类似于麋鹿堆栈的东西。
我发现apache decanter是一种可行的方法。https://karaf.apache.org/manual/decanter/latest-1/
问题是,它可以很好地使用普通的karaf外壳,但不能使用氧气SR4释放的ODL karaf外壳。
根据文档,https://karaf.apache.org/download.html#decanter-installation
feature:repo-add decanter
feature:install decanter-appender-elasticsearch
feature:install decanter-collector-log
feature:install decanter-collector-jmx
我在ODL karaf shell中尝试了同样的方法。我下载了Oxygen-SR4二进制文件并启动了karaf shell。
./karaf clean Apache Karaf starting up. Press Enter to open the shell now... 100% [========================================================================]
Karaf started in 0s. Bundle stats: 13 active, 13 total
________ ________ .__ .__ .__ __
\_____ \ ______ ____ ____ \______ \ _____ ___.__.| | |__| ____ | |___/ |_
/ | \\____ \_/ __ \ / \ | | \\__ \< | || | | |/ ___\| | \ __\
/ | \ |_> > ___/| | \| ` \/ __ \\___ || |_| / /_/ > Y \ |
\_______ / __/ \___ >___| /_______ (____ / ____||____/__\___ /|___| /__|
\/|__| \/ \/ \/ \/\/ /_____/ \/
Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.
opendaylight-user@root>system:version
4.1.6
opendaylight-user@root>feature:repo-add decanter Adding feature url
opendaylight-user@root>feature:install decanter-appender-elasticsearch
org.apache.karaf.features.core[org.apache.karaf.features.internal.service.FeaturesServiceImpl] : null
但同样的事情也适用于普通的apache karaf shell。
./karaf
__ __ ____
/ //_/____ __________ _/ __/
/ ,< / __ `/ ___/ __ `/ /_
/ /| |/ /_/ / / / /_/ / __/
/_/ |_|\__,_/_/ \__,_/_/
Apache Karaf (4.2.5)
Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
karaf@root()> feature:repo-add decanter Adding feature url mvn:org.apache.karaf.decanter/apache-karaf-decanter/RELEASE/xml/features karaf@root()> feature:install decanter-appender-elasticsearch karaf@root()>
谁能指出这里缺少了什么,因为我觉得shell版本很相似?
你是否也可以推荐一些其他的日志框架来处理OpenDaylight控制器(Oxygen SR4)中的Karaf日志和数据,这类似于ELK堆栈。
发布于 2019-05-14 00:00:57
我们在上游OpenDaylight系统测试中使用了decanter。我们安装的特性(使用etc/org.apache.karaf.features.cfg中的featuresBoot变量)是:
odl-jolokia,decanter-collector-jmx,decanter-appender-elasticsearch
但是,我们也将featuresRepositories配置为具有:
mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features
这是一个包含一些额外信息的wiki page。
下面是一个获取数据以查找Mem Usage的示例,我们还安装了elasticsearch,它可以让我们将其视为一个graph over time
希望能有所帮助。
https://stackoverflow.com/questions/56109147
复制相似问题