Closed mks27 closed 2 years ago
could you please share your config.yaml file for exporter?
this is my config.yml :
metricsNameSnakeCase: true queries:
applicationRuntimes: key: name keyName: app componentRuntimes: type: WebAppComponentRuntime prefix: webappconfig key: name values: [deploymentState, contextRoot, sourceInfo, openSessionsHighCount, openSessionsCurrentCount, sessionsOpenedTotalCount, sessionCookieMaxAgeSecs, sessionInvalidationIntervalSecs, sessionTimeoutSecs, singleThreadedServletPoolSize, sessionIDLength, servletReloadCheckSecs, jSPPageCheckSecs] servlets: prefix: weblogicservlet key: servletName values: [invocationTotalCount, reloadTotal, executionTimeAverage, poolMaxCapacity, executionTimeTotal, reloadTotalCount, executionTimeHigh, executionTimeLow]
JVMRuntime: key: name prefix: jvm_ values: [heapFreeCurrent, heapFreePercent, heapSizeCurrent, heapSizeMax, uptime, processCpuLoad]
do you run it behind load balancer? could you please add restPort: 8001 to your config yaml?
no, i am not running it behind load balancer and i also tried restPort, still it is not working.
could you please describe your env? is it k8s or standalone, what is the version of monexporter?
i am directly deploying wls-exporter on weblogic server whose version is 12.2.1.2 and version of wls-exporter is 1.1.1
just to verify all of your steps:
yes, these are correct
could you please attach screenshot with error? and configuration page?
also if you can rerun it with exporter 1.1.2 version we support right now
these are the images of configuration page and error page.
i tried it with exporter 1.1.2 also, still the same issue.
as a work around please take a look at your /etc/hosts file ( as root) and add similar to this: 127.0.0.1 localhost.localdomain loghost localhost 10.196.1.6 slc13kef.us.oracle.com slc13kef ( 10.196.1.6) is your IP address , slc13kef is your hostname, try to access your url using ip or hostname instead of localhost
i am working in windows. how to do that in windows
by doing this, i am able to access the page but now i am getting another error:
is it possible to try to redeploy wls-exporter app after you changed your hosts file, and insert screenshot for config page, also server logs/out files?
also make sure your RESTfull management services are active ( go to console ->click domain name -> under Configuration general expend Advanced section, select checkbox RESTfull Management Services) and click save
this is screenshot of config page:
and these are error from server.out file:
<Apr 6, 2020, 12:33:07,572 PM IST>
<Apr 6, 2020, 12:33:07,579 PM IST>
<Watch "UncheckedException" in module "Module-FMWDFW" with severity "Notice" on server "MWAPPMSRV1" has triggered at Apr 6, 2020 12:33:07 PM IST. Notification details: WatchRuleType: Log WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802')) WatchData: MESSAGE = [ServletContext@1323205551[app:wls-exporter module:wls-exporter.war path:null spec-version:3.1]] Servlet failed with an Exception com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $ at com.google.gson.JsonParser.parse(JsonParser.java:65) at com.google.gson.JsonParser.parse(JsonParser.java:45) at io.prometheus.wls.rest.LiveConfiguration.toJsonObject(LiveConfiguration.java:185) at io.prometheus.wls.rest.LiveConfiguration.scrapeMetrics(LiveConfiguration.java:181) at io.prometheus.wls.rest.ExporterServlet.getMetrics(ExporterServlet.java:93) at io.prometheus.wls.rest.ExporterServlet.displayMetrics(ExporterServlet.java:67) at io.prometheus.wls.rest.ExporterServlet.printMetrics(ExporterServlet.java:61) at io.prometheus.wls.rest.ExporterServlet.displayMetrics(ExporterServlet.java:54) at io.prometheus.wls.rest.PassThroughAuthenticationServlet.doWithAuthentication(PassThroughAuthenticationServlet.java:68) at io.prometheus.wls.rest.ExporterServlet.doGet(ExporterServlet.java:44) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:248) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3683) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3649) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326) at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197) at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203) at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71) at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2433) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2259) at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1691) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1651) at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:270) at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348) at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333) at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54) at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41) at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406) at weblogic.work.ExecuteThread.run(ExecuteThread.java:346) Caused By: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $ at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1568) at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1409) at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542) at com.google.gson.stream.JsonReader.peek(JsonReader.java:425) at com.google.gson.JsonParser.parse(JsonParser.java:60) at com.google.gson.JsonParser.parse(JsonParser.java:45) at io.prometheus.wls.rest.LiveConfiguration.toJsonObject(LiveConfiguration.java:185) at io.prometheus.wls.rest.LiveConfiguration.scrapeMetrics(LiveConfiguration.java:181) at io.prometheus.wls.rest.ExporterServlet.getMetrics(ExporterServlet.java:93) at io.prometheus.wls.rest.ExporterServlet.displayMetrics(ExporterServlet.java:67) at io.prometheus.wls.rest.ExporterServlet.printMetrics(ExporterServlet.java:61) at io.prometheus.wls.rest.ExporterServlet.displayMetrics(ExporterServlet.java:54) at io.prometheus.wls.rest.PassThroughAuthenticationServlet.doWithAuthentication(PassThroughAuthenticationServlet.java:68) at io.prometheus.wls.rest.ExporterServlet.doGet(ExporterServlet.java:44) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:248) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3683) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3649) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326) at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197) at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203) at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71) at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2433) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2259) at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1691) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1651) at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:270) at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348) at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333) at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54) at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41) at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406) at weblogic.work.ExecuteThread.run(ExecuteThread.java:346) SUPP_ATTRS = {severity-value=8, rid=0, partition-id=0, partition-name=DOMAIN} SERVER = MWAPPMSRV1 TIMESTAMP = 1586156587572 USERID = MACHINE = MOSSHARM-IN MSGID = BEA-101020 DATE = Apr 6, 2020, 12:33:07,572 PM IST SUBSYSTEM = HTTP CONTEXTID = 542fbcbf-ac6c-4adb-95c1-0952b8d3e9ef-000000a2 TXID = SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '47' for queue: 'weblogic.kernel.Default (self-tuning)'
WatchAlarmType: AutomaticReset WatchAlarmResetPeriod: 30000
i redeployed it and restful management services are also active but still i am facing same issue.
if possible to provide screenshot for http:/[yourhostname]:7003/wls-exporter/messages
screenshot for http:/localhost:7003/wls-exporter/messages
could you please use your machine name? you setup in hosts file or IP?
http:/[yourhostname]:7003/wls-exporter/messages
this is so strange, it does not even include JVM metrics in the request. could you please send me screen shot of your deployments in the console?
how did you generate wls-exporter.war file? another thing to try to replace configuration on managed server to have just JVM part: metricsNameSnakeCase: true queries:
It is clearly not able to get to the REST port. I have pushed a branch named show_query_url to GitHub. Could you try building from source and show me the messages page that you get? It should tell us where the exporter is looking for the REST API.
On Apr 7, 2020, at 1:50 PM, Mohit Kumar Sharma notifications@github.com wrote:
https://user-images.githubusercontent.com/20247450/78702531-5d582f80-7926-11ea-96ee-f44cfc4d7303.PNG — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/oracle/weblogic-monitoring-exporter/issues/91#issuecomment-610530775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARPWYEOCOVHOEDZKZOBED3RLNRX5ANCNFSM4LXJZ2BQ.
@marinakog , initially i downloaded wls-exporter from release page and put my config file in it with the help of shell script provided in release. and i also replaced the configuration with only JVM part but still i got the same error.
@russgold , i built the war file from source using your mentioned branch named show_query_url and this is the screenshot of messages page:
@russgold , this is the error i am getting:
@mks27 the query_url branch adds the query url to the messages page; your output doesn't show it, which makes me suspect that you're not actually using that version. Can you double-check?
Closing for lack of response
hi, i deployed wls-exporter on admin server , it is working fine but when i deployed it on managed server, it is showing results for /wls-exporter but on /wls-exporter/metrics it is giving error -- unable to contact the REST API. can you please tell what is the issue here?