ed: README, iplocate -h; update: map_thumb.svg

This commit is contained in:
jp.av.dev 2022-05-29 00:04:49 -04:00
parent 9e45ff6346
commit b25a834a21
4 changed files with 338 additions and 46 deletions

View File

@ -1,44 +1,25 @@
## Gestión de logs *nginx* archivados
Consulta información sobre IP(s) disponibles en ipinfo.io con o sin token.
- Consulta información sobre IP(s) disponibles en ipinfo.io con o sin token.
Carga logs archivados de nginx en base de datos. Consulta con ipinfo.io y registra
en base de datos.
Consultas y reportes según información en la base de datos.
Mueve archivos ***log.?.gz*** del servidor existentes en `/var/log/nginx` al directorio
de usuario "**ruta_base**" en el servidor especificado en `./config.cfg`. Utiliza el
- Mueve archivos ***log.?.gz*** del servidor existentes en `/var/log/nginx` al directorio
de usuario **"ruta_base"** en el servidor especificado en `./config.cfg`. Utiliza el
script `muevelogz.sh` (script en servidor).
Mueve los archivos ***log.?.gz*** del directorio de usuario del servidor al directorio
local "**destino_log**" especificado en `./config.cfg`.
- Mueve los archivos ***log.?.gz*** del directorio de usuario del servidor al directorio
local **"destino_log"** especificado en `./config.cfg`.
Descomprime archivos **`.gz`** y concatena los respectivos archivos de log.
- Descomprime archivos **`.gz`** y concatena los respectivos archivos de log.
Borra los archivos utilizados en concatenación. Script `./muevelog.sh`.
ej. archivo de configuración `./config.cfg`
```cfg
[bash_script]
ruta_base=mi_server://home/server_user/nginx_log.old/
destino_log=/home/server_logs/nginx_old
server_name=mi_server
server_script=//home/server_user/scripts/muevelogz.sh
- Crea base de datos ***SQLite3*** **`./ipinfo.db`** con tablas de **registro** y de **visitas**.
[iplocate]
token = '?token=1234567890abc'
```
- ***mi_server***: parte de *ruta_base*, nombre del host según configuración
en `~/.ssh/config`.
- **ruta_base** : es la ruta en el servidor donde se mueven los logs
archivados (.gz) desde `/var/log/nginx/` (termina en `/`).
- **destino_log** : ruta donde se guardan local y temporalmente los
archivos *log.?.gz*.
- **server_name** : nombre del host según configuración en `~/.ssh/config`.
- **server_script** : ruta en el servidor, del script que mueve los *log.?.gz*.
- Carga logs archivados de nginx en base de datos.
- Consulta con ipinfo.io y registra en base de datos.
- Consultas y reportes según información en la base de datos.
Crea base de datos ***SQLite3*** **`./ipinfo.db`** con tablas de **registro** y de **visitas**.
## Uso
@ -54,13 +35,15 @@ ej. alias `alias iploc='~/ruta/script/iplocate.py'`
iploc -h - Muestra esta ayuda.
Uso para consultas:
Consultas ipinfo.io:
iploc <IP> - Consulta la información de <IP> disponible en ipinfo.io.
iploc -f <archivo> - Consulta info. de las IPs en <archivo> (ipinfo.io).
iploc -t <IP> - Consulta la info. de <IP> usando 'token' de ipinfo.io,
especificado en config.cfg.
iploc -F <archivo> - Consulta info. de las IPs en <archivo> (token ipinfo.io).
Consultas base de datos:
iploc -d <IP> - Consulta la información de <IP> disponible en base de datos.
iploc -f <archivo> - Consulta info. de las IPs en <archivo> (ipinfo.io).
iploc -F <archivo> - Consulta info. de las IPs en <archivo> (token, ipinfo.io).
iploc -D <archivo> - Consulta info. de las IPs en <archivo> (base de datos).
Operaciones base de datos:
@ -74,7 +57,7 @@ ej. alias `alias iploc='~/ruta/script/iplocate.py'`
**`iploc --sync`**
Realiza el proceso de copia de archivos del servidor, extracción y concatenado.
Explicado con detalle mas arriba.
Explicado al comienzo de este documento.
**`iploc -c`**
Poblar tabla **visita** de la base de datos. Carga los registros en archivos de log en la tabla.
@ -84,7 +67,7 @@ Consulta a `ipinfo.io` por cada ip registrada en **visita** (una vez por ip).
Guarda los datos en tabla **registro**.
**`iploc -M`**
Genera mapas según vistas registradas, visitas 'infructuosas' de color rojo. Directorio `maps/`.
Genera mapas según vistas registradas. Visitas *infructuosas* de color rojo. Directorio `maps/`.
![img](./maps/map_thumb.svg)
@ -168,7 +151,7 @@ ej. formato `./archivo_IPs`.
### Sicronización manual
No es necesario el uso manual del script, ya que este es llamado por `iploc --sync`.
Pero ya que existe, es conveniente tener la opción de llamar manualmente a las funciones.
Pero ya que existe, puede resultar conveniente tener la opción de llamar manualmente a las funciones.
`./muevelog.sh -h`
```
@ -203,10 +186,28 @@ Crear `alias iploc='~/nginx_data/iplocate.py'`.
Modificar ruta **logdest** en `muevelogz.sh` y copiar en el servidor.
```
# logdest debe ser la misma ruta especificada en config.cfg como *ruta_base*
logdest=</ruta/user/docs/logs/nginx_log.old>
logdest=/home/server_user/nginx_log.old
```
Crear archivo de configuración según ejemplo mostrado en la primera sección
de este documento.
Crear archivo de configuración **config.cfg**.
ej. archivo de configuración `./config.cfg`
```cfg
[bash_script]
server_name=mi_server
ruta_base=mi_server://home/server_user/nginx_log.old/
server_script=//home/server_user/scripts/muevelogz.sh
destino_log=/home/local_user/.cache/nginx_old
[iplocate]
token = '?token=1234567890abc'
```
- ***mi_server***: parte de *ruta_base*, nombre del host según configuración en `~/.ssh/config`.
- **ruta_base** : es la ruta en el servidor donde se mueven los logs archivados (.gz) desde
`/var/log/nginx/` (termina en `/`).
- **destino_log** : ruta donde se guardan local y temporalmente los archivos *log.?.gz*.
- **server_name** : nombre del host según configuración en `~/.ssh/config`.
- **server_script** : ruta en el servidor, del script que mueve los *log.?.gz*.
Correr `iploc -h` para crear base de datos.
@ -224,7 +225,7 @@ Correr `iploc -h` para crear base de datos.
└── 📄️ sql_alch.py
```
Seguir los pasos explicados en **Uso**.
Seguir los pasos explicados en [Uso](#uso).
### Dependencias
<br>

View File

@ -237,13 +237,15 @@ def uso():
[bold yellow]iploc -h[/bold yellow] [green]- Muestra esta ayuda.[/green]
[bold blue]Uso para consultas:[/bold blue]
[bold blue]Consultas ipinfo.io:[/bold blue]
[bold yellow]iploc[/bold yellow] [blue]<IP>[/blue] [green]- Consulta la información de <IP> disponible en ipinfo.io.[/green]
[bold yellow]iploc -f [/bold yellow][blue]<archivo> [/blue] [green]- Consulta info. de las IPs en <archivo> (ipinfo.io).[/green]
[bold yellow]iploc -t [/bold yellow][blue]<IP>[/blue] [green]- Consulta la info. de <IP> usando 'token' de ipinfo.io,
especificado en config.cfg.[/green]
[bold yellow]iploc -F [/bold yellow][blue]<archivo> [/blue] [green]- Consulta info. de las IPs en <archivo> (token ipinfo.io).[/green]
[bold blue]Consultas base de datos:[/bold blue]
[bold yellow]iploc -d [/bold yellow][blue]<IP> [/blue] [green]- Consulta la información de <IP> disponible en base de datos.[/green]
[bold yellow]iploc -f [/bold yellow][blue]<archivo> [/blue] [green]- Consulta info. de las IPs en <archivo> (ipinfo.io).[/green]
[bold yellow]iploc -F [/bold yellow][blue]<archivo> [/blue] [green]- Consulta info. de las IPs en <archivo> (token, ipinfo.io).[/green]
[bold yellow]iploc -D [/bold yellow][blue]<archivo> [/blue] [green]- Consulta info. de las IPs en <archivo> (base de datos).[/green]
[bold blue]Operaciones base de datos:[/bold blue]
@ -253,7 +255,6 @@ def uso():
[bold blue]Mapa de visitas:[/bold blue]
[bold yellow]iploc -M [/bold yellow][green]- Genera mapa según registro de la BD (cod. 200 y otros).[/green]
"""
console.print(ayuda)

View File

@ -4122,6 +4122,249 @@
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 257.4046755555555 302.9754535752172 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 830.1975644444444 323.4488526657798 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 830.1975644444444 323.4488526657798 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 830.1975644444444 323.4488526657798 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 807.0500444444444 334.01493742063417 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 807.0500444444444 334.01493742063417 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 807.0500444444444 334.01493742063417 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 507.3425955555556 264.64904960771344 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 507.3425955555556 264.64904960771344 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 507.3425955555556 264.64904960771344 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 820.2909333333333 299.30268775226534 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 820.2909333333333 299.30268775226534 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 820.2909333333333 299.30268775226534 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 275.34430222222215 477.9781958151623 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 275.34430222222215 477.9781958151623 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 275.34430222222215 477.9781958151623 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 141.67560888888886 320.05834334884014 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 141.67560888888886 320.05834334884014 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 141.67560888888886 320.05834334884014 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 232.6543111111111 305.9233744056604 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 232.6543111111111 305.9233744056604 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 232.6543111111111 305.9233744056604 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 499.0464888888889 271.8535176664228 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 499.0464888888889 271.8535176664228 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 499.0464888888889 271.8535176664228 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 688.12496 342.8649838531016 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 688.12496 342.8649838531016 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 688.12496 342.8649838531016 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 551.5390044444445 302.2545989632708 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 551.5390044444445 302.2545989632708 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 551.5390044444445 302.2545989632708 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 831.5088533333334 319.33020527636506 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 831.5088533333334 319.33020527636506 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 831.5088533333334 319.33020527636506 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 829.8383111111111 323.44293827760646 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 829.8383111111111 323.44293827760646 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 829.8383111111111 323.44293827760646 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 482.3823111111111 254.85813290075498 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 482.3823111111111 254.85813290075498 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 482.3823111111111 254.85813290075498 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 495.39279999999997 285.23300988183485 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 495.39279999999997 285.23300988183485 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 495.39279999999997 285.23300988183485 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 569.7443022222222 317.1319815597964 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 569.7443022222222 317.1319815597964 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 569.7443022222222 317.1319815597964 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 683.6586133333333 346.9594703416886 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 683.6586133333333 346.9594703416886 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 683.6586133333333 346.9594703416886 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 302.2052444444444 534.646109697624 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 302.2052444444444 534.646109697624 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 302.2052444444444 534.646109697624 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 331.6011555555556 434.2671078732303 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 331.6011555555556 434.2671078732303 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 331.6011555555556 434.2671078732303 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 699.7470755555556 381.26827622224425 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 699.7470755555556 381.26827622224425 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 699.7470755555556 381.26827622224425 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 500.7025244444444 268.0683028297731 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 500.7025244444444 268.0683028297731 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 500.7025244444444 268.0683028297731 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 573.9162488888888 434.03294751629005 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 573.9162488888888 434.03294751629005 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 573.9162488888888 434.03294751629005 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 359.5594844444444 440.96316077445033 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 359.5594844444444 440.96316077445033 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 359.5594844444444 440.96316077445033 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 794.2184711111112 338.93785971035993 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 794.2184711111112 338.93785971035993 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 794.2184711111112 338.93785971035993 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 576.21712 238.33569577650348 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 576.21712 238.33569577650348 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 576.21712 238.33569577650348 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 672.4173688888889 260.3789317665359 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 672.4173688888889 260.3789317665359 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 672.4173688888889 260.3789317665359 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 323.66344888888887 498.5958793794664 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 323.66344888888887 498.5958793794664 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 323.66344888888887 498.5958793794664 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 677.1280533333332 266.5414427313431 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 677.1280533333332 266.5414427313431 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 677.1280533333332 266.5414427313431 l -3.4641016151377544 -6.0 a 4 4 0 1 1 6.928203230275509 0 Z" fill="#b20101" opacity="1.0" stroke="#ffffff" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 830.4820088888889 314.8382612730861 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
@ -5103,6 +5346,51 @@
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 141.69381333333337 320.1379165579378 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 150.40492444444442 329.32455958747124 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 150.40492444444442 329.32455958747124 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 150.40492444444442 329.32455958747124 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 266.8789511111112 297.5344578475308 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 266.8789511111112 297.5344578475308 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 266.8789511111112 297.5344578475308 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 495.39279999999997 285.23300988183485 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 495.39279999999997 285.23300988183485 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 495.39279999999997 285.23300988183485 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 474.47333333333336 261.41183817195497 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 474.47333333333336 261.41183817195497 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 474.47333333333336 261.41183817195497 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(-1024, 0)">
<path d="M 626.5174222222222 356.6587441377066 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(0, 0)">
<path d="M 626.5174222222222 356.6587441377066 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)" transform="translate(1024, 0)">
<path d="M 626.5174222222222 356.6587441377066 l -4.330127018922193 -7.5 a 5 5 0 1 1 8.660254037844386 0 Z" fill="#00ff29" opacity="1.0" stroke="#000000" stroke-width="1"/>
</g>
<g clip-path="url(#page)">
<rect fill="#ffffff" fill-opacity="0.8" height="12" width="1024" x="0" y="756"/>
<text fill="#000000" font-family="Arial, Helvetica, sans-serif" font-size="9px" x="2" y="765">Maps &amp; Data (C) OpenStreetMap.org contributors</text>

Before

Width:  |  Height:  |  Size: 514 KiB

After

Width:  |  Height:  |  Size: 537 KiB

View File

@ -1,11 +1,13 @@
#!/usr/bin/env bash
# logdest debe ser la misma ruta especificada en config.cfg como *ruta_base*
logdest=</ruta/user/docs/logs/nginx_log.old>
serv_user="${USER}"
logdest=/home/$USER/nginx_log.old
serv_user="${USER}"
logdir=/var/log/nginx
mkdir $logdest 2>/dev/null
mueve_loggz(){
if [[ "$(ls $logdir/*.log.*.gz 2>/dev/null)" ]]; then
printf 'Moviendo logs.gz de %s/\n' "${logdir}"