<?xml version="1.0" encoding="UTF-8"?>
<!--
    databases.xml
    Defines which databases to use to store internal icinga-data and where to request icinga monitoring status from
    
    Have a look on app/config/databases.xml for configuration examples.
    
    http://docs.icinga.org/latest/de/icinga-web-config.html#configweb-databases
    https://wiki.icinga.org/display/howtos/databases.xml
-->

	
<databases xmlns:db="http://agavi.org/agavi/config/parts/databases/1.0" xmlns:ae="http://agavi.org/agavi/config/global/envelope/1.0">


    <!-- 
    Overwrite the icinga-web database (where users, roles, views, etc are stored 
    -->
    <!--
    <db:database name="icinga_web" class="AppKitDoctrineDatabase">
         <ae:parameter name="dsn">@db_type@://@db_user@:@db_pass@@@db_host@:@db_port@/@db_name@</ae:parameter>

        <ae:parameter name="charset">utf8</ae:parameter>
        <ae:parameter name="manager_attributes">
            <ae:parameter name="Doctrine_Core::ATTR_MODEL_LOADING">CONSERVATIVE</ae:parameter>
        </ae:parameter>
        
        <ae:parameter name="load_models">%core.module_dir%/AppKit/lib/database/models/generated</ae:parameter>
        <ae:parameter name="models_directory">%core.module_dir%/AppKit/lib/database/models</ae:parameter>				
        <ae:parameter name="date_format"><![CDATA[YYYY-MM-DD HH24:MI:SS]]></ae:parameter>
    

        <ae:parameter name="caching">
            <ae:parameter name="enabled">false</ae:parameter>
            <ae:parameter name="driver">apc</ae:parameter>
            <ae:parameter name="use_query_cache">true</ae:parameter>
            <ae:parameter name="use_result_cache">true</ae:parameter>
            <ae:parameter name="result_cache_lifespan">60</ae:parameter>
        </ae:parameter>		
        
    </db:database>
    -->

    <!-- 
        Overwrite the default database conneciton for icinga data retrieval
        Make sure to use IcingaDoctrineDatabase, otherwise the use_retained parameter will be ignored
        EXAMPLE (oracle needs icingaOracle as the db driver) 
    -->
    <!--
    <db:database xmlns="http://agavi.org/agavi/config/parts/databases/1.0" name="icinga" class="IcingaDoctrineDatabase">
        <ae:parameter name="dsn">@api_subtype@://@api_db_user@:@api_db_pass@@@api_host@:@api_port@/@api_db_name@</ae:parameter>
        <ae:parameter name="prefix">@api_db_prefix@</ae:parameter>
        <ae:parameter name="charset">utf8</ae:parameter>
        <ae:parameter name="use_retained">true</ae:parameter>
        <ae:parameter name="date_format"><![CDATA[YYYY-MM-DD HH24:MI:SS]]></ae:parameter>
        <ae:parameter name="manager_attributes">
            <ae:parameter name="Doctrine_Core::ATTR_MODEL_LOADING">CONSERVATIVE</ae:parameter>
        </ae:parameter>
        <ae:parameter name="load_models">%core.module_dir%/Api/lib/database/models/generated</ae:parameter>
        <ae:parameter name="models_directory">%core.module_dir%/Api/lib/database/models</ae:parameter>				
        <ae:parameter name="caching">  
            <ae:parameter name="enabled">false</ae:parameter>
            <ae:parameter name="driver">apc</ae:parameter>
            <ae:parameter name="use_query_cache">true</ae:parameter>
        </ae:parameter>

    </db:database>

    -->
    
</databases>
