Zabbix_User_1138, the loadable module doesn't use the Zabbix agent interface IP address and port :
It's because I need to monitor the VMs using vmvix and a Zabbix agent at the same time.
The module should be refactored to allow the monitoring of multiple centers using multiple vmbix instances. Meanwhile, you can compile two versions of the module, after changing the default port and the item keys in the code. Then, you can reference them in the zabbix_server.conf file like this :
If you set item key names like this in the code :
You can use this items in your Zabbix configuration.
By default, the module will query VmBix on localhost and port 12050. You can create a configuration file /etc/zabbix/vmbix_module.conf if you want to change this. A sample configuration file is provided.
The module should be refactored to allow the monitoring of multiple centers using multiple vmbix instances. Meanwhile, you can compile two versions of the module, after changing the default port and the item keys in the code. Then, you can reference them in the zabbix_server.conf file like this :
LoadModulePath=/usr/lib/zabbix/modules
LoadModule=vmbix_vcenter1.so
LoadModule=vmbix_vcenter2.so
LoadModule=vmbix_vcenter1.so
LoadModule=vmbix_vcenter2.so
Code:
static ZBX_METRIC keys[] =
/* KEY FLAG FUNCTION TEST PARAMETERS */
{
{"vmbix.vcenter1", CF_HAVEPARAMS, zbx_module_vmbix, NULL},
{"vmbix.vcenter1.ping", CF_HAVEPARAMS, zbx_module_vmbix_ping, NULL},
{NULL}
};
Comment