kubeflow / spark-operator

Kubernetes operator for managing the lifecycle of Apache Spark applications on Kubernetes.
Apache License 2.0
2.78k stars 1.38k forks source link

custom prometheus.yaml file #904

Open mirajgodha opened 4 years ago

mirajgodha commented 4 years ago

You can specify the custom content of metrics.properties usingmonitoring.metricsProperties , and custom location of prometheus.yaml using monitoring.prometheus.configFile. One option to use a custom prometheus.yaml file is to mount it to your driver pod using a configmap. Another option is to build a custom Docker image.

However, looking at the documentation it looks like: The field .spec.monitoring.prometheus.configuration specifies the content of the configuration to be used with the JMX exporter. The content of prometheus.yaml will be used by default if .spec.monitoring.prometheus.configuration is not specified.

If we can mention it here also, that will be very useful. Otherwise giving the file path on this .spec.monitoring.prometheus.configuration we get this error, which is difficult to debug.

ass com.miraj.SparkStreamingFromDirectory spark-internal miraj miraj1 1580803200 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.ClassCastException: java.lang.String cannot be cast to java.util.Map at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxCollector.<init>(JmxCollector.java:74) at io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:52) ... 6 more

Thanks, however, it works fine with configFile

liyinan926 commented 4 years ago

It's a bit confusing to me. What you meant by Otherwise giving the file path on this .spec.monitoring.prometheus.configuration we get this error, which is difficult to debug? Did you give a file path value to .spec.monitoring.prometheus.configuration?

github-actions[bot] commented 4 hours ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.