ktelep / EMC-Zabbix-Integration

Integration for Zabbix and the EMC ECOM server for VNX1/VNX2 Monitoring
MIT License
35 stars 13 forks source link

I have question script logic #6

Closed naechin91004 closed 8 years ago

naechin91004 commented 8 years ago

hello. I try to make SYMMETRIX storage monitoring script.

So I success JSON OUT look like below. BUT I can't insert value.

JSONOUT

[ { "raid" : "RAID-5(3+1)", "usable_gb" : "78725.1", "comp_perc" : "0", "flags" : "TFFDEI", "name" : "SAS600_R1", "free_gb" : "160.3", "used_gb" : "64.8", "full_perc" : "94" }, { "raid" : "RAID-4(3+1)", "usable_gb" : "725.1", "comp_perc" : "2", "flags" : "TFFDEI", "name" : "SAS600_R2", "free_gb" : "120.3", "used_gb" : "666.8", "full_perc" : "83" }, { "raid" : "RAID-3(3+1)", "usable_gb" : "7825.1", "comp_perc" : "6", "flags" : "TFFDEI", "name" : "SAS600_R3", "free_gb" : "1260.3", "used_gb" : "6564.8", "full_perc" : "34" }, { "raid" : "RAID-2(3+1)", "usable_gb" : "7875.1", "comp_perc" : "4", "flags" : "TFFDEI", "name" : "SAS600_R4", "free_gb" : "160.3", "used_gb" : "664.8", "full_perc" : "4" }, { "raid" : "RAID-1(3+1)", "usable_gb" : "872.1", "comp_perc" : "3", "flags" : "TFFDEI", "name" : "SAS600_R5", "free_gb" : "1210.3", "used_gb" : "6564.8", "full_perc" : "1"

}

I want insert value "free_gb" : "1210.3" How can insert value data?

ktelep commented 8 years ago

Drop me an email directly and we can talk through ways to do this.

I recommend reading the documents on doing Zabbix LLD here, particularly focusing on the Custom Discovery Portion https://www.zabbix.com/documentation/2.4/manual/discovery/low_level_discovery

JSON is used for discovering the elements you want to actually monitor (like drives, pools, etc) and creating the keys in Zabbix. Once the keys are created THEN you load values.

To actually feed the data into Zabbix for those keys, this tool uses zabbix_sender and a properly formatted file. See this link: https://www.zabbix.com/documentation/2.4/manual/concepts/sender

So the process is - Create a script for doing discovery, which creates the keys in Zabbix via the info in the template, THEN you create a script that runs and actually gathers the data inserting it with Zabbix Sender.