linux – 在Keepalived.conf中记录详细程度?

前端之家收集整理的这篇文章主要介绍了linux – 在Keepalived.conf中记录详细程度?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我的一台路由器上的keepalived VIP停止响应.我仍然在主路由器上看到它而不是我期望的辅助路由器,我可以ping常规IP.一旦我重新启动keepalived,问题就解决了.

我不确定是什么导致了这个问题,是否有任何日志级别指令我可以添加到我的keepalived,如果再次发生这可能会给我一些信息?

我看到:

keepalived -f /usr/local/etc/keepalived.conf –dont-fork –log-console
–log-detail These options will stop keepalived from fork’ing,and
will provide additional logging data. Using these options is
especially useful when you are testing out new configuration
directives,or debugging an issue with an existing configuration file.

所以也许我只需要编辑我的init文件?看起来它应该是配置文件选项.

解决方法

看起来你必须编辑init脚本.来自keepalived.conf(5)通过git: http://master.formilux.org/git/people/alex/keepalived.git/
# Debug level,not implemented yet.
       debug

您还可以通过查看keepalived / check / check_parser.c中的配置解析代码来验证这一点:

265 vector
266 check_init_keywords(void)
267 {
268         /* global definitions mapping */
269         global_init_keywords();
270 
271         /* SSL mapping */
272         install_keyword_root("SSL",&ssl_handler);
273         install_keyword("password",&sslpass_handler);

列出它解析的所有配置文件关键字,并且调试不在此处.调试级别似乎只能通过keepalived / core / main.c选项处理来设置:

154                 "  %s --log-console        -l    Log message to local console.\n"
155                 "  %s --log-detail         -D    Detailed log messages.\n"
...
177                 {"log-console",'l',POPT_ARG_NONE,NULL,'l'},178                 {"log-detail",'D','D'},...
209         case 'l':
210                 debug |= 1;
211                 break;
...
224         case 'D':
225                 debug |= 32;
226                 break;
原文链接:https://www.f2er.com/linux/397758.html

猜你在找的Linux相关文章