{"id":26059690,"url":"https://github.com/orange-cloudfoundry/netdisco-bridges","last_synced_at":"2025-07-27T06:32:21.262Z","repository":{"id":64304762,"uuid":"434348727","full_name":"orange-cloudfoundry/netdisco-bridges","owner":"orange-cloudfoundry","description":"This is a suite of bridges for netdisco","archived":false,"fork":false,"pushed_at":"2023-02-09T14:26:55.000Z","size":115,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-08T13:29:33.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orange-cloudfoundry.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":"2021-12-02T19:27:40.000Z","updated_at":"2022-10-19T14:08:11.000Z","dependencies_parsed_at":"2024-06-20T12:59:01.011Z","dependency_job_id":"aa12bf52-7016-4d6f-b5c2-3c449bb79a77","html_url":"https://github.com/orange-cloudfoundry/netdisco-bridges","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/orange-cloudfoundry/netdisco-bridges","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fnetdisco-bridges","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fnetdisco-bridges/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fnetdisco-bridges/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fnetdisco-bridges/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orange-cloudfoundry","download_url":"https://codeload.github.com/orange-cloudfoundry/netdisco-bridges/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fnetdisco-bridges/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267315961,"owners_count":24068149,"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-27T02:00:11.917Z","response_time":82,"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":[],"created_at":"2025-03-08T13:27:43.711Z","updated_at":"2025-07-27T06:32:21.077Z","avatar_url":"https://github.com/orange-cloudfoundry.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Netdisco-bridges\n\nThis is a suite of bridges for [netdisco](https://github.com/netdisco/netdisco). With this you will be able:\n\n- find devices from criteria with dns queries (with this you can plug [prometheus](https://prometheus.io/) for monitoring)\n- Get reports and device information on openmetrics format (usable on [prometheus](https://prometheus.io/))\n- Use an api for\n    - getting suite of devices (entries) in list or by domain\n    - getting routes associated to entries for setting access to other system\n\n## Getting started\n\n1. Download latest release for your system\n2. Create a `config.yml` file with this content for a dev deployment\n\n```yaml\nlog:\n  level: debug\ndns_server:\n  listen: 127.0.0.1:8853\nhttp_server:\n  listen: 127.0.0.1:8080\nnetdisco:\n  endpoint: https://my.netdisco.com\n  username: user\n  password: 'password'\n\nentries:\n  - domain: all.netdisco\n    routing:\n      scheme: https\n      host: '{{ .IP }}'\n      metadata:\n        entryPoints: [ https ]\n    targets:\n      - q: '%'\n```\n\n3. run with `./netdisco-bridges --config config.yml`\n\n## Usable Bridges\n\n### As DNS\n\n- `dig @127.0.0.1 -p 8853 all.netdisco` - Gave all IPs set for entries\n- `dig @127.0.0.1 -p 8853 all.netdisco SRV` - Gave all dns set for entries\n- `dig @127.0.0.1 -p 8853 all.netdisco TXT` - Gave all devices information in base64 json encoded set for entries\n\n### With API\n\n- `http://127.0.0.1:8080/api/v1/entries/*/routes` - Gave all http routes formatted for all entries\n- `http://127.0.0.1:8080/api/v1/entries/*/routes/traefik` - Gave all http routes formatted for all entries in traefik format for using as provider\n- `http://127.0.0.1:8080/api/v1/entries/{domain entry}/routes?format=default` - Gave http routes formatted for specified entry\n- `http://127.0.0.1:8080/api/v1/entries` - List all entries set\n- `http://127.0.0.1:8080/api/v1/entries/{domain}/devices` - Gave all devices formatted for specified entry\n- `http://127.0.0.1:8080/api/v1/entries/{domain}/hosts` - Gave all devices as list of hostname as found in netdisco\n- `http://127.0.0.1:8080/api/v1/entries/{domain}/ips` - Gave all devices as list of ips as found in netdisco\n- `http://127.0.0.1:8080/api/v1/search/devices?q={q}` - Gave all devices found with q value, return 404 if no device found\n\n### Prometheus metrics\n\nSimply hit `http://127.0.0.1:8080/metrics`\n\n## Configuration\n\nFor understanding config definition format:\n\n- `[]` means optional (by default parameter is required)\n- `\u003c\u003e` means type to use\n\n### Root configuration in config.yml\n\n```yaml\ndns_server:\n  # set to true to disable dns server\n  [ disabled: \u003cbool\u003e ]\n  # Listen address for listening for dns\n  [ listen: \u003cstring\u003e | default = 0.0.0.0:53 ]\n\nhttp_server:\n  # set to true to disable http server\n  [ disabled: \u003cbool\u003e ]\n  # Listen address for listening for http\n  [ listen: \u003cstring\u003e | default = 0.0.0.0:8080 or 0.0.0.0:8443 if ssl enabled ]\n  # set to true to enable tls\n  [ enable_ssl: \u003cbool\u003e ]\n  tls_pem:\n    # cert chain in pem format when tls enabled\n    [ cert_chain: \u003cstring\u003e ]\n    # private key in pem format when tls enabled\n    [ private_key: \u003cstring\u003e ]\n\nlog:\n  # log level to use for server\n  # you can chose: `trace`, `debug`, `info`, `warn`, `error`, `fatal` or `panic`\n  [ level: \u003cstring\u003e | default = info ]\n  # Set to true to force not have color when seeing logs\n  [ no_color: \u003cbool\u003e ]\n  # et to true to see logs as json format\n  [ in_json: \u003cbool\u003e ]\n\nnetdisco:\n  # url pointing to your netdisco\n  endpoint: \u003cstring\u003e\n  # Username for connecting to netdisco\n  username: \u003cstring\u003e\n  # Password for connecting to netdisco\n  password: \u003cstring\u003e\n  # set to true to not verify ssl certificate\n  [ insecure_skip_verify: \u003cbool\u003e ]\n\n# Netdisco-bridges load devices set in entries async for performance and caching purpose over netdisco\n# you can change workers profile here\nworkers:\n  # number of workers to use for loading entries\n  # Set more than entries is useless\n  [ nb_workers: \u003cint\u003e | default = 5 ]\n  # Interval for data to be refreshed from netdisco\n  [ refresh_interval: \u003cduration\u003e | default = \"25m\" ]\n\n# Set to true to disable metrics from netdisco reports\n[ disable_reports_metrics: \u003cbool\u003e ]\n\n# list of entry (defined below)\nentries:\n- \u003centry\u003e\n```\n\n### entry configuration\n\n```yaml\n# Domain will be used for dns/http api for getting list of devices associated\ndomain: \u003cstring\u003e\n# set to true if you want to get netdisco_device_info metrics for getting information about devices in this domain\n# in openmetrics format for prometheus usage\n[ enable_metrics: \u003cbool\u003e ]\n# Netdisco search criteria, at least one is required\ntargets:\n  # Partial match of Device contact, serial, chassis ID, module serials, location, name, description, dns, or any IP alias\n  # % can give all device\n  [ q: \u003cstring\u003e ]\n  # Partial match of the Device name\n  [ name: \u003cstring\u003e ]\n  # Partial match of the Device location\n  [ location: \u003cstring\u003e ]\n  # Partial match of any of the Device IP aliases\n  [ dns: \u003cstring\u003e ]\n  # IP or IP Prefix within which the Device must have an interface address\n  [ ip: \u003cstring\u003e ]\n  # Partial match of the Device description\n  [ description: \u003cstring\u003e ]\n  # MAC Address of the Device or any of its Interfaces\n  [ mac: \u003cstring\u003e ]\n  # Exact match of the Device model\n  [ model: \u003cstring\u003e ]\n  # Exact match of the Device operating system\n  [ os: \u003cstring\u003e ]\n  # Exact match of the Device operating system version\n  [ os_ver: \u003cstring\u003e ]\n  # Exact match of the Device vendor\n  [ vendor: \u003cstring\u003e ]\n  # OSI Layer which the device must support\n  [ layers: \u003cstring\u003e ]\n  # If true, all fields (except “q”) must match the Device\n  [ matchall: \u003cbool\u003e ]\n# routing let create an http route based on criteria for each device found in entry\n# if not set no route will be associated to this set of devices\n# config defined below\n[ routing: \u003crouting\u003e ]\n```\n\n### routing configuration\n\nTemplating is allowed here, you have access to all function defined here: https://masterminds.github.io/sprig/\n\nDevice information become accessible for each value, device has those informations:\n\n- `UptimeAge`\n- `Location`\n- `SinceLastArpnip`\n- `FirstSeenStamp`\n- `OsVer`\n- `Name`\n- `LastArpnipStamp`\n- `Model`\n- `SinceFirstSeen`\n- `IP`\n- `Serial`\n- `SinceLastMacsuck`\n- `DNS`\n- `SinceLastDiscover`\n- `LastMacsuckStamp`\n- `LastDiscoverStamp`\n\n```yaml\n# Scheme to use to create route\n[ scheme: \u003cstring|template\u003e | default = \"https\" ]\n# Port for accessing to route\n[ port: \u003cstring|template\u003e | default = not set ]\n# Host to set for the route\n[ host: \u003cstring|template\u003e | default = not set ]\n# metadata for let formatter do its magic\n# for now, only traefik use it\n# you can set `entryPoints` for traefik\n# `enableTls` to true to enable resolve on traefik on tls also\n# 'middlewares' is a list of string setting middleare to use on traefik\nmetadata:\n  \u003cstring|template\u003e: \u003cmap|template\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forange-cloudfoundry%2Fnetdisco-bridges","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forange-cloudfoundry%2Fnetdisco-bridges","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forange-cloudfoundry%2Fnetdisco-bridges/lists"}