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:
Step 1:
Download and install Prometheus. You can use the Prometheus Getting Started guide.
Step 2:
Configure Prometheus to monitor your Flussonic servers by adding the following scrape_configs
to the prometheus.yml
file:
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:80']
- job_name: 'flussonic_streams'
metrics_path: /streamer/api/v3/streams
basic_auth:
username: 'demo'
password: 'pass'
params:
format: [openmetrics]
static_configs:
- targets: ['localhost:80']
where:
job_name
is the name of the process.flussonic_server
is for the server, andflussonic_streams
is for the streams. You can track each one of them or both.-
metrics_path
is 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:/streamer/api/v3/config
is for the server metrics./streamer/api/v3/streams
is for the streams metrics.
-
username
is 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. password
is the Flussonic user password. You can use the Administrator (edit_auth
) or a read-only user (view_auth
) credentials.targets
is the list of servers to monitor. Prometheus collects server data using the HTTP port with Flussonic Media Server API running. To enable Flussonic Media Server API on the HTTP port, open the web interface, go to the Config > Settings > Listeners and turn on the Api switch to the right of the port number. Specify the server URL like so:FLUSSONIC-IP:FLUSSONIC-API-PORT
. If you have Prometheus installed on the Flussonic server with the default HTTP port 80, specifylocalhost:80
.
Step 3:
Download and install Grafana to your server. Import the Flussonic Exporter dashboard to your Grafana portal.
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:
- Visualize
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_overloaded
metric 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
Central-API: GET streamer/api/v3/config
request to the Central server.
Note
You may need to modify the prometheus.yml
to include new endpoints and targets to visualise metrics other than from /config
and /streams
endpoints of Flussonic Media Server.