对于Prometheus来说,我是一个新手,他正在监控并致力于为小型POC的基于Windows的Hadoop安装获取JMX-Exporter设置。
我尝试将以下行放入“ hadoop_installation \ bin \ hdfs.cmd \”
set HADOOP_OPTS=%HADOOP_OPTS% "-javaagent:C:\path\to\jmx_prometheus_javaagent-0.11.0.jar=1985:C:\path\to\conf\hadoop.yml"
以下是我的hadoop.yml
rules:
- pattern: Hadoop<service=ResourceManager, name=MetricsSystem, sub=Stats><>NumAllSources
name: sources
labels:
app_id: "hadoop_rm"
现在,当我运行start-all.cmd
它给我错误,
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.lang.NumberFormatException: For input string: "C"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:42)
... 6 more
FATAL ERROR in native method: processing of -javaagent failed
我不确定我是否在正确的轨道上?
除了现成的FSImage导出器,还有其他方法吗?