1 Star 0 Fork 1

聯偉 / jenkinslibrary

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Jenkins Build Status-1581816279044.json 32.69 KB
一键复制 编辑 原始数据 按行查看 历史
TheYounger 提交于 2020-02-16 16:49 . grafanatemplate
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "Provides build health stats for each repo in an org",
"editable": true,
"gnetId": 10557,
"graphTooltip": 0,
"id": 3,
"iteration": 1581816246859,
"links": [],
"panels": [
{
"aliasColors": {
"Failed": "#f53636",
"Interruped": "#ed8128",
"Passed": "#32ac2d"
},
"breakPoint": "50%",
"cacheTimeout": null,
"combine": {
"label": "Others",
"threshold": 0
},
"datasource": "InfluxDB",
"fontSize": "80%",
"format": "short",
"gridPos": {
"h": 8,
"w": 7,
"x": 0,
"y": 0
},
"id": 11,
"interval": null,
"legend": {
"percentage": true,
"show": false,
"values": true
},
"legendType": "Under graph",
"links": [],
"maxDataPoints": 3,
"nullPointMode": "connected",
"options": {},
"pieType": "pie",
"strokeWidth": 1,
"targets": [
{
"alias": "Passed",
"groupBy": [],
"measurement": "job",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT count(\"build_id\") FROM \"$bussiness\" WHERE (\"project_name\" =~ /^$job$/ AND \"build_result\" = 1) ",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"jobtime"
],
"type": "field"
},
{
"params": [],
"type": "count"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
},
{
"condition": "AND",
"key": "result",
"operator": "=",
"value": "CompletedSuccess"
}
]
},
{
"alias": "Failed",
"groupBy": [],
"measurement": "job",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT count(\"build_id\") FROM \"$bussiness\" WHERE (\"project_name\" =~ /^$job$/ AND \"build_result\" = 0) ",
"rawQuery": true,
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"jobtime"
],
"type": "field"
},
{
"params": [],
"type": "count"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
},
{
"condition": "AND",
"key": "result",
"operator": "=",
"value": "CompletedError"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Overall",
"type": "grafana-piechart-panel",
"valueName": "total"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#299c46",
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"datasource": "InfluxDB",
"format": "none",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 4,
"w": 5,
"x": 7,
"y": 0
},
"id": 2,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"options": {},
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"repeat": null,
"repeatDirection": "h",
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false
},
"tableColumn": "",
"targets": [
{
"groupBy": [],
"hide": false,
"measurement": "job",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT count(\"build_id\") FROM \"$bussiness\" WHERE (\"project_name\" =~ /^$job$/ )",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
"select": [
[
{
"params": [
"jobtime"
],
"type": "field"
},
{
"params": [],
"type": "count"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
}
],
"thresholds": "",
"title": "总构建次数",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [],
"valueName": "total"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#299c46",
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"datasource": "InfluxDB",
"format": "s",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 4,
"w": 5,
"x": 12,
"y": 0
},
"id": 4,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"options": {},
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false
},
"tableColumn": "",
"targets": [
{
"groupBy": [],
"measurement": "job",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT \"build_time\" / 1000 FROM \"$bussiness\" WHERE (\"project_name\" =~ /^$job$/)",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"jobtime"
],
"type": "field"
},
{
"params": [
" / 1000"
],
"type": "math"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
}
],
"thresholds": "",
"title": "平均构建时间",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "avg"
},
{
"cacheTimeout": null,
"datasource": "InfluxDB",
"description": "最后一次单元测试结果",
"gridPos": {
"h": 4,
"w": 7,
"x": 17,
"y": 0
},
"id": 18,
"links": [],
"options": {
"displayMode": "lcd",
"fieldOptions": {
"calcs": [
"last"
],
"defaults": {
"decimals": 2,
"mappings": [],
"max": 1,
"min": 0,
"thresholds": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
],
"title": "",
"unit": "percentunit"
},
"override": {},
"values": false
},
"orientation": "horizontal"
},
"pluginVersion": "6.5.3",
"targets": [
{
"alias": "Passed",
"groupBy": [],
"measurement": "tests",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT last(\"tests_passed\") / (tests_passed + tests_skipped + tests_failed) FROM \"$bussiness\" WHERE (\"project_name\" =~ /^$job$/)",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"passed"
],
"type": "field"
},
{
"params": [],
"type": "last"
},
{
"params": [
" / (passed + skipped + failed)"
],
"type": "math"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
},
{
"alias": "Skipped",
"groupBy": [],
"measurement": "tests",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT last(\"tests_skipped\") / (tests_passed + tests_skipped + tests_failed) FROM \"$bussiness\" WHERE (\"project_name\" =~ /^$job$/)",
"rawQuery": true,
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"skipped"
],
"type": "field"
},
{
"params": [],
"type": "last"
},
{
"params": [
" / (passed + skipped + failed)"
],
"type": "math"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
},
{
"alias": "Failed",
"groupBy": [],
"measurement": "tests",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT last(\"tests_failed\") / (tests_passed + tests_skipped + tests_failed) FROM \"$bussiness\" WHERE (\"project_name\" =~ /^$job$/)",
"rawQuery": true,
"refId": "C",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"failed"
],
"type": "field"
},
{
"params": [],
"type": "last"
},
{
"params": [
" / (passed + skipped + failed)"
],
"type": "math"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "单元测试",
"type": "bargauge"
},
{
"cacheTimeout": null,
"colorBackground": true,
"colorPrefix": false,
"colorValue": false,
"colors": [
"#f53636",
"rgba(237, 129, 40, 0.89)",
"#32ac2d"
],
"datasource": "InfluxDB",
"decimals": null,
"format": "none",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 4,
"w": 5,
"x": 7,
"y": 4
},
"id": 9,
"interval": "",
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"options": {},
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"repeatDirection": "h",
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false
},
"tableColumn": "",
"targets": [
{
"groupBy": [],
"measurement": "job",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT last(\"build_result\") FROM \"$bussiness\" WHERE (\"project_name\" =~ /^$job$/)",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"passed"
],
"type": "field"
},
{
"params": [],
"type": "last"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
}
],
"thresholds": "0.5,1",
"title": "最后一次构建状态",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "FAILURE",
"value": "0"
},
{
"op": "=",
"text": "SUCCESS",
"value": "1"
}
],
"valueName": "current"
},
{
"datasource": "InfluxDB",
"decimals": 2,
"defaultColor": "rgb(117, 117, 117)",
"description": "This graph shows the percentage change of build duration between the latest run and the first one. The graph will be green if value <= 0; yellow if 0 < value <= 25; and red if value > 25",
"displayValue": "value",
"format": "ms",
"gridPos": {
"h": 4,
"w": 5,
"x": 12,
"y": 4
},
"id": 16,
"linkIndex": "0",
"links": [],
"numberSize": "14px",
"options": {},
"percentSize": "30px",
"targets": [
{
"groupBy": [],
"measurement": "job",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT \"build_time\" FROM \"$bussiness\" WHERE (\"project_name\" =~ /^$job$/ )",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"jobtime"
],
"type": "field"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
}
],
"thresholds": [
{
"color": "#f53636",
"value": "25"
},
{
"color": "#ed8128",
"value": "1"
},
{
"color": "#32ac2d",
"value": "-100"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Duration Trend",
"titleSize": "13px",
"type": "btplc-trend-box-panel"
},
{
"cacheTimeout": null,
"datasource": "InfluxDB",
"description": "最后一个测试覆盖率结果",
"gridPos": {
"h": 4,
"w": 7,
"x": 17,
"y": 4
},
"id": 24,
"links": [],
"options": {
"displayMode": "lcd",
"fieldOptions": {
"calcs": [
"last"
],
"defaults": {
"decimals": 1,
"mappings": [],
"max": 100,
"min": 0,
"thresholds": [
{
"color": "red",
"value": null
},
{
"color": "#EAB839",
"value": 60
},
{
"color": "green",
"value": 85
}
],
"title": "",
"unit": "percent"
},
"override": {},
"values": false
},
"orientation": "horizontal"
},
"pluginVersion": "6.5.3",
"targets": [
{
"alias": "Classes",
"groupBy": [],
"measurement": "coverage",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT last(\"classes\") FROM \"coverage\" WHERE (\"owner\" =~ /^$folder$/ AND \"repo\" =~ /^$job$/) AND $timeFilter",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"classes"
],
"type": "field"
},
{
"params": [],
"type": "last"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
},
{
"alias": "Lines",
"groupBy": [],
"measurement": "coverage",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT last(\"lines\") FROM \"coverage\" WHERE (\"owner\" =~ /^$folder$/ AND \"repo\" =~ /^$job$/) AND $timeFilter",
"rawQuery": true,
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"lines"
],
"type": "field"
},
{
"params": [],
"type": "last"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
},
{
"alias": "Branches",
"groupBy": [],
"measurement": "coverage",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT last(\"conditionals\") FROM \"coverage\" WHERE (\"owner\" =~ /^$folder$/ AND \"repo\" =~ /^$job$/) AND $timeFilter",
"rawQuery": true,
"refId": "C",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"conditionals"
],
"type": "field"
},
{
"params": [],
"type": "last"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "测试结果",
"type": "bargauge"
},
{
"columns": [],
"datasource": "InfluxDB",
"description": "构建信息",
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 8
},
"id": 14,
"links": [],
"options": {},
"pageSize": 5,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"alias": "Time",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "Time",
"type": "date"
},
{
"alias": "项目名称",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"link": true,
"linkTargetBlank": true,
"linkTooltip": "Click to go to Jenkins",
"linkUrl": "http://192.168.1.200:30080/job/${__cell_1:raw}",
"mappingType": 1,
"pattern": "project_name",
"preserveFormat": false,
"sanitize": false,
"thresholds": [],
"type": "string",
"unit": "short"
},
{
"alias": "项目构建ID",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "build_number",
"thresholds": [
"0",
"2"
],
"type": "string",
"unit": "short",
"valueMaps": []
},
{
"alias": "构建时间",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "build_time",
"thresholds": [],
"type": "number",
"unit": "ms"
},
{
"alias": "构建结果",
"colorMode": "row",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"link": false,
"mappingType": 1,
"pattern": "build_result",
"thresholds": [
"0.5",
"1"
],
"type": "string",
"unit": "short",
"valueMaps": [
{
"text": "SUCCESS",
"value": "1"
},
{
"text": "FAILURE",
"value": "0"
}
]
},
{
"alias": "构建描述",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "build_desc",
"thresholds": [],
"type": "string",
"unit": "short"
},
{
"alias": "构建节点",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "build_agent_name",
"thresholds": [],
"type": "string",
"unit": "short"
}
],
"targets": [
{
"groupBy": [],
"measurement": "job",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT \"project_name\", \"build_number\", \"build_time\",\"build_agent_name\", \"build_result\", \"build_desc\" FROM \"$bussiness\" WHERE (\"project_name\" =~ /^$job$/ )",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
"select": [
[
{
"params": [
"time"
],
"type": "field"
}
],
[
{
"params": [
"jobname"
],
"type": "field"
}
],
[
{
"params": [
"trigger"
],
"type": "field"
}
],
[
{
"params": [
"jobtime"
],
"type": "field"
}
],
[
{
"params": [
"joburl"
],
"type": "field"
}
],
[
{
"params": [
"passed"
],
"type": "field"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "构建详情",
"transform": "table",
"type": "table"
},
{
"collapsed": false,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 15
},
"id": 20,
"panels": [],
"title": "Duration",
"type": "row"
},
{
"aliasColors": {},
"bars": true,
"dashLength": 10,
"dashes": false,
"datasource": "InfluxDB",
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 16
},
"hiddenSeries": false,
"id": 8,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"hideEmpty": false,
"hideZero": false,
"max": false,
"min": false,
"rightSide": false,
"show": false,
"total": false,
"values": false
},
"lines": false,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "#$tag_build_number",
"groupBy": [
{
"params": [
"buildnumber"
],
"type": "tag"
}
],
"measurement": "job",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT \"build_time\" FROM \"$bussiness\" WHERE (\"project_name\" =~ /^$job$/ ) GROUP BY \"build_number\" ORDER by \"time\" ",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"jobtime"
],
"type": "field"
}
]
],
"tags": [
{
"key": "owner",
"operator": "=~",
"value": "/^$folder$/"
},
{
"condition": "AND",
"key": "repo",
"operator": "=~",
"value": "/^$job$/"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "构建持续时间",
"tooltip": {
"shared": false,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "series",
"name": null,
"show": true,
"values": [
"total"
]
},
"yaxes": [
{
"format": "ms",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": "",
"schemaVersion": 21,
"style": "dark",
"tags": [
"devops",
"jenkins",
"dev",
"in-progress"
],
"templating": {
"list": [
{
"allValue": null,
"current": {
"selected": false,
"text": "test",
"value": "test"
},
"datasource": "InfluxDB",
"definition": "show measurements",
"hide": 0,
"includeAll": false,
"label": "Folder",
"multi": false,
"name": "bussiness",
"options": [],
"query": "show measurements",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"selected": true,
"text": "test-indluxdb-service",
"value": "test-indluxdb-service"
},
"datasource": "InfluxDB",
"definition": "select project_name from $bussiness",
"hide": 0,
"includeAll": false,
"label": "Job",
"multi": false,
"name": "job",
"options": [],
"query": "select project_name from $bussiness",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-7d",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "Jenkins Build Status",
"uid": "000000005",
"version": 47
}
1
https://gitee.com/jiao314/jenkinslibrary.git
git@gitee.com:jiao314/jenkinslibrary.git
jiao314
jenkinslibrary
jenkinslibrary
master

搜索帮助