Commit 99af6430 authored by Gurvinder Singh's avatar Gurvinder Singh

fixed logrotate issue and added ipv6 support

parent 5598ccec
-----BEGIN CERTIFICATE-----
MIIFXTCCA0WgAwIBAgIJAI6KBv1kEwH/MA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX
aWRnaXRzIFB0eSBMdGQwHhcNMTQwNDE2MjAyMjUxWhcNMTQwNTE2MjAyMjUxWjBF
MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50
ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
CgKCAgEAxAKjlcgtWj7NlN3WF2IcWKqE+O03mSiSoxomAjQrn4iB9fvUrV4j7l32
rUQutqyGEnlaaYWMKrTTTG0urJq/uiQApOdWYjN/fmbTKurnF4X6+oSoWlCI4qOh
3BJTEYK2DUWKmxddOpzxntoS+zIjeBb0HImzOulcEKKOSJZ05PIrIEmv6nFjb5na
Nsnt/ycrCDPD//wSgPuw2RV19eJ0rnL1cHmojFZujM9FWgpu8pD0AQSBsCU+sBsT
9SErvW0VMeoJ59GIT67Qp9bZXrn6gszL7XyOB3mBLdNFDNP9Lmp/cNFjjmQY3viY
JriAZxjovW5ef6mN9LzNapudS0f1be+iFOZlgUXXT0jRIGEGaNGWLDKWEDv1jm1I
7YIc2RI0dIdyrpZlUeHQfb9iozaGiz9y6KV6F6taFNcIx9mGCt9HaHnb2Vne8aS+
5ydS9KfdPiVU+b2Qx0mmixcMgJ9BuBicmMnbhNPZHR1qped3EuajHDCu8ncjSHC4
RFn7j4LuyOe5C6kaMK6ECBl8ok7OKzhiIKnt6byqR4kc330rS93MshqvtCQFAGOT
AbLEYlFmcX3TTpMay0sksdOV8e04tUieIC1LWeMJs1iGVWElBQ0S0Np/EwPxOIN3
39OFgC4xrJYdV+6wgEE4wfGrb1pa2RvIFGxkZ+BILHAUe8VLohUCAwEAAaNQME4w
HQYDVR0OBBYEFEslxzDq8EjFuN6pBq81atQKcuVWMB8GA1UdIwQYMBaAFEslxzDq
8EjFuN6pBq81atQKcuVWMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggIB
AMDIwFd+uRzEbXy8xXDufYgs466u5mq1ZsdpUtH/hYo8lVSOTlJS1Dd6LAX+Ir+B
ePtubH4J1ijH9DjnKrpftUCz9cWOOguYmmeYDq3rSEi1m2x3HNgt6OhnlkEVDbLM
noWMWZ86Gxnns43gpvOybAYdosjwgBJMFJd5oNx4Q7GEZTj09H+13v+Yw3BVoeiV
6C5kO6wT9UOK18xQcWZ573UbPzzM8HjfyoNBR4x+gnPAWt9c5Dq4vZLrSS58jIyh
C1Pa5OAdt0B/6EOZ+eUjQ8dHvwFyIRzI+Jn0/4tt2QSsDB0xLnLvRATnY0zLoygg
iX2bXleeyAVeqpOSljHZupOYwiq7zeWYLaoWHSzDUOjmClyBMbBFgh3odzWlq8il
rThvfx27m1Mu9hXEtixhfajr5XS5HehPO4BE0wBxYBofl//m3hSLShu6csAPmiYF
VETNtULLv4HEZz0LQwf2tbhkfBGd3FlUf9M23K+Md3+ADMsSkiyNCjUhY0STJpkY
tvPqYyFiuVDEo7x4hZgcjBpNXtAv/7UXBVL/N2CrdnWGWNmZtt86mJX54xqfcRGL
4HU5c/dxLjzaS0wh7vb0L4gZxKJ0yNqGdVO5FQTiF/Dx5I6k1ZuKbpKS5lk+YQaU
C4jImUvN5+QBVWV0t2B0yMk/AAnsm777qxdT4qhydXNt
-----END CERTIFICATE-----
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
"comment": "forwarder will choose one at random and will switch to next", "comment": "forwarder will choose one at random and will switch to next",
"servers": [ "localhost:5000","localhost1:5000" ], "servers": [ "localhost:5000","localhost1:5000" ],
"ssl ca": "/etc/ssl/certs/logrouter_uninett.pem", "ssl ca": "/etc/ssl/certs/uninett-ca.pem",
"timeout": 10 "timeout": 20
}, },
"comment": "Here you specify the log file you want to monitor", "comment": "Here you specify the log file you want to monitor",
"comment": "and ship them to log cluster to process", "comment": "and ship them to log cluster to process",
......
...@@ -5,5 +5,8 @@ ...@@ -5,5 +5,8 @@
missingok missingok
delaycompress delaycompress
compress compress
postrotate
/etc/init.d/logstash-forwarder restart
endscript
} }
...@@ -20,7 +20,7 @@ import ( ...@@ -20,7 +20,7 @@ import (
) )
var hostname string var hostname string
var hostport_re, _ = regexp.Compile("^(.+):([0-9]+)$") var hostport_re, _ = regexp.Compile(`^\[?([^]]+)\]?:([0-9]+)$`)
func init() { func init() {
log.Printf("publisher init\n") log.Printf("publisher init\n")
...@@ -180,7 +180,7 @@ func connect(config *NetworkConfig) (socket *tls.Conn) { ...@@ -180,7 +180,7 @@ func connect(config *NetworkConfig) (socket *tls.Conn) {
} }
address := addresses[rand.Int()%len(addresses)] address := addresses[rand.Int()%len(addresses)]
addressport := fmt.Sprintf("%s:%s", address, port) addressport := net.JoinHostPort(address, port)
log.Printf("Connecting to %s (%s) \n", addressport, host) log.Printf("Connecting to %s (%s) \n", addressport, host)
......
-----BEGIN CERTIFICATE-----
MIIEbzCCA1egAwIBAgIJAJAhu7l6dg+nMA0GCSqGSIb3DQEBBQUAMEoxCzAJBgNV
BAYTAk5PMRMwEQYDVQQKEwpVTklORVRUIEFTMSYwJAYDVQQDEx1VTklORVRUIENl
cnRpZmljYXRlIEF1dGhvcml0eTAeFw0xMDAyMDYwMDEyMzBaFw0yMDAyMDQwMDEy
MzBaMEoxCzAJBgNVBAYTAk5PMRMwEQYDVQQKEwpVTklORVRUIEFTMSYwJAYDVQQD
Ex1VTklORVRUIENlcnRpZmljYXRlIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBAK2+21jlJLycaCgg6TBo+i37DkWvW4UR3ptLzQAQfBuO
SfPBPG9zXhmn0z/gNWfpbAwETiW+2oTcSKz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w8Pn
n/dq6ffTELCFs/4QBOz7av0IxjnemYuCzgUZmb+YPhYKW+c=
-----END CERTIFICATE-----
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment