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

[Enhancement]: obdiag rca support for specifying a time range #396

Open
joeyzxw opened this issue Aug 26, 2024 · 1 comment
Open

[Enhancement]: obdiag rca support for specifying a time range #396

joeyzxw opened this issue Aug 26, 2024 · 1 comment

Comments

@joeyzxw
Copy link

joeyzxw commented Aug 26, 2024

Description

when we use 'obdiag rca run' command to check relevant info from log files, the obdiag only search the last 30 minutes log files. As we can see from the print out info:
No time option provided, default processing is based on the last 30 minutes

For the convenience of troubleshooting, in order to identify log content over a broader time range, it is desired to have the option to open support for specifying a time range.

当我们使用‘obdiag rca run’ 命令在日志文件中检索相关信息,当前版本的obdiag 默认只会检查30分钟以内的日志内容。在obdiag的运行输出中我们可以看到如下内容:
No time option provided, default processing is based on the last 30 minutes
出于问题排查的便利行,为了能够识别到更大范围内的日志相关内容,期望obdiag可以开放支持指定时间范围的参数选项

@wayyoungboy
Copy link
Contributor

有兴趣的话可以提pr到obdiag中,由于部分场景需要依赖内部表中的数据,所以 from & to 两个参数无法实现其效果,反而可能造成诊断失误。个人建议可以在部分场景中以环境变量(input_parameters)的形式增加,并在相关的场景中进行调用,类似在clog_disk_full_scene.py中使用self.input_parameters.get("since")

If you are interested, you can submit a pull request to obdiag. Due to the dependency on data in internal tables, the "from" and "to" parameters may not have the desired effect and could potentially lead to diagnostic errors. My suggestion is to incorporate environment variables (input_parameters) in certain scenarios and call them in relevant scenes, similar to the utilization of self.input_parameters.get("since") in clog_disk_full_scene.py.

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

2 participants