Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-8996

Undefined indexes in web scenario API create method

XMLWordPrintable

      1. Let's say we call httptest.create with only required parameters like so:

      API::HttpTest()->create(array(
      	'name' => 'test httptest.create',
      	'hostid' => '10244',
      	'steps' => array(
      		array(
      			'name' => 'homepage',
      			'url' => 'http://homepage.com',
      			'no' => 1
      		)
      	)
      ));
      

      We'll get undefined indexes from where we made the API call:

      Undefined index: ssl_key_password [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTest->validateCreate() ? CHttpTest->checkSslParameters() in C:\Development\zabbix\frontends\php\include\classes\api\services\CHttpTest.php:901]
      Undefined index: ssl_key_file [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTest->validateCreate() ? CHttpTest->checkSslParameters() in C:\Development\zabbix\frontends\php\include\classes\api\services\CHttpTest.php:908]
      Undefined index: delay [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:700]
      Undefined index: status [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:704]
      Undefined index: delay [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:700]
      Undefined index: status [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:704]
      Undefined index: delay [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:700]
      Undefined index: status [httpconf.php:133 ? CFrontendApiWrapper->create() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CHttpTest->create() ? CHttpTestManager->persist() ? CHttpTestManager->save() ? CHttpTestManager->create() ? CHttpTestManager->createHttpTestItems() in C:\Development\zabbix\frontends\php\include\classes\api\managers\CHttpTestManager.php:704
      

      2. httpstep creation doesn't mind if property 'no' is actually required or not. But it should check if 'no' property is given.

            Unassigned Unassigned
            iivs Ivo Kurzemnieks
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: