mirror of
https://github.com/KeymonSoft/Monitor-Keymon.git
synced 2026-04-17 21:06:19 +00:00
- 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:
@@ -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
|
||||
Reference in New Issue
Block a user