On Thu, Sep 12, 2019 at 2:32 PM parwez khan <
parwez...@gmail.com> wrote:
>
> Hi Simon and Zhang, thanks for the prompt reply. There is actually no error in prometheus server logs. Any error message is displayed on target console itself. Please note I have tried below till now:
>
> Note: All documentation from oracle or github provides details for using prometheus for weblogic on kubernetes, but I am not using kubernetes, feeling helpless as no documentation is available.
>
> 1. with basic auth added in scrape confihurations, prometheus.yml file looks like
> - job_name: 'weblogic'
> metrics_path: '/wls-exporter/metrics'
> static_configs:
> - targets: ['localhost:7001']
> basic_auth:
> username: 'weblogic'
> password: 'welcome1'
> with this configuration, target console display error as "strconv.ParseFloat: parsing "base_domain": invalid syntax"
The probable reason is that your endpoint doesn't expose valid data.
You can check whether this is the case with promtool:
curl http://weblogic:welcome1@localhost:7001/wls-exporter/metrics |
promtool check metrics
>
> 2. Adding authentication in target itself like below:
> job_name: 'weblogic'
> metrics_path: '/wls-exporter/metrics'
> static_configs:
> - targets: ['weblogic:welcome1@localhost:7001'], I get following error.
>
> parse http://weblogic:welcome1%40host:8001/wls-exporter/metrics: invalid URL escape "%40"
>
> 3. And with no auth added, it simply displays error as "error server returned HTTP status 401 Unauthorized"
>
> On Thursday, 12 September 2019 00:09:35 UTC+5:30, parwez khan wrote:
>>
>> Hi All,
>>
>> I am trying to scrape weblogic metrics using weblogic monitoring exporter and prometheus. I am not using kubernetes or docker, prometheus and weblogic are configured on RHEL servers only. I am able to get metrics from browser with url "http://host:port/wls-exporter/metrics". My prometheus configuration file for weblogic looks like as below:
>> - job_name: 'weblogic'
>> metrics_path: '/wls-exporter/metrics'
>> static_configs: - targets: ['xxx:7001']
>>
>> but for the above configuration prometheus gives error as target down and http, 401 error. I tried adding basic auth in prometehus for weblogic, but it gives some strconv error.
>>
>> Can anyone please suggest me on how and where to add authentication or scarpe metrics without authentication ?
>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
prometheus-use...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/f3435824-a1fb-4dc1-9d57-77d06f890afc%40googlegroups.com.