我正在尝试将来自分布式JMeter从站的日志写入已经设置的ELK(Kibana),并且我一直在与Gelf一起玩并下载log4j2-gelf-1.3.1.jar
并将其放在apache-jmeter/lib
下。然后,我注释掉了JMeter随附的bin/log4j2.xml
中的默认条目,并尝试了
<Configuration status="WARN" >
<Appender name="graylog2" class="org.graylog2.log.GelfAppender">
<param name="graylogHost" value="graylogHost.company.com"/>
<param name="extractStacktrace" value="true"/>
<param name="addExtendedInformation" value="true"/>
<param name="layout" value="org.apache.log4j.PatternLayout"/>
<param name="facility" value="gelf-java"/>
<param name="additionalFields" value="{ 'application': 'jmeter', 'logger_topic': 'Performance'}"/>
</Appender>
<Loggers>
<Root level="info">
<AppenderRef ref="graylog2"/>
</Root>
</Loggers>
</Configuration>
当我运行bin/jmeter
时,看到以下错误-
ERROR Unable to locate appender "graylog2" for logger config "root"
有人可以使用Gelf编写Jmeter日志吗?