Monitoring Flussonic with Prometheus
You can monitor your Flussonic server(s) and collect the data with the help of Prometheus. In recent versions server monitoring was performed through SNMP, parsing JSON files and Pulse tab in Flussonic UI.
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.
Why Prometheus?
- 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;
- monitors not only the whole server but also its separate streams.
Getting data from Flussonic
Here we will give you some instructions on how to access the metric values by Flussonic.
There are only a few simple steps:
Step 1:
First, you should download Prometheus for your platform and install it. This guide will be of great use for you.
Step 2:
Configure Prometheus through the prometheus.yml
file adding these lines to the basic configuration:
scrape_configs:
- job_name: 'myflussonic'
metrics_path: /flussonic/api/metrics
basic_auth:
username: 'flussonic'
password: 'password'
static_configs:
- targets: ['FLUSSONIC-IP:80']
Parameters:
job_name
— the name of the process;matrics_path
— path to the metrics calculated by Flussonic;username
— your username as in Flussonic user account;password
— your password as in Flussonic user account;targets
— list of server URLs that you want to monitor.
Step 3:
Add a dashboard to Grafana, using this link to visualize your data.
Metrics to monitor
Here are metrics for monitoring both the whole server and separate streams.
Server metrics
Metrics | Unit | Description |
---|---|---|
flussonic_version_info | - | Current Flussonic version |
flussonic_boot_time_seconds | s (in Unixtime) | Flussonic boot time |
flussonic_memory_usage | % | Memory usage |
flussonic_clients | - | Clients number |
flussonic_streams | - | Streams number |
flussonic_opened_files | - | Opened files number |
flussonic_scheduler_load | - | Erlang scheduler |
flussonic_cpu_usage | % | CPU usage |
flussonic_disk_size | bytes | Disk size |
flussonic_disk_usage | % | Disk usage |
flussonic_disk_io_usage | % | Disk I/O usage |
flussonic_net_input_bytes | bytes | Network interface input |
flussonic_net_output_bytes | bytes | Network interface output |
flussonic_dvb_card_strength | - | DVB card signal stength |
flussonic_gpu_dec | % | GPU decoder usage |
flussonic_gpu_enc | % | GPU encoder usage |
flussonic_gpu_temp | °C (degree Celsius) | GPU temperature |
Stream metrics
Metrics | Unit | Description |
---|---|---|
flussonic_stream_client_delay | ms | Client delay |
flussonic_stream_bytes_in | bytes | Number of input bytes |
flussonic_stream_bytes_out | bytes | Total number of bytes in the output. Calculated as a number of packets multiplied by 188. |
flussonic_stream_bitrate | kB/s | Bitrate |
flussonic_stream_start_running_at | ms | Start time |
flussonic_stream_retry_count | - | Number of automatic retries |
flussonic_stream_client_count | - | Number of clients |
flussonic_stream_dvr_info_disk_size | bytes | DVR disk size |
flussonic_stream_dvr_info_depth | s | DVR depth |
flussonic_stream_dvr_info_duration | s | DVR duration |
flussonic_cbr_mpegts_trimmed | bytes | Number of trimmed data. Calculated for MPEG-TS muxer. |
flussonic_bytes_out | bytes | Number of output bytes. Calculated for payload, stuffing and fillers separately. |
Now you can monitor your Flussonic server or a group of servers as well as streams with Prometheus and Grafana.