Last active
August 29, 2015 14:24
-
-
Save higebu/718167e1813489d9fe3c to your computer and use it in GitHub Desktop.
Add {#DATACENTER.NAME} to zabbix proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -uprN a/src/zabbix_server/poller/checks_simple_vmware.c b/src/zabbix_server/poller/checks_simple_vmware.c | |
--- a/src/zabbix_server/poller/checks_simple_vmware.c 2015-04-22 16:56:00.000000000 +0900 | |
+++ b/src/zabbix_server/poller/checks_simple_vmware.c 2015-07-10 16:38:46.590815221 +0900 | |
@@ -570,6 +570,7 @@ int check_vcenter_cluster_discovery(AGEN | |
zbx_json_addobject(&json_data, NULL); | |
zbx_json_addstring(&json_data, "{#CLUSTER.ID}", cluster->id, ZBX_JSON_TYPE_STRING); | |
zbx_json_addstring(&json_data, "{#CLUSTER.NAME}", cluster->name, ZBX_JSON_TYPE_STRING); | |
+ zbx_json_addstring(&json_data, "{#DATACENTER.NAME}", "{{ datacenter }}", ZBX_JSON_TYPE_STRING); | |
zbx_json_close(&json_data); | |
} | |
@@ -984,6 +985,7 @@ int check_vcenter_hv_discovery(AGENT_REQ | |
zbx_json_addstring(&json_data, "{#HV.NAME}", name, ZBX_JSON_TYPE_STRING); | |
zbx_json_addstring(&json_data, "{#CLUSTER.NAME}", | |
NULL != cluster ? cluster->name : "", ZBX_JSON_TYPE_STRING); | |
+ zbx_json_addstring(&json_data, "{#DATACENTER.NAME}", "{{ datacenter }}", ZBX_JSON_TYPE_STRING); | |
zbx_json_close(&json_data); | |
zbx_free(name); | |
@@ -1780,6 +1782,7 @@ int check_vcenter_vm_discovery(AGENT_REQ | |
zbx_json_addstring(&json_data, "{#HV.NAME}", hv_name, ZBX_JSON_TYPE_STRING); | |
zbx_json_addstring(&json_data, "{#CLUSTER.NAME}", | |
NULL != cluster ? cluster->name : "", ZBX_JSON_TYPE_STRING); | |
+ zbx_json_addstring(&json_data, "{#DATACENTER.NAME}", "{{ datacenter }}", ZBX_JSON_TYPE_STRING); | |
zbx_json_close(&json_data); | |
zbx_free(hv_name); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
{{ datacenter }}のところを実際のデータセンター名に置き換えてパッチ当ててビルドする