{"id":24756350,"url":"https://github.com/dalance/prosafe_exporter","last_synced_at":"2025-04-05T07:03:23.813Z","repository":{"id":33091420,"uuid":"151413078","full_name":"dalance/prosafe_exporter","owner":"dalance","description":"Prometheus exporter for NETGEAR switches supported by ProSAFE Plus utility","archived":false,"fork":false,"pushed_at":"2025-03-27T20:35:42.000Z","size":602,"stargazers_count":45,"open_issues_count":5,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T06:03:52.536Z","etag":null,"topics":["prometheus-exporter","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/dalance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"dalance"}},"created_at":"2018-10-03T12:59:29.000Z","updated_at":"2025-03-10T20:31:03.000Z","dependencies_parsed_at":"2023-11-21T21:31:42.618Z","dependency_job_id":"a7d4e905-b137-4191-a30b-4eadc2214a9a","html_url":"https://github.com/dalance/prosafe_exporter","commit_stats":{"total_commits":181,"total_committers":8,"mean_commits":22.625,"dds":0.569060773480663,"last_synced_commit":"229fd64a0588df822492e31f1def0992c97c8fe5"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fprosafe_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fprosafe_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fprosafe_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fprosafe_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dalance","download_url":"https://codeload.github.com/dalance/prosafe_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299831,"owners_count":20916190,"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":["prometheus-exporter","rust"],"created_at":"2025-01-28T13:51:05.823Z","updated_at":"2025-04-05T07:03:23.774Z","avatar_url":"https://github.com/dalance.png","language":"Rust","funding_links":["https://github.com/sponsors/dalance"],"categories":[],"sub_categories":[],"readme":"# prosafe_exporter\n[Prometheus](https://prometheus.io) exporter for NETGEAR switches supported by ProSAFE Plus utility.\n\n[![Actions Status](https://github.com/dalance/prosafe_exporter/workflows/Regression/badge.svg)](https://github.com/dalance/prosafe_exporter/actions)\n[![Crates.io](https://img.shields.io/crates/v/prosafe_exporter.svg)](https://crates.io/crates/prosafe_exporter)\n[![codecov](https://codecov.io/gh/dalance/prosafe_exporter/branch/master/graph/badge.svg)](https://codecov.io/gh/dalance/prosafe_exporter)\n\n## Exported Metrics\n\n| metric                       | description                        | labels                         |\n| ---------------------------- | ---------------------------------- | ------------------------------ |\n| prosafe_up                   | The last query is successful       |                                |\n| prosafe_receive_bytes_total  | Incoming transfer in bytes         | port                           |\n| prosafe_transmit_bytes_total | Outgoing transfer in bytes         | port                           |\n| prosafe_error_packets_total  | Transfer error in packets          | port                           |\n| prosafe_link_speed           | Link speed in Mbps                 | port                           |\n| prosafe_build_info           | prosafe_exporter Build information | version, revision, rustversion |\n\n## Tested Switches\n\n- XS708E\n- GS308E\n- GS116Ev2\n- GS108Ev3\n- GS105Ev2\n- GS108PEv3\n- JGS524PE\n\n## Install\nDownload from [release page](https://github.com/dalance/prosafe_exporter/releases/latest), and extract to any directory ( e.g. `/usr/local/bin` ).\nSee the example files in `example` directory as below.\n\n| File                             | Description                  |\n| -------------------------------- | ---------------------------- |\n| example/prosafe_exporter.service | systemd unit file            |\n\n\nIf the release build doesn't fit your environment, you can build and install from source code.\n\n```\ncargo install prosafe_exporter\n```\n\n## Usage\n\n```\nprosafe_exporter --web.listen-address=\":9493\"\n```\n\nThe default listen port is 9493.\nIt can be changed by `--web.listen-address` option.\n\nThe ProSAFE switches need to have the Switch Management Mode set to \"Web browser and Plus Utility\" for the exporter to work correctly.\n\n## Prometheus Server Configuration\n\nThe target switches of prosafe_exporter can be configured by the pair of hostname and network interface name ( e.g. `switch1:eth0` ).\nThe network interface must be belonged to the same subnet as the switch.\n\nThe Prometheus server configuration is like [SNMP exporter](https://github.com/prometheus/snmp_exporter).\nThe example of a configuration is below:\n\n```yaml\n- job_name: 'prosafe'\n  static_configs:\n      - targets: ['switch1:eth0', '192.128.0.100:enp1s0', 'switch2:*'] # target switches by hostname:if_name.\n  metrics_path: /probe\n  relabel_configs:\n    - source_labels: [__address__]\n      target_label: __param_target\n    - source_labels: [__param_target]\n      target_label: instance\n    - target_label: __address__\n      replacement: 127.0.0.1:9493 # The prosafe_exporter's real hostname:port.\n```\n\n`if_name` can be `*`. If `*` is used, prosafe_exporter will search an accessible network interface automatically.\n\n## Query Example\n\nOutgoing data rate of `port1` on `switch1:eth0` is below.\n\n```\nrate(prosafe_transmit_bytes_total{instance=\"switch1:eth0\", port=\"1\"}[1m])\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Fprosafe_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdalance%2Fprosafe_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Fprosafe_exporter/lists"}