{"id":26233973,"url":"https://github.com/teragrep/akv_01","last_synced_at":"2025-04-22T12:11:36.295Z","repository":{"id":269032676,"uuid":"904722319","full_name":"teragrep/akv_01","owner":"teragrep","description":"Teragrep Key Value Mapping for Microsoft Azure EventHub","archived":false,"fork":false,"pushed_at":"2025-04-08T06:42:34.000Z","size":93,"stargazers_count":0,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T07:37:37.916Z","etag":null,"topics":["azure","eventhub","syslog"],"latest_commit_sha":null,"homepage":"https://teragrep.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teragrep.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":"2024-12-17T12:35:51.000Z","updated_at":"2025-04-08T06:42:38.000Z","dependencies_parsed_at":"2024-12-20T13:19:13.617Z","dependency_job_id":"76f777b4-8086-4f5a-a4b3-e6822cb2d11a","html_url":"https://github.com/teragrep/akv_01","commit_stats":null,"previous_names":["teragrep/akv_01"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fakv_01","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fakv_01/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fakv_01/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fakv_01/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teragrep","download_url":"https://codeload.github.com/teragrep/akv_01/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250237834,"owners_count":21397401,"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","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":["azure","eventhub","syslog"],"created_at":"2025-03-13T01:18:20.650Z","updated_at":"2025-04-22T12:11:36.276Z","avatar_url":"https://github.com/teragrep.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"// Before publishing your new repository:\n// 1. Write the readme file\n// 2. Update the issues link in Contributing section in the readme file\n// 3. Update the discussion link in config.yml file in .github/ISSUE_TEMPLATE directory\n\n= Teragrep Key Value Mapping for Microsoft Azure EventHub (akv_01)\n\n// Add a short description of your project. Tell what your project does and what it's used for.\n\nAllows to further process messages received from EventHub via plugins that can be defined for each of the resourceIds.\n\n== Features\n\n// List your project's features\n* Allows the resourceIds present in the events' properties to be mapped to specific plugins.\n* Plugins can implement processing, which can refine the final syslog message, such as specifying a more applicable app name or hostname based on the event data.\n* Plugins are to be specified in a JSON-formatted configuration file, where each resourceId is mapped to a specific PluginFactory object. Each PluginFactory can also\nhave its own configuration file.\n* In case a resourceId is unexpected, the default PluginFactory class can be used instead. In case any exception arises, the exception PluginFactory class should be used.\n\n== Documentation\n\nSee the official documentation on https://docs.teragrep.com[docs.teragrep.com].\n\n== Limitations\n\n// If your project has limitations, please list them. Otherwise remove this section.\n\n== How to [compile/use/implement]\n\n// add instructions how people can start to use your project\n=== Compile using Maven\n\nThe project can be compiled using Maven. It is recommended to use Java 11.\n\n[source,bash]\n----\n$ JAVA_HOME=/usr/lib/jvm/java-11-openjdk mvn clean package\n----\n\n=== Use in another project\nThe project can be added to another project as a dependency using Maven. Add the following into your project's `pom.xml` file:\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.teragrep\u003c/groupId\u003e\n    \u003cartifactId\u003eakv_01\u003c/artifactId\u003e\n    \u003cversion\u003ex.y.z\u003c/version\u003e \u003c!-- Replace with latest version --\u003e\n\u003c/dependency\u003e\n----\n\n=== Basic usage\n\nThe `PluginMap` object expects JSON with the following type of structure:\n\n[source,json]\n----\n{\n  \"defaultPluginFactoryClass\": \"com.teragrep.akv_01.plugin.PluginFactory\",\n  \"exceptionPluginFactoryClass\": \"com.teragrep.akv_01.plugin.ExceptionPluginFactory\",\n  \"resourceIds\": [\n    {\n      \"resourceId\": \"123\",\n      \"pluginFactoryClass\": \"com.teragrep.akv_01.plugin.PluginFactory123\",\n      \"pluginFactoryConfig\": \"src/test/resources/123plugin.json\"\n    },\n    {\n      \"resourceId\": \"456\",\n      \"pluginFactoryClass\": \"com.teragrep.akv_01.plugin.PluginFactory456\",\n      \"pluginFactoryConfig\": \"\"\n    }\n  ]\n}\n----\nThe `defaultPluginFactoryClass` is used in cases where the resourceId is not found in the configuration, and it is mandatory.\nThe `exceptionPluginFactoryClass` is intended to be used if any exception occurs in the `defaultPluginFactoryClass`, and it is mandatory.\nThe `resourceIds` array is also mandatory, and each item in the array must be a JsonObject with keys `resourceId`, `pluginFactoryClass` and `pluginFactoryConfig`.\n`pluginFactoryClass` is the full class name of any class implementing the `PluginFactory` interface. `pluginFactoryConfig` is the path to a JSON-formatted file, to be used by the specified pluginFactory.\nThe `pluginFactoryConfig` JSON-formatted file does not have any specified schema, however it is recommended that the top-level structure is an array or object to be able to use the included `JsonFile` object.\n\nThe `PluginMap` can be initialized by using the included `JsonFile` object, and the default pluginFactory class name, exception pluginFactory class name and resourceId to config mapping can be retrieved:\n\n[source,java]\n----\nfinal PluginMap pluginMap = new PluginMap(new JsonFile(\"/path/to/json\").asJsonStructure());\nfinal Map\u003cString, PluginFactoryConfig\u003e configs = pluginMap.asUnmodifiableMap();\nfinal String defaultPluginFactoryClassName = pluginMap.defaultPluginFactoryClassName();\nfinal String exceptionPluginFactoryClassName = pluginMap.exceptionPluginFactoryClassName();\n----\n\nThe values retrieved from `PluginMap` can be used to initialize the PluginFactories:\n\n[source,java]\n----\nString className = defaultPluginClassName;\nString configPath = \"\";\nif (configs.containsKey(\"\u003cresourceId here\u003e\")) {\n    className = configs.get(\"\u003cresourceId here\u003e\").pluginFactoryClassName();\n    configPath = configs.get(\"\u003cresourceId here\u003e\").configPath();\n}\n\nfinal PluginFactoryInitialization pluginFactoryInit = new PluginFactoryInitialization(className);\nfinal PluginFactory pluginFactory = pluginFactoryInit.pluginFactory();\n----\n\nWith the initialized `PluginFactory`, the plugin can be created, and the JSON config path can be provided:\n\n[source,java]\n----\nfinal Plugin plugin = pluginFactory.plugin(configPath);\n----\n\nWith the created `Plugin`, events can be processed into refined `SyslogMessages`:\n\n[source,java]\n----\nfinal SyslogMessage syslogMessage = plugin.syslogMessage(...);\n----\n\nThe actual process inside the `Plugin` is dependent on the implementation.\n\n== Contributing\n\n// Change the repository name in the issues link to match with your project's name\n\nYou can involve yourself with our project by https://github.com/teragrep/akv_01/issues/new/choose[opening an issue] or submitting a pull request.\n\nContribution requirements:\n\n. *All changes must be accompanied by a new or changed test.* If you think testing is not required in your pull request, include a sufficient explanation as why you think so.\n. Security checks must pass\n. Pull requests must align with the principles and http://www.extremeprogramming.org/values.html[values] of extreme programming.\n. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).\n\nRead more in our https://github.com/teragrep/teragrep/blob/main/contributing.adoc[Contributing Guideline].\n\n=== Contributor License Agreement\n\nContributors must sign https://github.com/teragrep/teragrep/blob/main/cla.adoc[Teragrep Contributor License Agreement] before a pull request is accepted to organization's repositories.\n\nYou need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep's repositories.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteragrep%2Fakv_01","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteragrep%2Fakv_01","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteragrep%2Fakv_01/lists"}