weblogic-monitoring-exporter icon indicating copy to clipboard operation
weblogic-monitoring-exporter copied to clipboard

No configuration defined.

Open dongdong159 opened this issue 3 years ago • 13 comments

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.

dongdong159 avatar Jun 08 '22 02:06 dongdong159

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.

dongdong159 avatar Jun 08 '22 08:06 dongdong159

Try sending the PUT to the exporter rather than WLS

russgold avatar Jun 08 '22 14:06 russgold

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.

dongdong159 avatar Jun 09 '22 00:06 dongdong159

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?

russgold avatar Jun 09 '22 02:06 russgold

Hi, I deploy the WLS by docker-compose without any other configurations: weblogic: image: vulhub/weblogic:12.2.1.3 ports: - 7001:7001

dongdong159 avatar Jun 09 '22 02:06 dongdong159

And I don't understand how to use web applications with docker-compose.

dongdong159 avatar Jun 09 '22 02:06 dongdong159

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.

russgold avatar Jun 09 '22 03:06 russgold

Hi, the project requires docker-compose to deploy, could I find a way with docker-compose?

dongdong159 avatar Jun 09 '22 03:06 dongdong159

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?

dongdong159 avatar Jun 09 '22 03:06 dongdong159

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?

russgold avatar Jun 09 '22 13:06 russgold

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.

dongdong159 avatar Jun 10 '22 00:06 dongdong159

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.

russgold avatar Jun 10 '22 00:06 russgold

Roger that. I'll try it. Thanks again!

dongdong159 avatar Jun 10 '22 01:06 dongdong159

This issue has been answered

mriccell avatar Sep 15 '22 20:09 mriccell