云监控服务 CES-Agent状态切换或监控面板有断点该如何处理?:操作步骤

时间:2024-07-01 15:53:48

操作步骤

  1. 使用root账号,登录Agent不上报数据的E CS 或BMS。
  2. 可选:执行以下命令,切换至Agent安装路径的bin下。

    Windows系统下,路径为:“C:\Program Files\uniagent\extension\install\telescope”

    Linux系统下, 路径为:/usr/local/uniagent/extension/install/telescope/bin

  3. 修改配置文件conf.json。
    1. 执行以下命令,打开配置文件conf.json。

      vi conf.json

    2. 在conf.json文件中,添加如下四行参数,具体参数请参见表1
      表1 参数说明

      参数

      说明

      cpu_first_pct_threshold

      第一阈值(CPU),默认值为10,单位为%。

      memory_first_threshold

      第一阈值(内存),默认值为209715200(200MB),单位为Byte。

      cpu_second_pct_threshold

      第二阈值(CPU),默认值为30,单位为%。

      memory_second_threshold

      第二阈值(内存),默认值为734003200(700MB),单位为Byte。

      aAgent的CPU使用率和内存使用率查询方法:

      • Linux:

        top -p telescope的PID

      • Windows:

        在任务管理器中查看Agent进程详情。

      {
          "cpu_first_pct_threshold": xx,
          "memory_first_threshold": xxx,
          "cpu_second_pct_threshold": xx,
          "memory_second_threshold": xxx
      }

    3. 执行如下命令,保存并退出conf.json文件。

      :wq

  4. 请执行如下命令,重启Agent。
    • Windows系统下:
      • 在Agent安装包存放目录下,先双击执行shutdown.bat脚本,停止Agent,再执行start.bat脚本,启动Agent。
    • Linux系统下:
      • 执行以下命令查看telescope的PID。
      • ps -ef |grep telescope
      • 强制关闭进程后等待3-5分钟telescope可实现自动重启,操作示例如图1所示。
      • kill -9 PID
        图1 重启Agent
support.huaweicloud.com/ces_faq/ces_faq_0041.html