{"id":23478363,"url":"https://github.com/opennms/opennms-resync-plugin","last_synced_at":"2025-04-13T17:00:11.448Z","repository":{"id":248893606,"uuid":"830033392","full_name":"OpenNMS/opennms-resync-plugin","owner":"OpenNMS","description":"Repo for a plugin to do alarm resync","archived":false,"fork":false,"pushed_at":"2025-01-22T18:06:23.000Z","size":206,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-16T08:13:12.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/OpenNMS.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-17T13:15:47.000Z","updated_at":"2025-01-22T18:06:26.000Z","dependencies_parsed_at":"2024-07-31T01:26:18.502Z","dependency_job_id":"2f1fcfc8-2af2-4017-97fe-d98489f6348d","html_url":"https://github.com/OpenNMS/opennms-resync-plugin","commit_stats":null,"previous_names":["opennms/opennms-resync-plugin"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fopennms-resync-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fopennms-resync-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fopennms-resync-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fopennms-resync-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenNMS","download_url":"https://codeload.github.com/OpenNMS/opennms-resync-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248750078,"owners_count":21155685,"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":[],"created_at":"2024-12-24T19:19:03.554Z","updated_at":"2025-04-13T17:00:11.407Z","avatar_url":"https://github.com/OpenNMS.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenNMS OpenNMS Resync Plugin Plugin\n\nBuild and install the plugin into your local Maven repository using:\n\n```\nmvn clean install\n```\n\nInstall the .kar file\n```\ncp assembly/kar/target/opennms-resync-plugin.kar /opt/opennms/deploy/\n```\n\nFrom the OpenNMS Karaf shell:\n```\nfeature:install opennms-plugins-resync\n```\n\n\nOnce installed, the plugin makes the following Karaf shell commands available:\n* opennms-resync:set\n* opennms-resync:get\n\nYou can also access the REST endpoint mounted by the plugin:\n* `http://localhost:8980/opennms/rest/resync/ping`: Check if the plugin is installed\n* `http://localhost:8980/opennms/rest/resync/trigger`: To trigger a resync operation\n\nThe `trigger`-endpoint provides two modes which can be selected by the `mode` field: `SET` or `GET`.\n\nThere request for a resync looks like this:\n```http request\nAccept: application/json\nContent-Type: application/json\n  \n{\n  \"resyncId\": \"my unique ID\",\n  \"node\": \"1\",   # Can be a node ID, a foreignSource:foreignId or a node label\n  \"ipInterface\": \"127.0.0.1\",  # Optional, will use primary interface if omitted\n  \"kind\": \"my-device-type\",  # Optional, will look up from config if omitted\n  \"parameters\": {  # Fill in missing parameters or overwrite existing\n    \"param1\": \"all\",\n    \"param2\": \"all\"\n  }\n}\n```\n\n## Configuration\nThe plugin picks up the configuration of the OpenNMS Kafka Producer.\n\nThere is a config file which must exist on `$OPENNMS_HOME/etc/resync.json`.\nIt has the following structure:\n```json\n{\n  \"nodes\": {\n    \"my.node.label\": {\n      \"kind\": \"example-kind\"\n    }\n  },\n  \"kinds\": {\n    \"example-kind\": {\n      \"mode\": \"GET\",  # or \"SET\"\n      \"columns\": {\n        \"param1\": \"1.3.6.0.0.1\",\n        \"param2\": \"1.3.6.0.0.2\"\n      },\n      \"parameters\": {\n        \"param2\": \"example value\"\n      }\n    }\n  }\n}\n```\n\n### Reduction key mapping\nThe configured event should **not** be configured to have a reduction key set.\nIf a reduction key is required on the produced alarms, a special parameter in the event definition could be used.\nThe value of this parameter is set as reduction key in the resulting alarm.\n\n```\n\u003cevents xmlns=\"http://xmlns.opennms.org/xsd/eventconf\"\u003e\n  \u003cevent\u003e\n    \u003cparameter name=\"resync-reduction-key\" value=\"%uei%:%snmphost%:%nodeid%:%parm[#2]%\" expand=\"true\"/\u003e\n  \u003c/event\u003e\n\u003c/events\u003e\n```\n\n## Debugging\nThe plugin creates log messages about session creation and every processed event.\nThese log messages can be found in karaf.log and are marked with bundle ID `org.opennms.plugins.resync.plugin`.\n\nAfter triggering, the first log message to expect is the session creation.\nFollowed by a message for each received alarm associated with this session.\nFinally, the log will show eiter a successful session termination or a session timeout.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennms%2Fopennms-resync-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopennms%2Fopennms-resync-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennms%2Fopennms-resync-plugin/lists"}