第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

yaml:使用 go 時出現(xiàn)取消警告錯誤

yaml:使用 go 時出現(xiàn)取消警告錯誤

Go
墨色風(fēng)雨 2022-09-12 16:48:41
我運行代碼:https://github.com/prometheus-community/json_exporter 通過更改配置將json數(shù)據(jù)轉(zhuǎn)換為普羅米修斯指標(biāo)數(shù)據(jù)類型錯誤是:level=error ts=2021-07-05T06:19:52.714Z caller=main.go:58 msg="Error loading config" err="yaml: unmarshal errors:\n  line 7: cannot unmarshal !!str `id:\"{.id}\"` into map[string]string"這是我的yaml配置:metrics:- name: running_applications  type: object   help: Information on running applications  path: '{.apps.app[?(@.state=="RUNNING")]}'  labels:        id:'{.id}'  values:        memory: '{.allocatedMB}'        vcores: '{.allocatedVCores}'以下是 json 的一部分:{"apps":{"app":[{"id":"application_1622098898935_1480","user":"hive","name":"HIVE-b5770b0d-fdd0-4ee4-86f8-1684df70dae9","queue":"default","state":"FINISHED","finalStatus":"SUCCEEDED","progress":100.0,"trackingUI":"History","trackingUrl":"http://tst02.bj2.sdbmcc.com:30999/proxy/application_1622098898935_1480/","diagnostics":"Attempt recovered after RM restartSession timed out, lastDAGCompletionTime=1624665783612 ms, sessionTimeoutInterval=600000 ms\nSession stats:submittedDAGs=1, successfulDAGs=1, failedDAGs=0, killedDAGs=0\n","clusterId":1625045401338,"applicationType":"TEZ","applicationTags":"hive_20210626080103_7098ab3b-ea51-4780-ba5d-aa823335b102,userid=user-app_ebupt","priority":0,"startedTime":1624665666232,"finishedTime":1624666419590,"elapsedTime":753358,"amContainerLogs":"http://tst02.bj2.sdbmcc.com:8042/node/containerlogs/container_e82_1622098898935_1480_01_000001/hive","amHostHttpAddress":"tst02.bj2.sdbmcc.com:8042","masterNodeId":"tst02.bj2.sdbmcc.com:45454","allocatedMB":-1,"allocatedVCores":-1,"reservedMB":-1,"reservedVCores":-1,"runningContainers":-1,"memorySeconds":3752447,"vcoreSeconds}}
查看完整描述

1 回答

?
慕運維8079593

TA貢獻(xiàn)1876條經(jīng)驗 獲得超5個贊

根據(jù)馬可的建議,修改 yaml 配置文件如下:


metrics:

- name: running_applications

  type: object 

  help: Information on running applications

  path: '{.apps.app[?(@.state=="RUNNING")]}'

  labels:

        id: '{.id}'

  values:

        memory: '{.allocatedMB}'

        vcores: '{.allocatedVCores}'


查看完整回答
反對 回復(fù) 2022-09-12
  • 1 回答
  • 0 關(guān)注
  • 108 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號