使用ELK分析腾讯云CLB日志

缘起

最近在使用腾讯云,想对访问日志进行收集与分析,发现CLB(负责均衡)日志只能保存到COS上面,而且是每个CLB没小时压发送个gz压缩包到COS。

实现方式

CLB配置日志存储到COS,Filebeat客户端CVM安装cosfs挂载COS,并配置Filebeat输出到Elasticsearch集群,最后通过Kibana和Grafana分析。

参考文档

https://www.elastic.co/guide/en/logstash/current/lookup-enrichment.html
https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-reference-yml.html
https://www.elastic.co/guide/en/beats/filebeat/current/configuration-template.html
https://www.elastic.co/guide/en/logstash-versioned-plugins/versioned_plugin_docs/v4.1.5-plugins-inputs-file.html
https://www.elastic.co/guide/en/logstash-versioned-plugins/versioned_plugin_docs/v3.1.0-plugins-filters-translate.html
https://www.elastic.co/guide/en/logstash-versioned-plugins/versioned_plugin_docs/v1.0.4-plugins-filters-jdbc_streaming.html
https://www.elastic.co/guide/en/logstash-versioned-plugins/versioned_plugin_docs/v9.2.0-plugins-outputs-elasticsearch.html
/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-elasticsearch-9.2.0-java/lib/logstash/outputs/elasticsearch/elasticsearch-template-es6x.json

实施步骤

1. COS创建bucket用于存储CLB日志
2. CLB配置存储日志到COS

日志访问:当前仅支持HTTP/HTTPS访问日志的收集,腾讯云默认在CLB底层为客户保留3天的日志;开启日志访问后,日志将存入COS,支持更长期地存储,详情请见https://cloud.tencent.com/document/product/214/10329。

3. 客户端配置COSFS工具

安装Filebeat或Logstash客户端上安装COSFS工具,挂载COS,安装参考https://cloud.tencent.com/document/product/436/6883。

4. 客户端配置传输日志到Elasticsearch集群

a. Logstash主要配置信息如下:

input {
   file{
      path => "/nginxlog/clb_log_bj/*/*/*"   #监控日志路径,可通配
      exclude => "*.gz"                              #排除掉gz压缩文件,因为腾讯CLB日志没小时生成一个压缩包,这边需要脚本自动解压缩
      codec => "json"                                #日志格式为JSON
   }
}

filter {
    jdbc_streaming{                          #使用jdbc_streaming filter是给域名加上部门,默认CLB日志没有部门字段,也可以用translate filter但是不方便动态更新
        jdbc_driver_library => "/etc/logstash/mysql-connector.jar"
        jdbc_driver_class => "com.mysql.jdbc.Driver"
        jdbc_connection_string => "jdbc:mysql://localhost:3306/domain"
        jdbc_user => "domain_rw"
        jdbc_password => "domain_password"
        statement => "select ifnull((select department from domain.domain WHERE url = :server_name),CONVERT(‘其他‘ USING utf8)) as department"
        parameters => { "server_name" => "server_name"}
        target => "department"
    }
}

output {
   elasticsearch {
       hosts => ["elasticsearch01:9200","elasticsearch02:9200","elasticsearch03:9200"]
       index => "logstash-nginxlog-%{+YYYY.MM.dd}"
       manage_template => true
       template_overwrite => true
       template_name => "nginx_template"                                 #自定义模板名字
       template => "/etc/logstash/templates/nginx_template"      #自定义模板路径
  }
}

b. Nginx模板配置信息如下:

{
"template" : "logstash-nginxlog-*",     #在默认logstash模板上面修改的
"version" : 999,
"settings" : {                                       #主要是改动index分片,副本,其他也可以更加需要修改
"index.refresh_interval" : "60s",
"index.number_of_shards": "3",
"index.number_of_replicas": "1"
},
"mappings" : {
"_default_" : {
"dynamic_templates" : [ {
"message_field" : {
"path_match" : "message",
"match_mapping_type" : "string",
"mapping" : {
"type" : "text",
"norms" : false
}
}
}, {
"string_fields" : {
"match" : "*",
"match_mapping_type" : "string",
"mapping" : {
"type" : "text", "norms" : false,
"fields" : {
"keyword" : { "type": "keyword", "ignore_above": 256 }
}
}
}
} ],
"properties" : {
"@timestamp": { "type": "date"},
"@version": { "type": "keyword"},
"geoip" : {
"dynamic": true,
"properties" : {
"ip": { "type": "ip" },
"location" : { "type" : "geo_point" },
"latitude" : { "type" : "half_float" },
"longitude" : { "type" : "half_float" }
}
}
}
}
}
}

c. Filebeat主配置文件如下:

filebeat.inputs:                          #默认简单需求filebeat就能满足,记录下
- type: log
enabled: true
paths:
- /nginxlog/clb_log_bj/*/*/*        #监控日志路径

exclude_files: [‘.gz/pre>]          #排除压缩文件

json.message_key: log            #如下三行设置json格式
json.keys_under_root: true
json.overwrite_keys: true

filebeat.config.modules:           #设置日志字段,可以删除不需要的字段信息
path: ${path.config}/modules.d/*.yml
reload.enabled: true

setup.template.enabled: true    #如下设置索引名称、分片、副本信息
setup.template.name: "filebeat-nginxlog"
setup.template.pattern: "filebeat-nginxlog-*"
setup.template.overwrite: true
setup.template.settings:
index.number_of_shards: 3
index.number_of_replicas: 1

output.elasticsearch:                 #如下输出elasticsearch集群配置
hosts: ["elasticsearch01:9200","elasticsearch02:9200","elasticsearch03:9200"]
index: "filebeat-nginxlog-%{+yyyy.MM.dd}"
5. Grafana或者Kibana制图

a. Grafana制图模板如下:

{
  "__inputs": [
    {
      "name": "DS_LOGSTASH-NGINXLOG",
      "label": "logstash-nginxlog",
      "description": "",
      "type": "datasource",
      "pluginId": "elasticsearch",
      "pluginName": "Elasticsearch"
    }
  ],
  "__requires": [
    {
      "type": "datasource",
      "id": "elasticsearch",
      "name": "Elasticsearch",
      "version": "5.0.0"
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "5.0.1"
    },
    {
      "type": "panel",
      "id": "grafana-piechart-panel",
      "name": "Pie Chart",
      "version": "1.3.3"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": "5.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1534240475758,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 16,
      "panels": [],
      "repeat": "department",
      "title": "$department",
      "type": "row"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "${DS_LOGSTASH-NGINXLOG}",
      "description": "",
      "fontSize": "80%",
      "format": "none",
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 1
      },
      "id": 6,
      "interval": null,
      "legend": {
        "percentage": true,
        "percentageDecimals": 2,
        "show": true,
        "values": true
      },
      "legendType": "Right side",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "pieType": "pie",
      "strokeWidth": "0",
      "targets": [
        {
          "bucketAggs": [
            {
              "fake": true,
              "field": "http_host.keyword",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_count",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "expr": "",
          "format": "time_series",
          "intervalFactor": 1,
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "http_host.keyword:$hostname  AND status.keyword:$status  AND  upstream_addr.keyword:$upstream_addr  AND department.department.keyword:$department",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "title": "域名访问比例图",
      "type": "grafana-piechart-panel",
      "valueName": "total"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "${DS_LOGSTASH-NGINXLOG}",
      "fontSize": "80%",
      "format": "none",
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 1
      },
      "id": 4,
      "interval": null,
      "legend": {
        "percentage": true,
        "percentageDecimals": 2,
        "show": true,
        "sortDesc": true,
        "values": false
      },
      "legendType": "Right side",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "pieType": "pie",
      "strokeWidth": "0",
      "targets": [
        {
          "bucketAggs": [
            {
              "fake": true,
              "field": "status.keyword",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_count",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "expr": "",
          "format": "time_series",
          "intervalFactor": 1,
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "http_host.keyword:$hostname  AND status.keyword:$status  AND  upstream_addr.keyword:$upstream_addr  AND department.department.keyword:$department",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "title": "状态码比例图",
      "type": "grafana-piechart-panel",
      "valueName": "total"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_LOGSTASH-NGINXLOG}",
      "fill": 1,
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 10
      },
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "bucketAggs": [
            {
              "fake": true,
              "field": "http_host.keyword",
              "id": "3",
              "settings": {
                "min_doc_count": 1,
                "order": "desc",
                "orderBy": "_count",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "expr": "",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "",
          "metrics": [
            {
              "field": "select field",
              "id": "1",
              "type": "count"
            }
          ],
          "query": "http_host.keyword:$hostname  AND status.keyword:$status  AND  upstream_addr.keyword:$upstream_addr  AND department.department.keyword:$department",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "域名访问趋势TOP10",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ]
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_LOGSTASH-NGINXLOG}",
      "fill": 1,
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 10
      },
      "hideTimeOverride": false,
      "id": 18,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": false,
        "max": true,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "Count"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "bucketAggs": [
            {
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "expr": "",
          "format": "time_series",
          "intervalFactor": 1,
          "metrics": [
            {
              "field": "request_time",
              "id": "1",
              "meta": {},
              "settings": {
                "percents": [
                  "90",
                  "95",
                  "99",
                  "99.9",
                  "99.99",
                  "100"
                ]
              },
              "type": "percentiles"
            }
          ],
          "query": "http_host.keyword:$hostname  AND status.keyword:$status  AND  upstream_addr.keyword:$upstream_addr  AND department.department.keyword:$department",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt"
        },
        {
          "colorMode": "warning",
          "fill": false,
          "line": false,
          "op": "gt",
          "value": 5000
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "延迟",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "s",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ]
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 17
      },
      "id": 14,
      "panels": [
        {
          "columns": [],
          "datasource": "logstash-nginxlog",
          "fontSize": "100%",
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 0,
            "y": 70
          },
          "id": 12,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "link": false,
              "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)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "bucketAggs": [
                {
                  "field": "http_user_agent.keyword",
                  "id": "2",
                  "settings": {
                    "min_doc_count": 1,
                    "order": "desc",
                    "orderBy": "_count",
                    "size": "10"
                  },
                  "type": "terms"
                }
              ],
              "expr": "",
              "format": "table",
              "intervalFactor": 1,
              "metrics": [
                {
                  "field": "select field",
                  "id": "1",
                  "type": "count"
                }
              ],
              "query": "http_host.keyword:$hostname  AND status.keyword:$status  AND  upstream_addr.keyword:$upstream_addr  AND department.department.keyword:$department",
              "refId": "A",
              "timeField": "@timestamp"
            }
          ],
          "title": "域名访问Agent TOP 10",
          "transform": "table",
          "transparent": false,
          "type": "table"
        },
        {
          "columns": [],
          "datasource": "logstash-nginxlog",
          "fontSize": "100%",
          "gridPos": {
            "h": 9,
            "w": 12,
            "x": 12,
            "y": 70
          },
          "id": 8,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "styles": [
            {
              "alias": "Time",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "number",
              "unit": "none"
            },
            {
              "alias": "",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "bucketAggs": [
                {
                  "field": "remote_addr.keyword",
                  "id": "2",
                  "settings": {
                    "min_doc_count": 1,
                    "order": "desc",
                    "orderBy": "_count",
                    "size": "10"
                  },
                  "type": "terms"
                }
              ],
              "expr": "",
              "format": "table",
              "intervalFactor": 1,
              "metrics": [
                {
                  "field": "select field",
                  "id": "1",
                  "type": "count"
                }
              ],
              "query": "http_host.keyword:$hostname  AND status.keyword:$status  AND  upstream_addr.keyword:$upstream_addr  AND department.department.keyword:$department",
              "refId": "A",
              "timeField": "@timestamp"
            }
          ],
          "title": "域名客户端IP TOP 10",
          "transform": "table",
          "type": "table"
        },
        {
          "columns": [],
          "datasource": "logstash-nginxlog",
          "fontSize": "100%",
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 79
          },
          "id": 10,
          "links": [],
          "pageSize": null,
          "scroll": true,
          "showHeader": true,
          "sort": {
            "col": 1,
            "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)"
              ],
              "decimals": 2,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "number",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "bucketAggs": [
                {
                  "fake": true,
                  "field": "request.keyword",
                  "id": "3",
                  "settings": {
                    "min_doc_count": 1,
                    "order": "desc",
                    "orderBy": "_count",
                    "size": "10"
                  },
                  "type": "terms"
                }
              ],
              "expr": "",
              "format": "table",
              "intervalFactor": 1,
              "metrics": [
                {
                  "field": "select field",
                  "id": "1",
                  "type": "count"
                }
              ],
              "query": "http_host.keyword:$hostname  AND status.keyword:$status  AND  upstream_addr.keyword:$upstream_addr  AND department.department.keyword:$department",
              "refId": "A",
              "timeField": "@timestamp"
            }
          ],
          "title": "域名Request TOP 10",
          "transform": "table",
          "type": "table"
        }
      ],
      "title": "Row title",
      "type": "row"
    }
  ],
  "refresh": false,
  "schemaVersion": 16,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_LOGSTASH-NGINXLOG}",
        "hide": 0,
        "includeAll": true,
        "label": "业务",
        "multi": true,
        "name": "department",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"department.department.keyword\"}",
        "refresh": 1,
        "regex": "",
        "sort": 2,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_LOGSTASH-NGINXLOG}",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "hostname",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"http_host.keyword\"}",
        "refresh": 1,
        "regex": "",
        "sort": 3,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_LOGSTASH-NGINXLOG}",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "status",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"status.keyword\" ,\"query\": \"http_host:$hostname\"}",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_LOGSTASH-NGINXLOG}",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "upstream_addr",
        "options": [],
        "query": "{\"find\": \"terms\", \"field\": \"upstream_addr.keyword\",\"query\": \"http_host:$hostname\"}",
        "refresh": 1,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "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": "腾讯云CLB日志分析",
  "uid": "7PJIMq5ik",
  "version": 8
}

原文地址:http://blog.51cto.com/jerrymin/2159947

时间: 2024-07-30 16:27:48

使用ELK分析腾讯云CLB日志的相关文章

elk分析nginx日志和tomcat日志

一.介绍 Elasticsearch + Logstash + Kibana(ELK)是一套开源的日志管理方案. Elasticsearch是个开源分布式搜索引擎,它的特点有:分布式,零配置,自动发现,索引自动分片,索引副本机制,restful风格接口,多数据源,自动搜索负载等. Logstash是一个完全开源的工具,它可以对你的日志进行收集.分析,并将其存储供以后使用 kibana 是一个开源和免费的工具,它可以为 Logstash 和 ElasticSearch 提供的日志分析友好的 Web

基于腾讯云CLB实现K8S v1.10.1集群高可用+负载均衡

概述: 最近对K8S非常感兴趣,同时对容器的管理等方面非常出色,是一款非常开源,强大的容器管理方案,最后经过1个月的本地实验,最终决定在腾讯云平台搭建属于我们的K8S集群管理平台~ 采购之后已经在本地部署了不下百次模拟线上生成环境,尽可能还原本地搭建过程,于是修改了安装脚本以及镜像文件. 基础环境 主机 地址 Type k8s-host1 192.168.100.121 master node k8s-host2 192.168.100.122 master node k8s-host3 192

从数据恢复角度分析腾讯云静默损坏

腾讯云在这次事件中的结论表述为因受所在物理硬盘固件版本Bug导致的静默错误,文件系统元数据损坏:根据这个表述,故障应出现在硬盘固件故障导致的文件系统元数据损坏.这其中,涉及具备因果关系的三个知识点:硬盘固件故障->文件系统元数据损坏->文件损坏.在此大致画一下腾讯云可能用到的存储架构方案.带*号的是不一定存在的存储链.事实上,这个逻辑肯定不准确,比如有些环节精减或不需要,有些环节有更详细的设计等.但是不是和真实场景一致不重要,重要的是,问题如果出现,总会出现在我列出的项或我没列出的项中(废话)

腾讯云无服务器云函数架构精解

欢迎大家前往腾讯云技术社区,获取更多腾讯海量技术实践干货哦~ 分享人:陈杰,腾讯云架构平台部技术专家,10年云计算经验,现供职于腾讯架构平台部,负责弹性计算及云函数技术研发,致力于提供领先的基础设施平台以提升资源利用率及优化提升程序员开发运维效率. 继虚拟机,容器技术,无服务器化成为新的行业热点,无服务器云函数可以让用户无需关心服务器的部署运营,只需开发最核心的业务逻辑,即可实现上线运营,具备分布容灾能力,可依据负载自动扩缩容,按照实际调用次数与时长计费.本次主要分享腾讯云无服务器云函数在技术实

云-腾讯云:腾讯云

ylbtech-云-腾讯云:腾讯云 腾讯云—腾讯倾力打造的云计算品牌,以卓越科技能力助力各行各业数字化转型,为全球客户提供领先的云计算.大数据.人工智能服务,以及定制化行业解决方案. 1.返回顶部 1. 腾讯云有着深厚的基础架构,并且有着多年对海量互联网服务的经验,不管是社交.游戏还是其他领域,都有多年的成熟产品来提供产品服务.腾讯在云端完成重要部署,为开发者及企业提供云服务.云数据.云运营等整体一站式服务方案. 具体包括云服务器.云存储.云数据库和弹性web引擎等基础云服务:腾讯云分析(MTA

腾讯云容器服务大容量日志的处理记录

一.项目背景 1.1 项目痛点 在目前小程序为主的大背景下,有客户大部分业务在腾讯云,使用的大部分为容器服务,在大规模的使用容器下,需要对容器内业务的日志采集及分析,在腾讯云对应容器服务的日志提供了两种消费方式:Kafka.日志服务CLS.但是对应业务线众多,在腾讯云容器服务只能指定十条日志收集规则,完全满足不了大规模日志收集场景,客户已经指定分业务两种消费方式均使用了起来,Kafka&日志服务,但是在Ckafka查看日志发现最高每分钟20W条消息,尽管已经最大程度的提升了消费端的能力(消费端使

[Big Data - ELK] ELK(ElasticSearch, Logstash, Kibana)搭建实时日志分析平台

ELK平台介绍 在搜索ELK资料的时候,发现这篇文章比较好,于是摘抄一小段: 以下内容来自: http://baidu.blog.51cto.com/71938/1676798 日志主要包括系统日志.应用程序日志和安全日志.系统运维和开发人员可以通过日志了解服务器软硬件信息.检查配置过程中的错误及错误发生的原因.经常分析日志可以了解服务器的负荷,性能安全性,从而及时采取措施纠正错误. 通常,日志被分散的储存不同的设备上.如果你管理数十上百台服务器,你还在使用依次登录每台机器的传统方法查阅日志.这

腾讯云数据库团队:MySQL数据库的高可用性分析

作者介绍:易固武,腾讯高级工程师,参与腾讯账号安全建设,腾讯数据仓库(TDW)优化改造,腾讯云数据库等项目,对大规模分布式存储和计算系统有浓厚的兴趣和经历 MySQL数据库是目前开源应用最大的关系型数据库,有海量的应用将数据存储在MySQL数据库中.存储数据的安全性和可靠性是生产数据库的关注重点.本文分析了目前采用较多的保障MySQL可用性方案. MySQL Replication MySQL Replication是MySQL官方提供的主从同步方案,用于将一个MySQL实例的数据,同步到另一个

ELK服务搭建(开源实时日志分析ELK平台部署)(低版本—简单部署)

开源实时日志分析ELK平台部署 日志主要包括系统日志.应用程序日志和安全日志.系统运维和开发人员可以通过日志了解服务器软硬件信息.检查配置过程中的错误及错误发生的原因.经常分析日志可以了解服务器的负荷,性能安全性,从而及时采取措施纠正错误. 通常,日志被分散的储存不同的设备上.如果你管理数十上百台服务器,你还在使用依次登录每台机器的传统方法查阅日志.这样是不是感觉很繁琐和效率低下.当务之急我们使用集中化的日志管理,例如:开源的syslog,将所有服务器上的日志收集汇总. 集中化管理日志后,日志的