<?xml version='1.0' encoding='utf-8'?>

<creole>

    <files>
        <!--démarré par le service networking-->
        <!--<service'>rsyslog</service>-->
        <file name='/etc/logrotate.d/rsyslog' source='rsyslog.logrotate'/>
        <file filelist='certfiles' name='/etc/rsyslog.d/ssl/rsyslog-request.tmpl' mkdir="True"/>
        <file filelist='certfiles' name='/etc/rsyslog.d/ssl/rsyslog-ca.tmpl' mkdir="True"/>
        <file name='/etc/rsyslog.conf'/>
        <file name='/etc/rsyslog.d/aggregation/all.conf' source='rsyslog_aggregation.conf' mkdir="True"/>
        <file name='/etc/rsyslog.d/templates/eole_templates.conf' source='rsyslog_templates.conf' mkdir="True"/>
        <file name='/etc/rsyslog.d/eole-views/errors.conf' source='rsyslog_views_errors.conf' mkdir="True"/>
        <file name='/etc/rsyslog.d/eole-views/auth.conf' source='rsyslog_views_auth.conf' mkdir="True"/>
        <file name='/etc/rsyslog.d/eole-traps/rsyslog.conf' source='rsyslog_traps_rsyslog.conf' mkdir="True"/>
        <file name='/etc/rsyslog.d/eole-traps/cron.conf' source='rsyslog_traps_cron.conf' mkdir="True"/>
        <file name='/etc/rsyslog.d/eole-traps/iptables.conf' source='rsyslog_traps_iptables.conf' mkdir="True"/>
        <file name='/etc/rsyslog.d/eole-traps/gpm.conf' source='rsyslog_traps_gpm.conf' mkdir="True"/>
        <file name='/etc/rsyslog.d/eole-traps/zephir.conf' source='rsyslog_traps_zephir.conf' mkdir="True"/>
        <file name='/etc/rsyslog.d/eole-traps/eole.conf' source='rsyslog_traps_eole.conf' mkdir="True"/>
        <file name='/etc/rsyslog.d/default_dispatching.conf' source='rsyslog_default_dispatching.conf'/>
        <file name='/etc/rsyslog.d/eole-traps/xmlrpc.conf' source='rsyslog_traps_xmlrpc.conf' mkdir="True"/>
        <service_access service='rsyslog_udp'>
            <port protocol='udp'>514</port>
        </service_access>
        <service_restriction service='rsyslog_udp'>
            <ip interface='eth0' netmask='netmask_client_logs_udp' netmask_type='SymLinkOption' ip_type='SymLinkOption'>adresses_ip_clients_logs_udp</ip>
        </service_restriction>
        <service_access service='rsyslog_tcp'>
            <port>10514</port>
        </service_access>
        <service_restriction service='rsyslog_tcp'>
            <ip interface='eth0' netmask='netmask_client_logs_tcp' netmask_type='SymLinkOption' ip_type='SymLinkOption'>adresses_ip_clients_logs_tcp</ip>
        </service_restriction>
        <service_access service='rsyslog_relp'>
            <port>20514</port>
        </service_access>
        <service_restriction service='rsyslog_relp'>
            <ip interface='eth0' netmask='netmask_client_logs_relp' netmask_type='SymLinkOption' ip_type='SymLinkOption'>adresses_ip_clients_logs_relp</ip>
        </service_restriction>
    </files>

    <variables>
        <family name='services'>
            <variable name='activer_log_distant' type='oui/non' description="Activer la gestion des logs centralisés" mode="expert">
                <value>non</value>
            </variable>
        </family>
        <family name='logs' icon='edit'>
            <variable name='activer_reception_logs' type='oui/non' description='Activer la réception des logs de machines distantes'>
                <value>non</value>
            </variable>
            <variable name='activer_reception_logs_relp' type='oui/non' description='Activer la réception des logs de machines distantes via le protocole RELP (fiable, non compatible TLS)'>
                <value>non</value>
            </variable>
            <variable name='adresses_ip_clients_logs_relp' type='ip' description='IP des clients à autoriser pour le protocole RELP' multi='True' mandatory='True'/>
            <variable name='netmask_client_logs_relp' type='netmask' description="Masque du sous réseau" mandatory='True'/>
            <variable name='activer_reception_logs_udp' type='oui/non' description='Activer la réception des logs de machines distantes via le protocole UDP'>
                <value>non</value>
            </variable>
            <variable name='adresses_ip_clients_logs_udp' type='ip' description="Adresse IP équipement autorisé" multi='True' mandatory='True'/>
            <variable name='netmask_client_logs_udp' type='netmask' description="Masque du sous réseau" mandatory='True'/>
            <variable name='activer_reception_logs_tcp' type='oui/non' description='Activer la réception des logs de machines distantes via le protocole TCP (compatible TLS)'>
                <value>non</value>
            </variable>
            <variable name='rsyslog_reception_tls' type='oui/non' description="Activer le chiffrement des transferts pour la réception (TLS)"  hidden='True'>
                <value>non</value>
            </variable>
            <variable name='adresses_ip_clients_logs_tcp' type='ip' description='IP des clients à autoriser pour le protocole TCP' multi='True' mandatory='True'/>
            <variable name='netmask_client_logs_tcp' type='netmask' description="Masque du sous réseau" mandatory='True'/>

            <variable name='rsyslog_ca_file' type='filename' description="Emplacement de la CA" hidden='True'>
                <value>/etc/rsyslog.d/ssl/certs/zephirlog_ca.pem</value>
            </variable>
            <variable name='rsyslog_privkey_file' type='filename' description="Emplacement de la clé" hidden='True'>
                <value>/etc/rsyslog.d/ssl/private/rsyslog_privkey.pem</value>
            </variable>
            <variable name='rsyslog_cert_file' type='filename' description="Emplacement du certificat" hidden='True'>
                <value>/etc/rsyslog.d/ssl/certs/rsyslog_cert.pem</value>
            </variable>
            <variable name='activer_envoi_logs' type='oui/non' description="Activer l'envoi des logs à une machine distante (TCP si TLS activé, RELP sinon)">
                <value>non</value>
            </variable>
            <variable name='adresse_ip_serveur_logs' type='ip' description='Adresse IP du serveur de log central' mandatory='True'/>
            <variable name='rsyslog_envoi_tls' type='oui/non' description="Activer le chiffrement des transferts pour l'envoi (TLS)" >
                <value>non</value>
            </variable>
            <variable name='envoyer_tous_logs' type='oui/non' description='Envoyer tous les journaux'>
                <value>oui</value>
            </variable>
            <variable name='utiliser_rsyslog_plage_envoi_globale' type='oui/non' description="Utiliser une plage temporelle pour le transfert des logs">
                <value>non</value>
            </variable>
            <variable name='rsyslog_plage_globale_heure_debut' type='string' description="Heure de début du transfert des logs"/>
            <variable name='rsyslog_plage_globale_heure_fin' type='string' description="Heure de fin du transfert des logs"/>
        </family>
        <separators>
            <separator name='activer_reception_logs'>Réception</separator>
            <separator name='activer_envoi_logs'>Envoi</separator>
            <separator name='envoyer_tous_logs'>Choix des journaux à envoyer</separator>
        </separators>
    </variables>

    <constraints>
        <check name='valid_enum' target='rsyslog_plage_globale_heure_debut'>
            <param>["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24"]</param>
        </check>
        <check name='valid_enum' target='rsyslog_plage_globale_heure_fin'>
            <param>["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24"]</param>
        </check>

        <condition name='disabled_if_in' source='activer_log_distant'>
            <param>non</param>
            <target type='family'>logs</target>
        </condition>
        <condition name='disabled_if_in' source='activer_reception_logs'>
            <param>non</param>
            <target type='variable'>activer_reception_logs_relp</target>
            <target type='variable'>activer_reception_logs_tcp</target>
            <target type='variable'>activer_reception_logs_udp</target>
        </condition>
        <condition name='disabled_if_in' source='activer_reception_logs_udp'>
            <param>non</param>
            <target type='variable'>adresses_ip_clients_logs_udp</target>
            <target type='variable'>netmask_client_logs_udp</target>
        </condition>
        <condition name='disabled_if_in' source='activer_reception_logs_tcp'>
            <param>non</param>
            <target type='variable'>adresses_ip_clients_logs_tcp</target>
            <target type='variable'>netmask_client_logs_tcp</target>
            <target type='variable'>rsyslog_reception_tls</target>
        </condition>
        <condition name='disabled_if_in' source='activer_reception_logs_relp'>
            <param>non</param>
            <target type='variable'>adresses_ip_clients_logs_relp</target>
            <target type='variable'>netmask_client_logs_relp</target>
        </condition>
        <condition name='disabled_if_in' source='activer_envoi_logs'>
            <param>non</param>
            <target type='variable'>adresse_ip_serveur_logs</target>
            <target type='variable'>rsyslog_envoi_tls</target>
            <target type='variable'>envoyer_tous_logs</target>
        </condition>
        <condition name='disabled_if_in' source='envoyer_tous_logs'>
            <param>non</param>
            <target type='variable'>utiliser_rsyslog_plage_envoi_globale</target>
        </condition>
        <condition name='disabled_if_in' source='utiliser_rsyslog_plage_envoi_globale'>
            <param>non</param>
            <target type='variable'>rsyslog_plage_globale_heure_debut</target>
            <target type='variable'>rsyslog_plage_globale_heure_fin</target>
        </condition>
        <group master='adresses_ip_clients_logs_udp'>
            <slave>netmask_client_logs_udp</slave>
        </group>
        <group master='adresses_ip_clients_logs_tcp'>
            <slave>netmask_client_logs_tcp</slave>
        </group>
        <group master='adresses_ip_clients_logs_relp'>
            <slave>netmask_client_logs_relp</slave>
        </group>
    </constraints>

    <help>
    </help>

</creole>
<!-- vim: ts=4 sw=4 expandtab
-->
