{"id":18972383,"url":"https://github.com/wuriyanto48/jvm-stash","last_synced_at":"2026-04-25T23:35:28.488Z","repository":{"id":45527850,"uuid":"260532653","full_name":"wuriyanto48/jvm-stash","owner":"wuriyanto48","description":"Logstash Client library for Java Virtual Machine","archived":false,"fork":false,"pushed_at":"2022-11-16T09:22:16.000Z","size":36,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T15:00:28.054Z","etag":null,"topics":["elastic","elasticsearch","elk","elk-stack","java","kibana","logstash-client"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wuriyanto48.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2020-05-01T18:40:11.000Z","updated_at":"2020-05-12T19:30:05.000Z","dependencies_parsed_at":"2022-08-26T12:51:11.848Z","dependency_job_id":null,"html_url":"https://github.com/wuriyanto48/jvm-stash","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wuriyanto48/jvm-stash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuriyanto48%2Fjvm-stash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuriyanto48%2Fjvm-stash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuriyanto48%2Fjvm-stash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuriyanto48%2Fjvm-stash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wuriyanto48","download_url":"https://codeload.github.com/wuriyanto48/jvm-stash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuriyanto48%2Fjvm-stash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32280979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["elastic","elasticsearch","elk","elk-stack","java","kibana","logstash-client"],"created_at":"2024-11-08T15:08:21.218Z","updated_at":"2026-04-25T23:35:28.474Z","avatar_url":"https://github.com/wuriyanto48.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## JVM Stash\nLogstash Client for Java Virtual Machine\n\n\u003e##### Note (If you use TLS)\n\u003e You should convert your server certificate into PKCS12 format.\n\n```shell\n$ openssl pkcs12 -export -inkey your_server.key -in your_server.crt -out server.p12\n```\n\n### Install\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.wuriyanto\u003c/groupId\u003e\n  \u003cartifactId\u003ejvm-stash\u003c/artifactId\u003e\n  \u003cversion\u003e1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Usage\n\n#### Basic\n```java\nStash stash = new Stash.Builder()\n                .setHost(\"localhost\")\n                .setPort(5000)\n                .build();\n\ntry {\n    stash.connect();\n} catch (StashException e) {\n    System.out.println(e.getMessage());\n    System.exit(1);\n}\n\nstash.write(\"hello logstash\".getBytes())\n\ntry {\n    stash.close();\n} catch (IOException e) {\n    System.out.println(e.getMessage());\n    System.exit(1);\n}\n```\n\n#### TLS Connection\n\nAssumed you already enable `ssl` config inside `logstash.conf`\n```config\ninput {\n\ttcp {\n\t\tport =\u003e 5000\n\t\tssl_enable =\u003e true\n\t\tssl_cert =\u003e \"/etc/server.crt\"\n\t\tssl_key =\u003e \"/etc/server.key\"\n\t\tssl_verify =\u003e false\n\t}\n}\n```\n\nLet's write some code again\n```java\nInputStream keyStore = null;\n\ntry {\n    keyStore = new FileInputStream(\"/path/to/your/server.p12\");\n} catch (Exception e) {\n    System.out.println(e.getMessage());\n    System.exit(1);\n}\n\nStash stash = new Stash.Builder()\n                .setHost(\"localhost\")\n                .setPort(5000)\n                // makesure set to true\n                .setSecure(true)\n                .setKeyStoreIs(keyStore)\n                .setKeyStorePassword(\"damn12345\")\n                .build();\n\ntry {\n    stash.connect();\n} catch (StashException e) {\n    System.out.println(e.getMessage());\n    System.exit(1);\n}\n\nstash.write(\"hello logstash\".getBytes())\n\ntry {\n    stash.close();\n} catch (IOException e) {\n    System.out.println(e.getMessage());\n    System.exit(1);\n}\n```\n\n#### With Java's standar logging\n```java\nprivate static final Logger LOGGER = Logger.getLogger(AppLogger.class.getName());\n\npublic static void main(String[] args) throws StashException {\n        InputStream keyStore = null;\n        \n        try {\n            keyStore = new FileInputStream(\"/path/to/your/server.p12\");\n        } catch (Exception e) {\n            System.out.println(e.getMessage());\n            System.exit(1);\n        }\n        \n        Stash stash = new Stash.Builder()\n                        .setHost(\"localhost\")\n                        .setPort(5000)\n                        // makesure set to true\n                        .setSecure(true)\n                        .setKeyStoreIs(keyStore)\n                        .setKeyStorePassword(\"damn12345\")\n                        .build();\n        \n        try {\n            stash.connect();\n        } catch (StashException e) {\n            System.out.println(e.getMessage());\n            System.exit(1);\n        }\n        \n        // Set Handler with StashLogHandler\n        LOGGER.addHandler(new StashLogHandler(stash));\n        \n        // Use standar log that uses StashLogHandler\n        LOGGER.log(Level.INFO, \"hello\");\n        \n        try {\n            stash.close();\n        } catch (IOException e) {\n            System.out.println(e.getMessage());\n            System.exit(1);\n        }\n```\n\n#### Spring Boot Integration\nhttps://github.com/wuriyanto48/spring-boot-starter-jvmstash","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuriyanto48%2Fjvm-stash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwuriyanto48%2Fjvm-stash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuriyanto48%2Fjvm-stash/lists"}