# Ejemplos

## Ejemplo 1: Información general de autenticación

### Alcance y supuestos

El alcance de la consulta que se proporciona a continuación es el siguiente:

* al administrador le interesa entender qué usuarios/dispositivos se están autenticando (aceptados o rechazados) y construir estadísticas de frecuencia basadas en ello
* no se utiliza etiquetado VLAN
* solo se utiliza autenticación basada en certificados (no autenticación basada en nombre de usuario y contraseña)

### Destino

[Log Analytics](/es/portal-de-administracion/settings/log-exporter/log-analytics.md) o [Webhook general](/es/portal-de-administracion/settings/log-exporter/generic-webhook.md)

### Configuración del filtro de mensajes

#### Rule Engine

| Nivel de registro | Habilitado                             |
| ----------------- | -------------------------------------- |
| Éxito             | <mark style="color:rojo;">Falso</mark> |
| Fallido           | <mark style="color:rojo;">Falso</mark> |
| Error             | <mark style="color:rojo;">Falso</mark> |

#### Sistema de autorización

| Nivel de registro | Habilitado                                  |
| ----------------- | ------------------------------------------- |
| Solicitudes       | <mark style="color:rojo;">Falso</mark>      |
| Éxito             | <mark style="color:verde;">Verdadero</mark> |
| Fallido           | <mark style="color:verde;">Verdadero</mark> |
| Error             | <mark style="color:rojo;">Falso</mark>      |

#### Autenticación proxy

| Nivel de registro | Habilitado                             |
| ----------------- | -------------------------------------- |
| Conexiones        | <mark style="color:rojo;">Falso</mark> |
| Éxito             | <mark style="color:rojo;">Falso</mark> |
| Fallido           | <mark style="color:rojo;">Falso</mark> |
| Error             | <mark style="color:rojo;">Falso</mark> |

### Configuración de datos

{% 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 %}

## Ejemplo 2: Información detallada de autenticación&#x20;

### Alcance y supuestos

El alcance de la consulta que se proporciona a continuación es el siguiente:

* al administrador le interesa entender qué usuarios/dispositivos se autentican mediante certificado o nombre de usuario y contraseña (aceptados o rechazados)
* detalles de nombre de usuario y certificado con respuesta OCSP
* SSID y punto de acceso utilizado (dirección MAC)
* RADIUSaaS [Regla](/es/portal-de-administracion/settings/rules.md) que se activó, si aplica: VLAN asignada
* ID de correlación para una investigación adicional

### Destino

[Log Analytics](/es/portal-de-administracion/settings/log-exporter/log-analytics.md) o [Webhook general](/es/portal-de-administracion/settings/log-exporter/generic-webhook.md)

### Configuración del filtro de mensajes

#### Rule Engine

| Nivel de registro | Habilitado                                  |
| ----------------- | ------------------------------------------- |
| Éxito             | <mark style="color:verde;">Verdadero</mark> |
| Fallido           | <mark style="color:verde;">Verdadero</mark> |
| Error             | <mark style="color:rojo;">Falso</mark>      |

#### Sistema de autorización

| Nivel de registro | Habilitado                             |
| ----------------- | -------------------------------------- |
| Solicitudes       | <mark style="color:rojo;">Falso</mark> |
| Éxito             | <mark style="color:rojo;">Falso</mark> |
| Fallido           | <mark style="color:rojo;">Falso</mark> |
| Error             | <mark style="color:rojo;">Falso</mark> |

#### Autenticación proxy

| Nivel de registro | Habilitado                             |
| ----------------- | -------------------------------------- |
| Conexiones        | <mark style="color:rojo;">Falso</mark> |
| Éxito             | <mark style="color:rojo;">Falso</mark> |
| Fallido           | <mark style="color:rojo;">Falso</mark> |
| Error             | <mark style="color:rojo;">Falso</mark> |

### Configuración de datos

{% 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", "No VLAN assigned") }},
    "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 %}

## Ejemplo 3: Notificaciones generales de error

### Alcance y supuestos

El alcance de la consulta que se proporciona a continuación es el siguiente:

* al administrador le interesa recibir notificaciones proactivas sobre errores en la plataforma RADIUSaaS para el equipo de operaciones.

### Destino

[Teams](/es/portal-de-administracion/settings/log-exporter/teams.md), o [Log Analytics](/es/portal-de-administracion/settings/log-exporter/log-analytics.md) o [Webhook general](/es/portal-de-administracion/settings/log-exporter/generic-webhook.md)

### Configuración del filtro de mensajes

#### Rule Engine

| Nivel de registro | Habilitado                             |
| ----------------- | -------------------------------------- |
| Éxito             | <mark style="color:rojo;">Falso</mark> |
| Fallido           | <mark style="color:rojo;">Falso</mark> |
| Error             | <mark style="color:rojo;">Falso</mark> |

#### Sistema de autorización

| Nivel de registro | Habilitado                                  |
| ----------------- | ------------------------------------------- |
| Solicitudes       | <mark style="color:rojo;">Falso</mark>      |
| Éxito             | <mark style="color:rojo;">Falso</mark>      |
| Fallido           | <mark style="color:rojo;">Falso</mark>      |
| Error             | <mark style="color:verde;">Verdadero</mark> |

#### Autenticación proxy

| Nivel de registro | Habilitado                                  |
| ----------------- | ------------------------------------------- |
| Conexiones        | <mark style="color:rojo;">Falso</mark>      |
| Éxito             | <mark style="color:rojo;">Falso</mark>      |
| Fallido           | <mark style="color:rojo;">Falso</mark>      |
| Error             | <mark style="color:verde;">Verdadero</mark> |

### Configuración de datos

#### Teams

{% code lineNumbers="true" %}

```
¡El sistema RADIUS tiene problemas!
Mensaje: {{ data.get('message') }}

Datos sin procesar:
{{ data }}
```

{% endcode %}

#### Log Analytics o Webhook general

{% code lineNumbers="true" %}

```
{
    "Message": {{ data.get("message") }},
    "Datetime" : {{ data.get("Datetime") }},
    "Level": {{ data.get("level") }},
    "Type": {{ data.get("type", "not 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/es/portal-de-administracion/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.
