opamp-rs is in preview and licensed under the New Relic Pre-Release Software Notice. |
---|
Open Agent Management Protocol (OpAMP) is a network protocol for remote management of large fleets of data collection Agents.
OpAMP allows Agents to report their status to and receive configuration from a Server and to receive agent package updates from the server. The protocol is vendor-agnostic, so the Server can remotely monitor and manage a fleet of different Agents that implement OpAMP, including a fleet of mixed agents from different vendors.
This repository is an OpAMP client implementation in Rust, using HTTP as transport.
The library is not available on crates.io
for now, but you can still use it from this repository by adding the following line to your project's Cargo.toml
:
[dependencies]
opamp-client = { git = "https://github.com/newrelic/newrelic-opamp-rs.git", tag = "0.0.32" }
The library is designed to be generic over a provided HTTP client, such as reqwest
. Make sure your client type implements the trait HttpClient
and call NotStartedHttpClient::new
with it along with an implementation of AgentCallbacks
and your StartSettings
. Use with_interval
to modify the polling frequency.
After the above steps, calling start
on the resulting value will start the server and return an owned value for the started server. This will be an implementation of Client
with which you can call methods to perform the supported OpAMP operations according to the specification, such as set_agent_description
, set_health
, set_remote_config_status
and so on.
Calling stop
on this value will shut it down.
For more details, please check the documentation page.
The usual way of testing Rust crates is enough.
cargo test --locked --all-features --all-targets
If you find any problems while using the library or have a doubt, please feel free to open an Issue, where the New Relic maintainers of this project will be able to help.
We encourage your contributions to improve [project name]! Keep in mind that when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project.
If you have any questions, or to execute our corporate CLA (which is required if your contribution is on behalf of a company), drop us an email at [email protected].
As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.
If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.
If you would like to contribute to this project, review these guidelines.
To all contributors, we thank you! Without your contribution, this project would not be what it is today.
opamp-rs
is licensed under the New Relic Pre-Release Software Notice.
opamp-rs
also uses source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the third-party notices document.
Link (private, for NR employees).