Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

如何打开rbd-gateway内的nginx的access_log #1909

Open
Libertad-904483782 opened this issue Apr 15, 2024 · 3 comments
Open

如何打开rbd-gateway内的nginx的access_log #1909

Libertad-904483782 opened this issue Apr 15, 2024 · 3 comments
Assignees

Comments

@Libertad-904483782
Copy link

碰到了一些ingress访问的问题,需要能打开特定域名的access log,发现页面上的网关配置中,没有关于日志的选项,直接修改ingress加注解会被刷掉。请教下,有办法打开吗

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: How to open the access_log of nginx in rbd-gateway

I encountered some ingress access problems. I needed to be able to open the access log of a specific domain name. I found that in the gateway configuration on the page, there was no log option. If I directly modify the ingress and add annotations, it would be erased. Please tell me, is there any way to open it?

@zzzhangqi
Copy link
Collaborator

@Libertad-904483782

kubectl edit rbdcomponent rbd-gateway -n rbd-system

spec:
  args:
  - --access-log=/dev/stdout

@yangkaa
Copy link
Collaborator

yangkaa commented Apr 15, 2024

fs.StringVar(&g.AccessLogPath, "access-log", "", "Set the access log store path, each server generates a file. Access logs are not generated by default.")
对应这个参数。你可以参考如下方式设置。

  1. 编辑 rbd-gateway 的 crd 资源。
kubectl edit rbdcomponent rbd-gateway -nrbd-system
  1. 增加上面的 access-log 参数,如下所示
apiVersion: rainbond.io/v1alpha1
kind: RbdComponent
metadata:
  name: rbd-gateway
  namespace: rbd-system
spec:
  args:
  - --access-log=/logs/access.log
  image: registry.cn-hangzhou.aliyuncs.com/goodrain/rbd-gateway:v5.17.0-release
  1. 上面的 access-log 定义的地址,就是accesslog文件。进入 rbd-gateway 容器下该路径查看即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants