Weblogic 错误-“;“无效”;不是有效的开始令牌

Weblogic 错误-“;“无效”;不是有效的开始令牌,weblogic,prometheus,Weblogic,Prometheus,在prometheus控制台中,我可以看到目标状态为down,错误“INVALID”不是有效的启动令牌 我遵循以下步骤: 在linux1机器上安装普罗米修斯 在linux2计算机上安装weblogic 在weblogic服务器上部署jar文件 校验仪表 在prometheus.yml中添加weblogic服务器条目 重新启动普罗米修斯服务 以下是详细信息- 普罗米修斯原木: level=warn ts=2019-09-06T11:42:42.187Z caller=scrap.go:937 co

在prometheus控制台中,我可以看到目标状态为down,错误“INVALID”不是有效的启动令牌

我遵循以下步骤:

  • 在linux1机器上安装普罗米修斯
  • 在linux2计算机上安装weblogic
  • 在weblogic服务器上部署jar文件
  • 校验仪表
  • 在prometheus.yml中添加weblogic服务器条目
  • 重新启动普罗米修斯服务
  • 以下是详细信息-

    普罗米修斯原木:

    level=warn ts=2019-09-06T11:42:42.187Z caller=scrap.go:937 component=“scrap manager”scrap\u pool=weblogic1 target=http://***************.***.***.:7001/wls exporter msg=“append failed”err=““INVALID\”不是有效的启动令牌”

    curl输出1:-
    -bash-4.2$curl http://*****************:7001/wls导出器| promtool检查度量
    -bash:promtool:未找到命令
    %总接收百分比%x平均速度时间电流
    数据加载上载总左速度
    100 1783 100 1783 0 323k 0--:---:---:---:---:---348k
    (23)写作主体不合格
    -bash-4.2$
    旋度输出2:-
    -bash-4.2$curl-v--noproxy'*''http://********************:7001/wls exporter'
    *即将连接()到端口7001(#0)
    *正在尝试**.*********。。。
    *已连接到端口7001(#0)
    >GET/wls导出器HTTP/1.1
    >用户代理:curl/7.29.0
    >主机:********************************:7001
    >接受:*/*
    >
    
    配置
    要更改配置,请执行以下操作:

    追加 代替

    当前配置

    
    主持人:*********************.******
    港口:7001
    查询同步:
    网址:http://coordinator:8999/
    刷新间隔:5
    metricsNameSnakeCase:正确
    域名限定符:true
    恢复端口:7001
    查询:
    -关键字:姓名
    关键字:服务器
    应用程序运行时:
    关键字:姓名
    关键词:应用
    组件运行时:
    类型:WebAppComponentRuntime
    前缀:webapp_config_
    关键字:姓名
    值:[deploymentState、contextRoot、sourceInfo、OpenSessionHighCount、OpenSessionCurrentCount、SessionOpenDTotalCount、SessionOkieMaxageSecs、sessionInvalidationIntervalSecs、sessionTimeoutSecs、singleThreadedServletPoolSize、SessionIdleLength、servletReloadCheckSecs、jSPPageCheckSecs]
    servlet:
    前缀:weblogic_servlet_
    关键字:servletName
    值:[invocationTotalCount、reloadTotal、executionTimeAverage、poolMaxCapacity、executionTimeTotal、reloadTotalCount、executionTimeHigh、executionTimeLow]
    -JVM运行时:
    前缀:jvm_
    关键字:姓名
    值:[heapFreeCurrent、heapFreeCurrent、heapSizeCurrent、heapSizeMax、正常运行时间、processCpuLoad]
    

    *0到主机*******************的连接保持不变 -bash-4.2$
    错误
    “无效”不是有效的开始标记“
    通常在普罗米修斯希望得到一个但得到其他东西时遇到。在这种情况下,如果您省略了URL的en处的
    /metrics
    ,或者如果导出器报告了错误页面(
    401-需要验证
    ),则导出器登录页将被删除

    仔细观察,似乎Prometheus发送给导出器的身份验证令牌被转发到Weblogic API。Prometheus配置应如下所示:

    curl -u 'weblogic:friend' http://**********.***.****.***:7001/wls-exporter/metrics | promtool check metrics
    
    您可以使用
    curl
    和相关参数对其进行测试:


    在我的例子中,我的
    /metrics
    端点意外地有一个
    \ufeff
    字节顺序标记(因为在C#.Net中我调用了
    newstreamwriter(httpListenerResponse.OutputStream,Encoding.UTF8)
    ,而不是
    new UTF8Encoding(false)
    ),所以在获取度量端点时请仔细检查(例如,
    curl localhost:8080/metrics | hextump-c
    ),都是ASCII,文档看起来像是url末尾缺少的
    /metrics
    。感谢Michael的评论。请参见下面的oputput:--bash-4.2$curl | promtool检查metrics-bash:promtool:未找到命令%Total%已收到%Xferd平均速度时间当前Dload Upload总计已用左速度100 23 100 23 0 0 2073 0--:-:-:-:-:-:-:-:-:-:-:-:-:-:---2300(23)无法写入body-bash-4.2$curl-v--noproxy''''''即将连接()到x.x.xx.x端口7001(#0)*正在尝试x.x.x...*连接到x.x.xx.x(x.x.x)端口7001(#0)>GET/wls exporter/metrics HTTP/1.1>用户代理:curl/7.29.0>主机:x.x.xx.x:7001>接受:*/>需要身份验证。您是否向导出者提供访问WebLogic API的授权?Michael-我应该在哪里提供授权输入(在prometheus.yml中或在配置文件中生成jar文件时)?
    curl -u 'weblogic:friend' http://**********.***.****.***:7001/wls-exporter/metrics | promtool check metrics