weblogic-monitoring-exporter
weblogic-monitoring-exporter copied to clipboard
No configuration defined.
I would like to use this exporter to monitor weblogic-server with Prometheus, my docker-compose file is : weblogic: image: vulhub/weblogic:12.2.1.3 container_name: weblogic ports: - 7001:7001
weblogic-exporter: image: container-registry.oracle.com/middleware/weblogic-monitoring-exporter:2.0.4 ports: - 7002:8080
when I visit localhost:7002/metrics, the browser shows :
No configuration defined.
But I don't know how to use the configuration file.
I used the : curl -X PUT -i -u weblogic:welcome1 -H "content-type: application/yaml" --data-binary "/wls-config.yaml" http://192.168.10.137:7001/configuration but the 192.168.10.137:7002/metrics still show:
No configuration defined.
Try sending the PUT to the exporter rather than WLS
Thanks for your reply. I send the PUT to the exporter, but the exporter shows : HTTP/1.1 500 Internal Server Error Date: Thu, 9 Jun 2022 00:26:19 GMT transfer-encoding: chunked connection: keep-alive
Unable to contact the REST API at http://172.18.0.19:7001. May be using the wrong port.
This most commonly occurs when the exporter is accessed via a load balancer
configured on a different port than the managed server.
You can correct this by giving the exporter WAR an initial configuration with the
restPort field set to the managed server's plain text port.
OK, the next question is, how is your WLS instance configured? Is that cluster-wide admin port enabled? The SSL port?
Why are you using the sidecar rather than the web application?
Hi, I deploy the WLS by docker-compose without any other configurations: weblogic: image: vulhub/weblogic:12.2.1.3 ports: - 7001:7001
And I don't understand how to use web applications with docker-compose.
Why are you using docker compose?
The sidecar approach is intended primarily for use with the WebLogic Kubernetes Operator (WKO). It is a much easier way to use WebLogic in a container environment.
Hi, the project requires docker-compose to deploy, could I find a way with docker-compose?
I noticed that if I want to use web applications, I need to add a configuration file in WAR directly. What dose the WAR refer to?
The WAR in this case is the exporter application, and yes, you would need the config file directly in the WAR. It is not easy to use web apps with docker-compose.
So we're back to the previous question: how is your WLS instance configured? Is that cluster-wide admin port enabled? The SSL port?
Hi, I just deploy the WLS with docker-compose and don't config it with any operations. So I haven't enabled the cluster-wide admin port and SSL port. Could you tell me how to deal with it?
Thanks sincerely.
I'm not really an expert at configuring WebLogic; I would recommend contacting your WebLogic support contact. I know that you need at least to create an admin user, which is what you are presumably sending in your PUT request. By default those should not be configured. You need at least to be able to access the REST query API.
Roger that. I'll try it. Thanks again!
This issue has been answered