| ... | ... | @@ -6,4 +6,24 @@ logging['udp_log_shipping_host'] = '1.2.3.4' # Your syslog server |
|
|
|
logging['udp_log_shipping_port'] = 1514 # Optional, defaults to 514 (syslog)
|
|
|
|
```
|
|
|
|
|
|
|
|
* Run ```sudo gitlab-ctl reconfigure``` and now your logs will be shipped to 1.2.3.4:1514 |
|
|
\ No newline at end of file |
|
|
|
* Run ```sudo gitlab-ctl reconfigure``` and now your logs will be shipped to ```1.2.3.4:1514```
|
|
|
|
|
|
|
|
### Setting up basic UDP socket to receive logs:
|
|
|
|
* Make Python file with name of your choosing:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo nano udp_server.py
|
|
|
|
```
|
|
|
|
|
|
|
|
* Add following lines:
|
|
|
|
|
|
|
|
```
|
|
|
|
import socket
|
|
|
|
|
|
|
|
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
|
|
sock.bind(("1.2.3.4", 1514))
|
|
|
|
while True:
|
|
|
|
data, addr = sock.recvfrom(1024)
|
|
|
|
print (data)
|
|
|
|
|
|
|
|
``` |
|
|
\ No newline at end of file |