Ixml-rpc is a project mainly written in PHP, it's free.
XML-RPC interface for Icinga
Andreas Bergman 2010-11-04 [email protected] The Script is provided AS-IS without any warranty.
The framework used is CodeIgniter 1.7.2 ========== Folders ===========
The system presumes that it is installed i /var/www and that the foldes below is writeable by the webbserver.
/var/www/domains /var/www/templates
======== Settings ========== The settings is configured in config/icinga.php the file should be self explainatory
======= Files ===== system/application/controllers/xmlrpc_client.php is a sample/debug client for the xmlrpc_server.php system/application/controllers/xmlrpc_server.php is the actual xmlrpc_server system/application/models/icinga_model.php The modelfile for handling filewriting
======== Mandatory values ======== The first associative array should always be 'apikey', with the value specified in the config. ========== Available methods========
The method forwards the associative array sent form the client and writes a hostdefinition from it. See code in xmlrpc_client.php for example.
The method creates an host from a template based on values passed on by the client
===== Error Codes ====
001 Auth Failed - The specified apikey is wrong or malformed
002 Host Exist - It the created host already exist, to update existing host, use the ChangeHost(Not yet implemented) methods.
003 Write failed - If the writing of a file failed, this error is shown, most likely it failed due to wrong permissions.
004 No template specified - If using the template methods and the second array don't contain the 'template' value.
005 Values out of bounds - If using the template methods and the values from the client don't exist as placeholders, this is sent
006 No hostname specified - Same as 005 but the hostname is missing
007 No hostadress specified - Same as 005 but hostadress is missing