{"action":"created","issue":{"url":"https://api.github.com/repos/apcera/continuum-sample-apps/issues/31","labels_url":"https://api.github.com/repos/apcera/continuum-sample-apps/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/apcera/continuum-sample-apps/issues/31/comments","events_url":"https://api.github.com/repos/apcera/continuum-sample-apps/issues/31/events","html_url":"https://github.com/apcera/continuum-sample-apps/pull/31","id":98223814,"number":31,"title":"Added Slogger tool","user":{"login":"gabrieljackson","id":3694686,"avatar_url":"https://avatars.githubusercontent.com/u/3694686?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrieljackson","html_url":"https://github.com/gabrieljackson","followers_url":"https://api.github.com/users/gabrieljackson/followers","following_url":"https://api.github.com/users/gabrieljackson/following{/other_user}","gists_url":"https://api.github.com/users/gabrieljackson/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrieljackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrieljackson/subscriptions","organizations_url":"https://api.github.com/users/gabrieljackson/orgs","repos_url":"https://api.github.com/users/gabrieljackson/repos","events_url":"https://api.github.com/users/gabrieljackson/events{/privacy}","received_events_url":"https://api.github.com/users/gabrieljackson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-30T17:41:51Z","updated_at":"2015-07-30T17:45:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apcera/continuum-sample-apps/pulls/31","html_url":"https://github.com/apcera/continuum-sample-apps/pull/31","diff_url":"https://github.com/apcera/continuum-sample-apps/pull/31.diff","patch_url":"https://github.com/apcera/continuum-sample-apps/pull/31.patch"},"body":"Slogger is a simple syslog server that is built via the bash staging\r\nprocess.\r\n\r\nSlogger listens on port `1999` by default. All log messages that hit\r\nthis port will be appended to the `/app/logs/all-remote-logs` file.\r\nDue to the startup process ending with tailing this file, all log\r\nmessages can be viewed in realtime by running `apc job logs slogger`.\r\n\r\nBy adding a TCP route to the Slogger job and then adding an app drain\r\nto other apps, this allows the collection of job logs via Slogger."},"comment":{"url":"https://api.github.com/repos/apcera/continuum-sample-apps/issues/comments/126414914","html_url":"https://github.com/apcera/continuum-sample-apps/pull/31#issuecomment-126414914","issue_url":"https://api.github.com/repos/apcera/continuum-sample-apps/issues/31","id":126414914,"user":{"login":"gabrieljackson","id":3694686,"avatar_url":"https://avatars.githubusercontent.com/u/3694686?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrieljackson","html_url":"https://github.com/gabrieljackson","followers_url":"https://api.github.com/users/gabrieljackson/followers","following_url":"https://api.github.com/users/gabrieljackson/following{/other_user}","gists_url":"https://api.github.com/users/gabrieljackson/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrieljackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrieljackson/subscriptions","organizations_url":"https://api.github.com/users/gabrieljackson/orgs","repos_url":"https://api.github.com/users/gabrieljackson/repos","events_url":"https://api.github.com/users/gabrieljackson/events{/privacy}","received_events_url":"https://api.github.com/users/gabrieljackson/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T17:45:31Z","updated_at":"2015-07-30T17:45:31Z","body":"Please review @klobucar @zquestz @emil2k\r\n\r\nExample output generated by a Go app on the cluster:\r\n\r\n```\r\ngabe-mbp:~/gabecode/samples/bash/slogger$ curl go1.gabe.sandbox.demo.apcera.net\r\n{\r\n  \"API_Instance\": \"86aba801-7797-462e-939f-98bbf546a09e\",\r\n  \"API_FQN\": \"job::/sandbox/gabe::go1\",\r\n  \"Number\": 81\r\n}\r\n```\r\n\r\nLogs as seen by running `apc job logs slogger`:\r\n\r\n```\r\n[stdout] ###############################################################\r\n[stdout] ##                   SLOGGER VERSION: 0.1                    ##\r\n[stdout] ###############################################################\r\n[stdout] ##                   START SYSLOG SERVICE                    ##\r\n[stdout] ###############################################################\r\n[stdout]  * Starting system logging syslog-ng\r\n[stdout]    ...done.\r\n[stdout] syslog-ng 3.6.4\r\n[stdout] Installer-Version: 3.6.4\r\n[stdout] Revision: \r\n[stdout] Compile-Date: Jul 30 2015 17:30:46\r\n[stdout] Available-Modules: dbparser,afsocket-tls,confgen,pseudofile,sdjournal,afstomp,basicfuncs,cryptofuncs,afprog,affile,afuser,syslogformat,afsocket-notls,graphite,afmongodb,afsocket,afamqp,system-source,linux-kmsg-format,csvparser\r\n[stdout] Enable-Debug: off\r\n[stdout] Enable-GProf: off\r\n[stdout] Enable-Memtrace: off\r\n[stdout] Enable-IPv6: on\r\n[stdout] Enable-Spoof-Source: off\r\n[stdout] Enable-TCP-Wrapper: off\r\n[stdout] Enable-Linux-Caps: off\r\n[stdout] ###############################################################\r\n[stdout] ##     RUN NETSTAT TO ENSURE SYSLOG IS LISTENING ON 1999     ##\r\n[stdout] ###############################################################\r\n[stdout] Active Internet connections (only servers)\r\n[stdout] Proto Recv-Q Send-Q Local Address           Foreign Address         State      \r\n[stdout] tcp        0      0 *:1999                  *:*                     LISTEN     \r\n[stdout] Active UNIX domain sockets (only servers)\r\n[stdout] Proto RefCnt Flags       Type       State         I-Node   Path\r\n[stdout] unix  2      [ ACC ]     STREAM     LISTENING     27146169 /app/syslog-ng/var/syslog-ng.ctl\r\n[stdout] unix  2      [ ACC ]     STREAM     LISTENING     27144969 /var/lib/continuum/instances/1c109868/socket\r\n[stdout] ###############################################################\r\n[stdout] ##                 BEGINNING OF REMOTE LOGS                  ##\r\n[stdout] ###############################################################\r\n[stdout] Jul 30 17:35:30 10.0.0.75 job.09e0b44e-9f9f-4362-83b9-d88bd57ba360.stdout[2981]: {\r\n[stdout] Jul 30 17:35:30 10.0.0.75 job.09e0b44e-9f9f-4362-83b9-d88bd57ba360.stdout[2981]:   \"API_Instance\": \"86aba801-7797-462e-939f-98bbf546a09e\",\r\n[stdout] Jul 30 17:35:30 10.0.0.75 job.09e0b44e-9f9f-4362-83b9-d88bd57ba360.stdout[2981]:   \"API_FQN\": \"job::/sandbox/gabe::go1\",\r\n[stdout] Jul 30 17:35:30 10.0.0.75 job.09e0b44e-9f9f-4362-83b9-d88bd57ba360.stdout[2981]:   \"Number\": 81\r\n[stdout] Jul 30 17:35:30 10.0.0.75 job.09e0b44e-9f9f-4362-83b9-d88bd57ba360.stdout[2981]: }\r\n```"}}