> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/es/plataforma/monitoring.md).

# Supervisión

PowerShell Universal se integra automáticamente con Microsoft Application Insights para proporcionar supervisión y alertas para su sistema. También proporciona contadores de rendimiento para varias funciones del entorno.

## Application Insights

### Configurar Application Insights

En el Portal de Azure, deberá crear un nuevo recurso de Application Insights. Una vez creado, deberá copiar la cadena de conexión.

![Información de Application Insights](/files/9FRfZ9kQRAldV8sJXLrP)

A continuación, pegue su cadena de conexión en el [fichero de configuración ](/powershell-universal/es/config/settings.md)de PowerShell Universal. Por último, reinicie el servidor de PowerShell Universal. La supervisión de la aplicación estará ahora habilitada.

```json
  "ApplicationInsights": {
    "ConnectionString": "InstrumentationKey=73b84b67-6fc9-4c37-9f54-000000000000"
  },
```

Si ejecuta PowerShell Universal en Azure, también puede crear una nueva configuración de aplicación. En su aplicación web, haga clic en Configuration y luego en New application setting.

El nombre debe ser:

```
APPLICATIONINSIGHTS__CONNECTIONSTRING
```

El valor debe ser la cadena de conexión. Reinicie su aplicación web para empezar a recopilar métricas.

### Ver los datos de supervisión

En el Portal de Azure, puede consultar el recurso de Application Insights para ver información sobre su servidor de PowerShell Universal. Esto incluirá datos como respuestas fallidas, tiempo de respuesta del servidor, solicitudes al servidor y disponibilidad. También podrá configurar alertas para supervisar condiciones concretas del servidor de PowerShell Universal.

## Contadores de rendimiento

{% hint style="info" %}
Los contadores de rendimiento solo se admiten en Windows.
{% endhint %}

Los contadores de rendimiento se instalan al ejecutar el instalador MSI. Una vez hecho esto, los datos de rendimiento se generarán automáticamente mediante los siguientes contadores.

* PowerShell Universal \ Active API Endpoints \ \_Total
* PowerShell Universal \ Active API Endpoints \ Endpoint
* PowerShell Universal \ API Endpoint Calls per Second \ \_Total
* PowerShell Universal \ API Endpoint Calls per Second \ Endpoint
* PowerShell Universal \ API Execution Time \ \_Total
* PowerShell Universal \ API Execution Time \ Endpoint
* PowerShell Universal \ Active Dashboard Connections \ \_Total
* PowerShell Universal \ Active Dashboard Connections \ Dashboard

### Instalación

De forma predeterminada, el MSI instalará los contadores de rendimiento. Si ejecuta PowerShell Universal fuera del MSI, deberá instalarlos usted mismo. Puede hacerlo con el siguiente script. Deberá ejecutarlo desde un símbolo del sistema con privilegios elevados.

```powershell
$categoryName = "PowerShell Universal"
$categoryType = [System.Diagnostics.PerformanceCounterCategoryType]::MultiInstance
$categoryExists = [System.Diagnostics.PerformanceCounterCategory]::Exists($categoryName)

If (-Not $categoryExists)
{
$objCCDC = New-Object System.Diagnostics.CounterCreationDataCollection
$objCCD1 = New-Object System.Diagnostics.CounterCreationData
$objCCD1.CounterName = "Active Endpoints"
$objCCD1.CounterType = "NumberOfItems32"
$objCCD1.CounterHelp = "Active number of executing endpoints."
$objCCDC.Add($objCCD1) | Out-Null

$objCCD1 = New-Object System.Diagnostics.CounterCreationData
$objCCD1.CounterName = "Execution Time"
$objCCD1.CounterType = "averageTimer32"
$objCCD1.CounterHelp = "Average execution time."
$objCCDC.Add($objCCD1) | Out-Null

$objCCD1 = New-Object System.Diagnostics.CounterCreationData
$objCCD1.CounterName = "Execution Time Base"
$objCCD1.CounterType = "averageBase"
$objCCD1.CounterHelp = "Average execution time base."
$objCCDC.Add($objCCD1) | Out-Null

$objCCD1 = New-Object System.Diagnostics.CounterCreationData
$objCCD1.CounterName = "Calls per second"
$objCCD1.CounterType = "rateOfCountsPerSecond64"
$objCCD1.CounterHelp = "Number of executions per second."
$objCCDC.Add($objCCD1) | Out-Null

$objCCD1 = New-Object System.Diagnostics.CounterCreationData
$objCCD1.CounterName = "Active Connections"
$objCCD1.CounterType = "numberOfItems64"
$objCCD1.CounterHelp = "Number of active connections to dashboards"
$objCCDC.Add($objCCD1) | Out-Null

[System.Diagnostics.PerformanceCounterCategory]::Create($categoryName, $categoryHelp, $categoryType, $objCCDC)|Out-Null
}
```

## Procesos

Los procesos iniciados directamente desde PowerShell Universal se mostrarán en la página de procesos. Puede acceder a esta página haciendo clic en Home y luego en la tarjeta Processes.

La información incluye el ID del proceso, el propósito, el nombre del fichero y el uso de memoria. También puede ver el estado de los runspaces dentro del proceso.

<figure><img src="/files/ZQtS3jGCngb71O3NXzYz" alt=""><figcaption></figcaption></figure>

Tenga en cuenta que los procesos iniciados por sus scripts no se mostrarán aquí.

## Sesiones de usuario

Puede ver las sesiones de usuario de los dashboards y de la consola de administración haciendo clic en la tarjeta User Sessions de la página Home. La información de la sesión incluye la hora de conexión, el origen, el nombre de usuario, la cadena de agente de usuario y la dirección IP remota.

<figure><img src="/files/2NtiIMYbWu7o6z2LtnkD" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/es/plataforma/monitoring.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
