Skip to content

Instantly share code, notes, and snippets.

@aiwantaozi
Last active August 15, 2019 11:57
Show Gist options
  • Save aiwantaozi/62e4b4276ba90979eeaf4e72cea5b5ad to your computer and use it in GitHub Desktop.
Save aiwantaozi/62e4b4276ba90979eeaf4e72cea5b5ad to your computer and use it in GitHub Desktop.
Steps to integrate with aliyun log service

Steps to integrate with aliyun log service

Kafka

Steps:

1. Go to the aliyun log server page and create a project, remember the region you select, different region have different access endpoint

Log Service Access Endpoint For Different Region

2. Continue to create logstore after project created

3. Base on this doc configure the rancher logging target

Aliyun Kafka Input Doc WX20190815-195512@2x.png You will need:

  • project name
  • logstore name
  • access key
  • access secret

4. Use custom mode to input configure in rancher, sample below. SSL CA certificate could be seen base on the root CA link in aliyun page

CA Base64 Click View in Base64 and copy it to rancher page. Custom mode configure sample

<match *>
  @type kafka_buffered
  brokers cn-hangzhou.log.aliyuncs.com:10012
  default_topic michelia-logstore
  default_message_key content
  output_data_type json
  output_include_tag true
  output_include_time true
  username michelia-project
  password xxxxx
  required_acks 1
  compression_codec gzip
  ssl_ca_cert /fluentd/etc/config/ssl/project_c-sbkgd_p-g5bt7_ca.pem
</match>

Sample

Syslog

It depends on syslog structure data, not support yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment