Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-2666

function zbx_module_init() should be made optional

XMLWordPrintable

      Request ZBXNEXT-1550 introduced support for loadable modules. According to https://www.zabbix.com/documentation/2.4/manual/config/items/loadablemodules , there are two mandatory functions in the loadable module interface:

      • zbx_module_api_version()
      • zbx_module_init()

      There are also three optional functions:

      • zbx_module_item_list()
      • zbx_module_item_timeout()
      • zbx_module_uninit()

      Since function zbx_module_api_version() is mandatory, we can detect that the shared library is a loadable Zabbix module using that function alone. Simple modules like those mentioned in the blog post at http://blog.zabbix.com/using-cd-rom-drive-to-shut-down-the-server/ do not need any initialization. Therefore, it is suggested to make function zbx_module_init() optional, same as zbx_module_uninit(), which would simplify the creation of simple modules.

            Unassigned Unassigned
            asaveljevs Aleksandrs Saveljevs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: