Download the PHP package easybill/serverdensity_udp_metric_client without Composer
On this page you can find all versions of the php package easybill/serverdensity_udp_metric_client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download easybill/serverdensity_udp_metric_client
More information about easybill/serverdensity_udp_metric_client
Files in easybill/serverdensity_udp_metric_client
Package serverdensity_udp_metric_client
Short Description Client for UDP-Agent https://github.com/easybill/serverdensity-udp-agent
License MIT
Informations about the package serverdensity_udp_metric_client
Prometheus UDP Monitor
Installing
This project is build on each release for Linux & Mac x86, aarch64. You can download these pre-build binaries from the releases tab.
Other Platforms
For other platforms you need to compile this lib yourself:
- Install Rust and Cargo
- Clone this repository
- Run
cargo b --release --bin=openmetrics_udpserver
- The executable is located in
target/release/openmetrics_udpserver
Sending Metrics
The UDP-Server will collect sent metrics and make them available through a http endpoint using the openmetrics-text encoding. Sent values for the metric types Min, Average & Peak are just single values (if a value is received twice before collection, the old value gets overridden). The Sum metric type will sum up all received values until a collection happens - then the counter is reset to 0.
From performance perspective you could send thousands of messages per second.
PHP
We provide a small php client
Data Format
The data format that must be used to send data to the server must be as follows:
- u16: representation of the metric type (see table below)
- i32: the data count
- the utf-8 encoded name of the metric
All numbers must be encoded using big endian byte order.
Metric Types:
Type | ID |
---|---|
Sum | 42 |
Average | 43 |
Peak | 44 |
Min | 45 |
Installing + Supervisor
now you can test if the server starts:
open /etc/supervisor/conf.d/openmetrics_udpserver.conf
and add:
Check the update of the new process
supervisorctl status openmetrics_udpserver