Grafana サンプルダッシュボード コンテナログ (Google Cloud Logging)¶
使用しているベンダーが Google Cloud の場合に使用する Google Cloud Logging に収集されたコンテナログデータを表示するサンプルダッシュボードです。
ダッシュボードの使用方法¶
本ダッシュボードを使用することで、コンテナログデータを表示することができます。
Cluster Name
にてクラスタ名を入力することで、クラスタ内のコンテナログデータを表示することができます。
また、 Pod Name
にて Pod 名による部分一致の検索を行うことができます。
コードブロック右上のコピーボタンからコピーしてお使いください。
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 6,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "googlecloud-logging-datasource"
},
"gridPos": {
"h": 19,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"targets": [
{
"datasource": {
"type": "googlecloud-logging-datasource"
},
"projectId": "",
"queryText": "severity >= DEFAULT\nAND resource.labels.cluster_name = $cluster\nAND resource.labels.pod_name : $pod",
"refId": "A"
}
],
"title": "Google Cloud Logging",
"transformations": [],
"type": "logs"
}
],
"refresh": "",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {
"isNone": true,
"selected": false,
"text": "None",
"value": ""
},
"datasource": {
"type": "stackdriver"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "Project",
"multi": false,
"name": "project",
"options": [],
"query": {
"labelKey": "",
"loading": false,
"projectName": "",
"projects": [
{
"label": "",
"value": ""
}
],
"refId": "CloudMonitoringVariableQueryEditor-VariableQuery",
"selectedMetricType": "actions.googleapis.com/smarthome_action/camerastream/first_frame_latencies",
"selectedQueryType": "projects",
"selectedSLOService": "",
"selectedService": "actions.googleapis.com",
"sloServices": []
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": false,
"text": "",
"value": ""
},
"hide": 0,
"label": "Cluster",
"name": "cluster",
"options": [
{
"selected": true,
"text": "managed-cluster",
"value": "managed-cluster"
}
],
"query": "managed-cluster",
"skipUrlSync": false,
"type": "textbox"
},
{
"current": {
"selected": false,
"text": "",
"value": ""
},
"hide": 0,
"label": "Pod",
"name": "pod",
"options": [
{
"selected": true,
"text": "",
"value": ""
}
],
"query": "",
"skipUrlSync": false,
"type": "textbox"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Google Cloud Logging",
"uid": "kcoQGXfVk",
"version": 2,
"weekStart": ""
}