- VERSION 4.11.30

- Se quitaron librerias y permisos que no se usaban.
- Se agregó la opción de monitorear mas de un servidor.
This commit is contained in:
Jose Alberto Guerra Ugalde
2024-12-01 02:28:38 -06:00
parent 4fe5dbd25a
commit 80d6ded85e
8 changed files with 243 additions and 80 deletions

View File

@@ -473,4 +473,25 @@ Sub ping
Else
Log("Error: " & LastException)
End If
End Sub
Sub traeServidorDesdeBD(id As Int) As Map
Private m As Map
m.Initialize
Private x As Cursor = Starter.skmt.ExecQuery($"select * from cat_servidores where id = ${id}"$)
If x.RowCount > 0 Then
For i = 0 To x.RowCount - 1
x.Position = i
m = CreateMap("nombre":x.GetString("nombre"), "url":x.GetString("url"), "intervalo":x.GetString("intervalo"), "timeout":x.GetString("timeout"))
Next
End If
Return m
End Sub
'Borramos renglones extra de la tabla de errores
Sub borraArribaDeXXXErrores(limite As Int) 'ignore
If Starter.logger Then LogColor($"Recortamos la tabla de error_log, limite de ${limite}"$, Colors.Magenta)
Starter.skmt.ExecNonQuery($"DELETE FROM error_log WHERE fecha NOT in (SELECT fecha FROM error_log ORDER BY fecha desc LIMIT ${limite})"$)
Starter.skmt.ExecNonQuery("vacuum;")
' if starter.logger then Log("Borramos mas de 100 de errorLog")
End Sub