Project

General

Profile

Actions

Tareas #93

open

Generación de Reporte de Potencias

Added by Demo MiGestion365 Admin 2 months ago. Updated about 2 months ago.

Status:
Resuelta
Priority:
Normal
Assignee:
-
Start date:
07/28/2026
Due date:
07/28/2026 (about 2 months late)
% Done:

100%

Estimated time:
4:00 h

Description

Debido a que en los últimos tiempos se fueron detectando OLTs que no reportan sus potencias. Dejan de reportar y hasta tanto no se las reinicia no vuelven a reportar.


Files

clipboard-202607290924-i7i81.png (104 KB) clipboard-202607290924-i7i81.png Demo MiGestion365 Admin, 07/29/2026 12:24 PM
clipboard-202607290929-ekeqw.png (85.3 KB) clipboard-202607290929-ekeqw.png Demo MiGestion365 Admin, 07/29/2026 12:29 PM

Related issues 1 (1 open — 0 closed)

Related to Tareas #86: Ramas RATC sin actualización de potencias en Altiplano Resuelta07/15/202607/29/2026

Actions
Actions #1

Updated by Demo MiGestion365 Admin 2 months ago

Ante este escenario generé un nuevo flujo en n8n que extrae el listado de las OLT en las que no se reportan potencias de al menos el 25% de las ONTs

WITH ultimas AS (
SELECT
objectname,
MAX("ont-pwr_rx_updated_on") AS ultima_actualizacion
FROM altiplano.potencias
GROUP BY objectname
),
placas AS (
SELECT
substring(
objectname
from '(BA_OLTA_[^-]+_[^-]+-[0-9]+)'
) AS olt_lt,
ultima_actualizacion
FROM ultimas
)
SELECT
olt_lt,
COUNT() AS total_onts,
COUNT(
) FILTER (
WHERE ultima_actualizacion >= NOW() - INTERVAL '24 hours'
) AS onts_reportando,
COUNT() FILTER (
WHERE ultima_actualizacion < NOW() - INTERVAL '24 hours'
) AS onts_sin_reportar,
ROUND(
100.0 *
COUNT(
) FILTER (
WHERE ultima_actualizacion >= NOW() - INTERVAL '24 hours'
)
/ COUNT(),
2
) AS porcentaje_reportando
FROM placas
GROUP BY olt_lt
HAVING
100.0 *
COUNT(
) FILTER (
WHERE ultima_actualizacion >= NOW() - INTERVAL '24 hours'
)
/ COUNT(*) < 75
ORDER BY porcentaje_reportando ASC, total_onts DESC;

Actions #2

Updated by Demo MiGestion365 Admin 2 months ago

Actions #3

Updated by Demo MiGestion365 Admin 2 months ago

  • Related to Tareas #86: Ramas RATC sin actualización de potencias en Altiplano added
Actions #4

Updated by Demo MiGestion365 Admin about 2 months ago

  • Estimated time set to 4:00 h
Actions

Also available in: Atom PDF