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. 預覽圖形數據

 

 

 

 

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