{"id":23478406,"url":"https://github.com/opennms/nephron","last_synced_at":"2025-07-10T12:39:25.389Z","repository":{"id":44160303,"uuid":"254395709","full_name":"OpenNMS/nephron","owner":"OpenNMS","description":"Streaming analytics for the OpenNMS platform","archived":false,"fork":false,"pushed_at":"2023-09-05T22:04:12.000Z","size":1184,"stargazers_count":5,"open_issues_count":4,"forks_count":3,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-04-15T15:36:15.910Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.opennms.com/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenNMS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-04-09T14:34:39.000Z","updated_at":"2023-03-23T21:35:21.000Z","dependencies_parsed_at":"2022-09-03T21:30:47.610Z","dependency_job_id":"a938bfad-4104-4d52-9357-883a3eba7da0","html_url":"https://github.com/OpenNMS/nephron","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fnephron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fnephron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fnephron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenNMS%2Fnephron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenNMS","download_url":"https://codeload.github.com/OpenNMS/nephron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231143280,"owners_count":18334367,"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:22.512Z","updated_at":"2024-12-24T19:19:26.336Z","avatar_url":"https://github.com/OpenNMS.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nephron [![CircleCI](https://circleci.com/gh/OpenNMS/nephron/tree/master.svg?style=svg)](https://circleci.com/gh/OpenNMS/nephron/tree/master)\n\nStreaming analytics for flows.\n\n## Architecture\n\nSentinel -\u003e Kafka -\u003e Nephron / Beam / Flink -\u003e (Elasticsearch | Cortex | Kafka)\n\n## Building\n\nBuild \u0026 run:\n```\nmvn clean package\n```\n\n## Run on Flink\n\n\u003e  We require Flink 1.10.x \n\nRun on Flink\n```\n./bin/flink run --parallelism 1 --class org.opennms.nephron.Nephron /root/git/nephron/assemblies/flink/target/nephron-flink-bundled-*.jar --runner=FlinkRunner --jobName=nephron --checkpointingInterval=600000 --autoCommit=false\n```\n\n## Persistence\n\nSee: [persistence](persistence.md).\n\n### Upgrading the code\n\nTo restart the job and keep the current state, see the instructions bellow.\n\nTo restart the job without keeping the state, cancel the job and re-run a new one.\n\n### Metrics\n\n#### Prometheus\n\nLoad Prometheus exporter on Flink:\n```\ncp opt/flink-metrics-prometheus-1.9.2.jar lib/\n```\n\nAppend to `conf/flink-conf.yaml`:\n```\nmetrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter\nmetrics.reporter.prom.port: 9250-9260\n```\n#### SLF4J\n\nLoad the SLF4J report on Flink:\n```\ncp opt/flink-metrics-slf4j-1.9.2.jar lib/\n```\n\nAppend to `conf/flink-conf.yaml`:\n```\nmetrics.reporter.slf4j.class: org.apache.flink.metrics.slf4j.Slf4jReporter\nmetrics.reporter.slf4j.interval: 60 SECONDS\n```\n\n### Restart job w/ savepoints\n\nRebuild the artifact in place.\n\nFind the job id:\n```\n./bin/flink list\n```\n\nStop the job with a savepoint:\n```\n./bin/flink stop 99d87bc4d3a271a72f3f89dfe5a904d7 -p /tmp/state\n```\n\nNow restart the job with:\n```\n./bin/flink run --parallelism 1 --fromSavepoint /tmp/state/savepoint-5cfdc5-00788010255a --class org.opennms.nephron.Nephron /root/git/nephron/assemblies/flink/target/nephron-flink-bundled-*.jar --runner=FlinkRunner --jobName=nephron --checkpointingInterval=600000 --autoCommit=false\n```\n\n## Elasticsearch\n\nInstall the template using:\n```\ncurl -XPUT -H 'Content-Type: application/json' http://localhost:9200/_template/netflow_agg -d@./main/src/main/resources/netflow_agg-template.json\n```\n\n### OpenNMS Configuration\n\nOn OpenNMS or Sentinel, enable the Kafka exporter for flows:\n```\nconfig:edit org.opennms.features.flows.persistence.kafka\nconfig:property-set topic opennms-flows\nconfig:property-set bootstrap.servers 127.0.0.1:9092\nconfig:update\n\nconfig:edit org.opennms.features.flows.persistence.elastic\nconfig:property-set enableForwarding true\nconfig:update\n```\n\n# References\n\n* Streaming 101 - https://www.oreilly.com/radar/the-world-beyond-batch-streaming-101/\n* Streaming 102 - https://www.oreilly.com/radar/the-world-beyond-batch-streaming-102/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennms%2Fnephron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopennms%2Fnephron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennms%2Fnephron/lists"}