diff --git a/README.md b/README.md index 05790cc..d32088b 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,11 @@ logvac -s logvac add-token -t TOKEN # add a log via http -curl -k https://127.0.0.1:1234 -H "X-USER-TOKEN: TOKEN" \ +curl -k https://127.0.0.1:6360 -H "X-USER-TOKEN: TOKEN" \ -d '{"id":"log-test", "type":"log", "message":"my first log"}' # view log via http -curl -k "https://127.0.0.1:1234?type=log&auth=TOKEN" +curl -k "https://127.0.0.1:6360?type=log&auth=TOKEN" # Congratulations logmaster! ``` @@ -33,7 +33,7 @@ curl -k "https://127.0.0.1:1234?type=log&auth=TOKEN" `logvac add-token -t TOKEN` - If your logs aren't showing up where you think they should, try checking the 'app' type and see if they are there. By default logvac will log to `type=app` (unless changed via config options). If you have a malformed entry (even with a type specified) it will end up there: -`curl -k "https://127.0.0.1:1234?type=app&auth=TOKEN"` +`curl -k "https://127.0.0.1:6360?type=app&auth=TOKEN"` ## Usage ``` @@ -55,9 +55,9 @@ Flags: -C, --cors-allow string Sets the 'Access-Control-Allow-Origin' header (default "*") -d, --db-address string Log storage address (default "boltdb:///var/db/logvac.bolt") -i, --insecure Don't use TLS (used for testing) - -a, --listen-http string API listen address (same endpoint for http log collection) (default "127.0.0.1:1234") - -t, --listen-tcp string TCP log collection endpoint (default "127.0.0.1:1235") - -u, --listen-udp string UDP log collection endpoint (default "127.0.0.1:1234") + -a, --listen-http string API listen address (same endpoint for http log collection) (default "127.0.0.1:6360") + -t, --listen-tcp string TCP log collection endpoint (default "127.0.0.1:6361") + -u, --listen-udp string UDP log collection endpoint (default "127.0.0.1:514") -k, --log-keep string Age or number of logs to keep per type '{"app":"2w", "deploy": 10}'' (int or X(m)in, (h)our, (d)ay, (w)eek, (y)ear) (default "{\"app\":\"2w\"}") -l, --log-level string Level at which to log (default "info") -L, --log-type string Default type to apply to incoming logs (commonly used: app|deploy) (default "app") @@ -72,9 +72,9 @@ Config File: (takes precedence over cli flags) ```json // logvac.json { - "listen-http": "127.0.0.1:1234", - "listen-udp": "127.0.0.1:1234", - "listen-tcp": "127.0.0.1:1235", + "listen-http": "127.0.0.1:6360", + "listen-udp": "127.0.0.1:514", + "listen-tcp": "127.0.0.1:6361", "pub-address": "", "pub-auth": "", "db-address": "boltdb:///var/db/logvac.bolt", diff --git a/api/README.md b/api/README.md index c21e0ce..eea49f4 100644 --- a/api/README.md +++ b/api/README.md @@ -54,38 +54,38 @@ Note: * = required on submit add auth key - attempt ``` -$ curl -ik https://localhost:1234/add-key -H 'X-USER-TOKEN: user' +$ curl -ik https://localhost:6360/add-key -H 'X-USER-TOKEN: user' HTTP/1.1 401 Unauthorized ``` add auth key - success ``` -$ curl -ik https://localhost:1234/add-key -H 'X-USER-TOKEN: user' -H 'X-AUTH-TOKEN: secret' +$ curl -ik https://localhost:6360/add-key -H 'X-USER-TOKEN: user' -H 'X-AUTH-TOKEN: secret' HTTP/1.1 200 OK ``` publish log - attempt ``` -$ curl -ik https://localhost:1234 -d '{"id":"my-app","type":"deploy","message":"$ mv nanobox/.htaccess .htaccess\n[✓] SUCCESS"}' +$ curl -ik https://localhost:6360 -d '{"id":"my-app","type":"deploy","message":"$ mv nanobox/.htaccess .htaccess\n[✓] SUCCESS"}' HTTP/1.1 401 Unauthorized ``` publish log - success ``` -$ curl -ik https://localhost:1234 -H 'X-USER-TOKEN: user' -d '{"id":"my-app","type":"deploy","message":"$ mv nanobox/.htaccess .htaccess\n[✓] SUCCESS"}' +$ curl -ik https://localhost:6360 -H 'X-USER-TOKEN: user' -d '{"id":"my-app","type":"deploy","message":"$ mv nanobox/.htaccess .htaccess\n[✓] SUCCESS"}' sucess! HTTP/1.1 200 OK ``` get deploy logs ``` -$ curl -k https://localhost:1234?kind=deploy -H 'X-USER-TOKEN: user' +$ curl -k https://localhost:6360?kind=deploy -H 'X-USER-TOKEN: user' [{"time":"2016-03-07T15:48:57.668893791-07:00","id":"my-app","tag":"","type":"deploy","priority":0,"message":"$ mv nanobox/.htaccess .htaccess\n[✓] SUCCESS"}] ``` get app logs ``` -$ curl -k https://localhost:1234 -H 'X-USER-TOKEN: user' +$ curl -k https://localhost:6360 -H 'X-USER-TOKEN: user' [] ``` diff --git a/collector/README.md b/collector/README.md index 3dc4d3a..7f6dbf7 100644 --- a/collector/README.md +++ b/collector/README.md @@ -12,9 +12,9 @@ Logvac can receive logs from rsyslog >``` # rsyslog.conf style - more info look at rsyslog.conf(5) # Single '@' sends to UDP -*.* @127.0.0.1:1234 +*.* @127.0.0.1:514 # Double '@' sends to TCP -*.* @@127.0.0.1:1235 +*.* @@127.0.0.1:6361 ``` > `sudo service rsyslog restart` with the preceding config file should start dumping logs to logvac diff --git a/config/config.go b/config/config.go index 4961bd8..880b7b1 100644 --- a/config/config.go +++ b/config/config.go @@ -12,9 +12,9 @@ import ( var ( // collectors - ListenHttp = "127.0.0.1:1234" // address the api and http log collectors listen on - ListenUdp = "127.0.0.1:1234" // address the udp log collector listens on - ListenTcp = "127.0.0.1:1235" // address the tcp log collector listens on + ListenHttp = "127.0.0.1:6360" // address the api and http log collectors listen on + ListenUdp = "127.0.0.1:514" // address the udp log collector listens on + ListenTcp = "127.0.0.1:6361" // address the tcp log collector listens on // drains PubAddress = "" // publisher address // mist://127.0.0.1:1445 diff --git a/main.go b/main.go index 99a4720..c96b562 100644 --- a/main.go +++ b/main.go @@ -21,9 +21,9 @@ // -C, --cors-allow string Sets the 'Access-Control-Allow-Origin' header (default "*") // -d, --db-address string Log storage address (default "boltdb:///var/db/logvac.bolt") // -i, --insecure Don't use TLS (used for testing) -// -a, --listen-http string API listen address (same endpoint for http log collection) (default "127.0.0.1:1234") -// -t, --listen-tcp string TCP log collection endpoint (default "127.0.0.1:1235") -// -u, --listen-udp string UDP log collection endpoint (default "127.0.0.1:1234") +// -a, --listen-http string API listen address (same endpoint for http log collection) (default "127.0.0.1:6360") +// -t, --listen-tcp string TCP log collection endpoint (default "127.0.0.1:6361") +// -u, --listen-udp string UDP log collection endpoint (default "127.0.0.1:514") // -k, --log-keep string Age or number of logs to keep per type '{"app":"2w", "deploy": 10}' (int or X(m)in, (h)our, (d)ay, (w)eek, (y)ear) (default "{\"app\":\"2w\"}") // -l, --log-level string Level at which to log (default "info") // -L, --log-type string Default type to apply to incoming logs (commonly used: app|deploy) (default "app")