# Exemples

## Exemple 1 : informations générales d’authentification

### Portée et hypothèses

La portée de la requête fournie ci-dessous est la suivante :

* l’administrateur souhaite comprendre quels utilisateurs/appareils s’authentifient (acceptés ou rejetés) et établir des statistiques de fréquence à partir de cela
* aucun marquage VLAN n’est utilisé
* seule l’authentification basée sur certificat est utilisée (pas d’authentification basée sur nom d’utilisateur et mot de passe)

### Cible

[Log Analytics](/fr/portail-dadministration/settings/log-exporter/log-analytics.md) ou [General Webhook](/fr/portail-dadministration/settings/log-exporter/generic-webhook.md)

### Configuration du filtre des messages

#### Moteur de règles

| Niveau de journalisation | Activé                                 |
| ------------------------ | -------------------------------------- |
| Succès                   | <mark style="color:rouge;">Faux</mark> |
| Échec                    | <mark style="color:rouge;">Faux</mark> |
| Erreur                   | <mark style="color:rouge;">Faux</mark> |

#### Système d’autorisation

| Niveau de journalisation | Activé                                 |
| ------------------------ | -------------------------------------- |
| Requêtes                 | <mark style="color:rouge;">Faux</mark> |
| Succès                   | <mark style="color:vert;">Vrai</mark>  |
| Échec                    | <mark style="color:vert;">Vrai</mark>  |
| Erreur                   | <mark style="color:rouge;">Faux</mark> |

#### Authentification par proxy

| Niveau de journalisation | Activé                                 |
| ------------------------ | -------------------------------------- |
| Connexions               | <mark style="color:rouge;">Faux</mark> |
| Succès                   | <mark style="color:rouge;">Faux</mark> |
| Échec                    | <mark style="color:rouge;">Faux</mark> |
| Erreur                   | <mark style="color:rouge;">Faux</mark> |

### Configuration des données

{% code lineNumbers="true" %}

```json
{
    "Decision": {{ data.get("Packet-Type") }},
    "Level": {{ data.level }},
    "IP": {{ data.get("Packet-Dst-Address") }},
    "Username": {{ data.get("User-Name") }},
    {% if data.get("TLS-OCSP-Cert-Valid") != None %}
        "OCSPStatus": {{ data.get("TLS-OCSP-Cert-Valid") }},
    {% endif %}
    {% if data.level == "warning" %}
      "FailReason": {{ data.get("Module-Failure-Message") }},
    {% endif %}
    "Datetime" : {{ data.Datetime }}
}
```

{% endcode %}

## Exemple 2 : informations détaillées d’authentification&#x20;

### Portée et hypothèses

La portée de la requête fournie ci-dessous est la suivante :

* l’administrateur souhaite comprendre quels utilisateurs/appareils s’authentifient via certificat ou nom d’utilisateur et mot de passe (acceptés ou rejetés)
* détails du nom d’utilisateur et du certificat avec réponse OCSP
* SSID et point d’accès utilisé (adresse MAC)
* RADIUSaaS [Règle](/fr/portail-dadministration/settings/rules.md) qui a été déclenchée, le cas échéant : VLAN attribué
* ID de corrélation pour une enquête plus approfondie

### Cible

[Log Analytics](/fr/portail-dadministration/settings/log-exporter/log-analytics.md) ou [General Webhook](/fr/portail-dadministration/settings/log-exporter/generic-webhook.md)

### Configuration du filtre des messages

#### Moteur de règles

| Niveau de journalisation | Activé                                 |
| ------------------------ | -------------------------------------- |
| Succès                   | <mark style="color:vert;">Vrai</mark>  |
| Échec                    | <mark style="color:vert;">Vrai</mark>  |
| Erreur                   | <mark style="color:rouge;">Faux</mark> |

#### Système d’autorisation

| Niveau de journalisation | Activé                                 |
| ------------------------ | -------------------------------------- |
| Requêtes                 | <mark style="color:rouge;">Faux</mark> |
| Succès                   | <mark style="color:rouge;">Faux</mark> |
| Échec                    | <mark style="color:rouge;">Faux</mark> |
| Erreur                   | <mark style="color:rouge;">Faux</mark> |

#### Authentification par proxy

| Niveau de journalisation | Activé                                 |
| ------------------------ | -------------------------------------- |
| Connexions               | <mark style="color:rouge;">Faux</mark> |
| Succès                   | <mark style="color:rouge;">Faux</mark> |
| Échec                    | <mark style="color:rouge;">Faux</mark> |
| Erreur                   | <mark style="color:rouge;">Faux</mark> |

### Configuration des données

{% code lineNumbers="true" %}

```json
{
    "Decision": {{ data.get("Engine-Decision") }},
    "Datetime" : {{ data.Datetime }},
    "Level": {{ data.level }},
    "Authtype": {{ data.get("Authtype") }},
    "Client-MAC": {{ data.get("Client-MAC") }},
    "Username": {{ data.get("User-Name") }},
    "Applied-Rule": {{ data.get("Applied-Rule") }},
    "VLAN": {{ data.get("Assigned-VLAN", "Aucun VLAN attribué") }},
    "Auth-Source-Type": {{ data.get("Auth-Source-Type") }},
    {% if data.get("Auth-Source-Type") == "WiFi" %}
        "SSID": {{ data.get("SSID") }},
        "AP-MAC": {{ data.get("AP-MAC") }},
    {% endif %}
    {% if data.get("Authtype") == "Certificate" %}
        "Certificate-CommonName": {{ data.get("Certificate-Details", {}).get("TLS-Cert-Common-Name") }},
        "Certificate-Serial": {{ data.get("Certificate-Details", {}).get("TLS-Client-Cert-Serial") }},
    {% endif %}
    {% if data.get("Verify-Result") != None %}
        "Verify-Result": {{ data.get("Verify-Result") }},
        "Verify-Status": {{ data.get("Verify-Status") }},
        "Verify-Type": {{ data.get("Verify-Type") }},
        "Verify-Description": {{ data.get("Verify-Description") }},
    {% endif %}
    {% if data.get("Reject-Description") != None %}
        "Reject-Description": {{ data.get("Reject-Description") }},
    {% endif %}
    "GKG-Correlation-Id": {{ data.get("GKG-Correlation-Id") }}
}
```

{% endcode %}

## Exemple 3 : notifications générales d’erreur

### Portée et hypothèses

La portée de la requête fournie ci-dessous est la suivante :

* l’administrateur souhaite recevoir des notifications proactives concernant les erreurs sur la plateforme RADIUSaaS pour l’équipe des opérations.

### Cible

[Teams](/fr/portail-dadministration/settings/log-exporter/teams.md) ou [Log Analytics](/fr/portail-dadministration/settings/log-exporter/log-analytics.md) ou [General Webhook](/fr/portail-dadministration/settings/log-exporter/generic-webhook.md)

### Configuration du filtre des messages

#### Moteur de règles

| Niveau de journalisation | Activé                                 |
| ------------------------ | -------------------------------------- |
| Succès                   | <mark style="color:rouge;">Faux</mark> |
| Échec                    | <mark style="color:rouge;">Faux</mark> |
| Erreur                   | <mark style="color:rouge;">Faux</mark> |

#### Système d’autorisation

| Niveau de journalisation | Activé                                 |
| ------------------------ | -------------------------------------- |
| Requêtes                 | <mark style="color:rouge;">Faux</mark> |
| Succès                   | <mark style="color:rouge;">Faux</mark> |
| Échec                    | <mark style="color:rouge;">Faux</mark> |
| Erreur                   | <mark style="color:vert;">Vrai</mark>  |

#### Authentification par proxy

| Niveau de journalisation | Activé                                 |
| ------------------------ | -------------------------------------- |
| Connexions               | <mark style="color:rouge;">Faux</mark> |
| Succès                   | <mark style="color:rouge;">Faux</mark> |
| Échec                    | <mark style="color:rouge;">Faux</mark> |
| Erreur                   | <mark style="color:vert;">Vrai</mark>  |

### Configuration des données

#### Teams

{% code lineNumbers="true" %}

```
Le système RADIUS rencontre des problèmes !
Message : {{ data.get('message') }}

Données brutes :
{{ data }}
```

{% endcode %}

#### Log Analytics ou General Webhook

{% code lineNumbers="true" %}

```
{
    "Message": {{ data.get("message") }},
    "Datetime" : {{ data.get("Datetime") }},
    "Level": {{ data.get("level") }},
    "Type": {{ data.get("type", "non applicable") }}
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.radiusaas.com/fr/portail-dadministration/settings/log-exporter/examples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
