4 Zabbix监控客户机的CPU使用率和其他资源(例子)

/**

*文中涉及到的键值(Key)参数配置可参考:

*https://www.zabbix.com/documentation/2.0/manual/config/items/perfcounters

*https://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/zabbix_agent/win_keys

*windows CMD:typeperf -qx > D:/zabbix.txt(可在zabbix.txt中查看当前windows系统可用的计数器资源,在客户机的配置文件中增加键值。服务器端配置该监控项)

**/

  1. 点击创建好的主机,选择 “监控项”

    点击“创建监控项”

    填写参数,明细如图,最后点击 “添加” 完成服务器端配置
  2. 客户端修改zabbix配置文件
    打开C:\zabbix\zabbix_agentd.win.conf,找到下面这段

    ### Option: PerfCounter
    # Syntax: <parameter_name>,"<perf_counter_path>",<period>
    # Defines new parameter <parameter_name> which is an average value for system performance counter <perf_counter_path> for the specified time period <period> (in seconds).
    # For example, if you wish to receive average number of processor interrupts per second for last minute, you can define new parameter "interrupts" as following:
    # PerfCounter = interrupts,"\Processor(0)\Interrupts/sec",60
    # Please note double quotes around performance counter path.
    # Samples for calculating average value will be taken every second.
    # You may run "typeperf -qx" to get list of all performance counters available in Windows.
    #
    # Mandatory: no
    # Range:
    # Default:


    增加一行:PerfCounter==UserPerfCountercpu,"\Processor(_Total)\% Processor Time",3
    UserPerfCountercpu 服务器端创建监控项时输入的 键值 名称
    重启Zabbix Agent服务,查看日志是否有错误。若有问题,可查看对应的错误提示,一般是新增的参数拼写方式有问题。修正后重启服务即可
  3. 在Zabbix服务端增加该监控项的图形显示

    点击“图形”--“创建图形”
     

    添加明细如下:在监控项 一行,点击“添加”

    选中 上步骤中创建的 监控项“CPU使用率”,添加后可配置该监控项的绘图风格、功能、颜色等

     

     

  4. 预览图形数据

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章