Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: how use apisix send log to aliyun sls #2169

Closed
gy09535 opened this issue Sep 4, 2020 · 7 comments
Closed

feat: how use apisix send log to aliyun sls #2169

gy09535 opened this issue Sep 4, 2020 · 7 comments

Comments

@gy09535
Copy link
Contributor

gy09535 commented Sep 4, 2020

Issue description

How apisix can send log to aliyun? I think ailiyun support syslog standard rfc5424( https://help.aliyun.com/document_detail/112903.html?spm=a2c4g.11186623.6.763.28801b47aqgVZq).

But the nginx support syslog standard rfc3164(http://nginx.org/en/docs/syslog.html).

And I can not find the log message format filed "STRUCTURED-DATA" in rfc3164(https://tools.ietf.org/html/rfc3164#section-4.1.1 ),But find it in rfc5424(https://tools.ietf.org/html/rfc5424?spm=a2c4g.11186623.2.17.5b0f1b47l82QJg).

So I am confused how should I use it in syslog plugin.

Environment

  • apisix version (cmd: apisix version):
  • OS:
@moonming
Copy link
Member

moonming commented Sep 7, 2020

@membphis @gxthrj please take a look

@gy09535
Copy link
Contributor Author

gy09535 commented Sep 7, 2020

I have see the repository of https://github.com/cloudflare/lua-resty-logger-socket, It just implementation socket log to send log to syslog-ng(collector) source.The syslog-ng has sources and destinations. I should publish "syslog-ng" for proxy for ali cloud log service(sls). I think should I send log to sls without proxy.

@gy09535 gy09535 changed the title request help: how use syslog send nginx log to aliyun sls feature: how use syslog send nginx log to aliyun sls Sep 7, 2020
@gy09535 gy09535 changed the title feature: how use syslog send nginx log to aliyun sls feature: how use apisix send nginx log to aliyun sls Sep 7, 2020
@gy09535 gy09535 changed the title feature: how use apisix send nginx log to aliyun sls feature: how use apisix send log to aliyun sls Sep 7, 2020
@membphis
Copy link
Member

membphis commented Sep 9, 2020

I think we can send the log to aliyun sls is an easy way, and that is a stable way.

use lua-resty-logger-socket is a better way.

@membphis
Copy link
Member

membphis commented Sep 9, 2020

another way, set syslog server in conf/config.yaml is another good method

@gy09535
Copy link
Contributor Author

gy09535 commented Sep 10, 2020

I think we can send the log to aliyun sls is an easy way, and that is a stable way.

use lua-resty-logger-socket is a better way.

Agree with you and I use cosocket implementation it, please review

@membphis
Copy link
Member

welcome PR,then the community can share this feature. ^_^

@gy09535
Copy link
Contributor Author

gy09535 commented Sep 11, 2020

welcome PR,then the community can share this feature. ^_^

I use cosocket and processor to send logs to sls , users can define different routes or services plugins to send logs to different log store which in sls.Users can use sls do anything such as data analysis monitor and alarm etc. For how to use I finish the doc, users can reference sls logger doc to use it. The PR is finished please review @membphis @moonming. According to #2177

@gy09535 gy09535 changed the title feature: how use apisix send log to aliyun sls feat: how use apisix send log to aliyun sls Sep 14, 2020
@gxthrj gxthrj closed this as completed Nov 21, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants