Monitoring Flussonic with Prometheus
You can monitor your Flussonic server(s) and collect the data with the help of Prometheus.
What is Prometheus?
Prometheus is an open-source systems monitoring and alerting toolkit. It stores the data in a time series database, built specifically for handling metrics and events or time-stamped measurements. It contains the data in the form of "key (metric's name) - value" pairs for each point in time. This way, it is accessed effectively.
For data visualization Prometheus is integrated with Grafana.
Prometheus provides the following features:
- Quick and efficient data access due to time series database.
- Alerts via methods such as email, on-call notification systems, and chat platforms (Slack, Telegram, etc.) so that you can choose the most suitable notification sending method for yourself.
- Displays data of a group of servers on one dashboard, which is convenient for viewing the status of multiple servers at a time.
- Stores data for some time, which allows you to monitor the state of the server or a group of servers over time;
- Monitoring of the server as well as its separate streams.
Getting data from Flussonic
To configure Prometheus to monitor Flussonic, follow these steps:
Configure Prometheus to monitor your Flussonic servers by adding the following
scrape_configs to the
scrape_configs: - job_name: 'flussonic_server' metrics_path: /streamer/api/v3/config basic_auth: username: 'demo' password: 'pass' params: format: [openmetrics] static_configs: - targets: ['localhost:7081','localhost:7082'] - job_name: 'flussonic_streams' metrics_path: /streamer/api/v3/streams basic_auth: username: 'demo' password: 'pass' params: format: [openmetrics] static_configs: - targets: ['localhost:7081','localhost:7082']
job_nameis the name of the process.
flussonic_serveris for the server, and
flussonic_streamsis for the streams. You can track each one of them or both.
metrics_pathis the path to the metrics calculated by Flussonic. To see the list of Flussonic metrics that Prometheus fetches, refer to the following Flussonic API endpoints:
usernameis the Flussonic user login. You can use the Administrator (
edit_auth) or a read-only user (
view_auth) credentials. Refer to Login and password section for more information about managing users in Flussonic.
passwordis the Flussonic user password. You can use the Administrator (
edit_auth) or a read-only user (
targetsis the list of server URLs to monitor.
Choosing metrics for monitoring
The Flussonic Exporter dashboard presents the most common metrics such as memory and CPU usage, stream traffic, etc. You may use other metrics depending on what Flussonic features and products you have configured, for example:
pusher_*metrics to monitor streams and/or multiplexers pushing. Those metrics correspond to multiplexer.pushes.stats and stream.pushes.stats API parameters.
- Set up Grafana Alerting for
stream_transcoder_overloadedmetric to receive notifications if transcoder is overloaded on any of your streams. The metric corresponds to transcoder_overloaded API parameter. Please note that this metric will only be available if the transcoder is configured and enabled for the corresponding stream.
- If you have Flussonic Central installed, feel free to use metrics returned by GET /streamer/api/v3/config request to the Central server.
You may need to modify the
prometheus.yml to include new endpoints and targets to visualise metrics other than from
/streams endpoints of Flussonic Media Server.