【GaussDB】如何解决Ops巡检-om_monitor进程状态异常?

83 阅读2分钟

告警解释

=======

DBS运维管理平台提供指标监控能力,监测到om_monitor进程不存在时,产生此告警。

对系统的影响

如果有持续告警,此时om_monitor进程无法监控om_agent是否存活,无法感知om_agent相关进程状态。

可能原因

  • om_monitor进程报错退出并且启动失败。

  • /etc/crontab 中缺少如下定时任务:

    /usr/sbin/chroot /var/chroot /bin/bash -c '/bin/env LD_LIBRARY_PATH="/usr/local/app/lib: /usr/local/app/add-ons" >>/dev/null && source /etc/profile && source ~/.bashrc && source /etc/profile;(if [ -f ~/.profile ];then source ~/.profile;fi);source ~/.bashrc;source /home/Ruby/gauss_env_file; nohup /usr/local/core/app/bin/om_monitor -L /var/lib/engine/data1/log/Ruby/cm/om_monitor >>/dev/null 2>&1 &'

处理步骤

  1. 登录实例节点,切换root用户。

  2. 使用root用户执行cat /etc/crontab,查看是否存在以下配置信息 :

    /usr/sbin/chroot /var/chroot /bin/bash -c '/bin/env LD_LIBRARY_PATH="/usr/local/app/lib: /usr/local/app/add-ons" >>/dev/null && source /etc/profile && source ~/.bashrc && source /etc/profile;(if [ -f ~/.profile ];then source ~/.profile;fi);source ~/.bashrc;source /home/Ruby/gauss_env_file; nohup /usr/local/core/app/bin/om_monitor -L /var/lib/engine/data1/log/Ruby/cm/om_monitor >>/dev/null 2>&1 &'

    • 配置信息不存在,执行3
    • 配置信息存在,执行4

  3. 使用root用户执行vim /etc/crontab

    1. 2中图片选中的信息添加至**/etc/crontab**:

      */1 * * * * Ruby /usr/sbin/chroot /var/chroot /bin/bash -c '/bin/env LD_LIBRARY_PATH="/usr/local/app/lib: /usr/local/app/add-ons" >>/dev/null && source /etc/profile && source ~/.bashrc && source /etc/profile;(if [ -f ~/.profile ];then source ~/.profile;fi);source ~/.bashrc;source /home/Ruby/gauss_env_file; nohup /usr/local/core/app/bin/om_monitor -L /var/lib/engine/data1/log/Ruby/cm/om_monitor >>/dev/null 2>&1 &'

    2. 执行 service cron reload 刷新crond服务,让其加载新修改的配置。

    3. 等待2秒再执行 ps -ef | grep om看 om_monitor 进程是否存在。

      如果进程不存在,请执行4

  4. 联系技术支持

告警清除

此告警修复后,系统会自动清除此告警,无需手工清除。

参考信息

不涉及。

更多详情请参考GaussDB 文档中心:doc.hcs.huawei.com/db/zh-cn/ga…