{"id":20049718,"url":"https://github.com/scriptkitties/perl6-shinrin","last_synced_at":"2025-07-31T17:44:40.696Z","repository":{"id":80058770,"uuid":"104453292","full_name":"scriptkitties/perl6-Shinrin","owner":"scriptkitties","description":"A centralized logging system in Perl 6","archived":false,"fork":false,"pushed_at":"2017-09-27T21:47:09.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T08:29:19.153Z","etag":null,"topics":["logging","logging-server","perl6"],"latest_commit_sha":null,"homepage":null,"language":"Perl 6","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scriptkitties.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-22T08:52:54.000Z","updated_at":"2017-09-26T12:17:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"49b884cc-abe7-4c9a-8715-4661c28193d9","html_url":"https://github.com/scriptkitties/perl6-Shinrin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scriptkitties/perl6-Shinrin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptkitties%2Fperl6-Shinrin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptkitties%2Fperl6-Shinrin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptkitties%2Fperl6-Shinrin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptkitties%2Fperl6-Shinrin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scriptkitties","download_url":"https://codeload.github.com/scriptkitties/perl6-Shinrin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scriptkitties%2Fperl6-Shinrin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268081826,"owners_count":24192967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logging","logging-server","perl6"],"created_at":"2024-11-13T11:51:59.139Z","updated_at":"2025-07-31T17:44:40.636Z","avatar_url":"https://github.com/scriptkitties.png","language":"Perl 6","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Shinrin\n:toc: preamble\n:tip-caption: :bulb:\n:note-caption: :information_source:\n:important-caption: :heavy_exclamation_mark:\n:caution-caption: :fire:\n:warning-caption: :warning:\n\nShinrin is a centralized logging system written in Perl 6. \n\n== Rationale\nIt's inception came after finding existing solutions to centralized logging to\nbe very heavy and cumbersome to setup. Shinrin is a simple collection of Perl 6\nscripts, each dealing with their own type of logs, and the main `shinrind`, to\nstore them all in a MongoDB database.\n\n=== Why Perl 6\nPerl 6 comes with a very powerful grammar system, making it easy to parse\nlogfiles and convert them into a format that can be stored for easy indexing.\nIn addition, I have found Perl 6 to be a very nice language to work with in\ngeneral, and I want to get more experienced at it.\n\n=== Why MongoDB\nA NoSQL database would be the easiest for this purpose, since there are no\ndefined schemas you have to setup for each log type. This makes starting with\nShinrin easier and less effort.\n\nAdditionally, the data stored doesn't relate across tables. In-table relations\nwith logs aren't common either, so the overhead of a RDBMS seems pointless.\n\nWhile there are many NoSQL backends, some of which might be arguably better for\nthis task, I could only find a MongoDB module for Perl 6 that was usable at the\ntime I started on this project. In the future, MongoDB might be replaced with a\ndifferent database.\n\n== Setting up Shinrin\n=== System dependencies\nFirst, install all dependencies for Shinrin. A list of dependencies is given\nbelow, you should use your system's package manager of choice to install them.\n\n- https://git-scm.com/[git]\n- https://www.mongodb.com/[MongoDB]\n- https://perl6.org/[Perl 6]\n\n=== Clone the Shinrin repository\nClone the Shinrin repository into `/opt` using `git`. Any other path should be\nfine too, just make sure you remember the path for setting up the init scripts\nlater on.\n\n[source]\n----\n# git clone https://github.com/scriptkitties/perl6-Shinrin /opt/shinrin\n----\n\n=== Install Shinrin Perl 6 dependencies\nThe Perl 6 module manager of choice these days is\nhttps://github.com/ugexe/zef[zef]. If you used a Perl 6 distribution which\nalready contains this, you don't have to do anything special. If not, make sure\nyou get `zef` installed.\n\nOnce `zef` has been installed, `cd` into the Shinrin directory and install all\ndependencies:\n\n[source]\n----\n# cd /opt/shinrin\n# zef install .\n----\n\n=== Configuring Shinrin\nShinrin uses `toml` files for configuration. These configuration files are\nloaded, in order:\n\n- `/etc/shinrin.toml`\n- `/usr/local/etc/shinrin.toml`\n\n`toml` files can have sections, each module dealing with a kind of log will be\nconfigured in its own section. Next is a small sample with default values. If\nthe defaults look good to you, you don't have to set them.\n\n[NOTE]\n====\nNew releases could potentially change some of these defaults, so you are advised\nto always create a configuration file.\n====\n\n[source,toml]\n----\n[shinrin]\ndebug = false\nbind-ip = \"127.1\"\nbind-port = 17344\n\n[database]\nconnection = \"mongodb://127.1\"\ndatabase = \"shinrin\"\n----\n\n=== Adding Shinrin as a startup service\nGenerally, you'd like your logging system to be available at all times, so you\nshould have it as a service. This makes it able to autostart with other system\nservices.\n\n[TIP]\n====\nIf your favourite service manager is not documented here, please consider\ncontributing.\n====\n\n==== OpenRC\nTo get Shinrin available as OpenRC service, symlink the file from `etc/openrc`\nto `/etc/init.d/shinrin`. If you cloned Shinrin to a directory other than\n`/opt`, you should set the `SHINRIN_PATH` in `/etc/conf.d/shinrin`.\n\n[source]\n----\n# ln -s /opt/shinrin/etc/openrc /etc/conf.d/shinrin\n# rc-update add shinrin default\n----\n\nYou can set the following init configuration variables in `/etc/conf.d/shinrin`\nif you need to change things around. Their default values are also given here.\n\n[source,sh]\n----\nSHINRIN_PATH=\"/opt/shinrin\" # The path to the shinrin repository.\n\nSHINRIN_USER=\"root\"         # The user to run Shinrin as.\n\nPERL_PATH=\"perl6\"           # The name of the Perl 6 binary as it exists in\n                            # your $PATH. If it's not available in your $PATH,\n                            # you can set an absolute path instead.\n----\n\n== Using Shinrin\nUse your system's service manager to start up Shinrin.\n\n[source]\n----\n# service shinrin start\n----\n\nShinrin should now be up and running at the IP and port set in the\nconfiguration file. Now you can add Shinrin workers on the clients to parse\nlogfiles and pass on the data to Shinrin, which will store them in the\ndatabase.\n\n=== Workers\nWorkers are the scripts that run on the clients that are sending logs to the\nmain Shinrin service.  While it should be pretty easy to create a Shinrin\nworker to parse logs for you, it would be a waste not to use pre-existing\nworkers. Following is a list with (known) existing workers you can start using\nimmediatly:\n\n- https://github.com/scriptkitties/perl6-Shinrin-Worker-Nginx[`Shinrin::Worker::Nginx`] (nginx access logs)\n\n=== Frontends\nAt the time of writing, there are no frontends to view your Shinrin data.\n\n== Contributing\nAll contributions are welcome. Feel free to create issues, fork the repository\nand submit patches to improve Shinrin for all!\n\n== License\nShinrin is licensed under the GNU GPL version 3 or later.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptkitties%2Fperl6-shinrin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscriptkitties%2Fperl6-shinrin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscriptkitties%2Fperl6-shinrin/lists"}