1. Домой
  2. Документы
  3. Smarty (English version)
  4. Smarty configuring and management
  5. Setting up monitoring and alarm

Setting up monitoring and alarm

Smarty has built-in tools for monitoring Multicast streams and device metrics.

The stream monitoring module allows you to analyze Multicast streams on various parts of the network by polling microts agents (analyzers), which read and analyze streams on the server. Parameters such as bitrate, MPEG-TS structure, CC, PES, PAT errors, synchronization loss, video/audio loss and scrambling are calculated and checked.

The device metrics monitoring and device management module is part of a separate product — MVision, but is configured in the general Smarty configuration file.

Setting up the Multicast stream monitoring module

The following options must be configured in the Smarty configuration file:

  • MONITORING_CONCURRENT_STREAMS_COUNT — the number of simultaneously polled streams from analyzers. This setting affects the performance and speed of updating data on the thread monitoring page. Data type: int. Default is 15.
  • MONITORING_AGENT_SOCKET_TCP_BUFFER — size of the data buffer (in bytes) when receiving a response from the analyzer. Data type: int. Default is 4096.
  • MONITORING_STREAM_CHECKS_TTL_DAYS — life period (in days) of stream samples and events; after this period, the data is automatically deleted. Data type: int. Default is 30.
  • MONITORING_STREAM_TEST_DURATION — duration of waiting for a separate stream from analyzers (in seconds). This setting affects the performance and speed of updating data on the thread monitoring page. Default is 10.

Setting example:

MONITORING_CONCURRENT_STREAMS_COUNT = 15

MONITORING_STREAM_TEST_DURATION = 10

MONITORING_AGENT_SOCKET_TCP_BUFFER = 4096

MONITORING_STREAM_CHECKS_TTL_DAYS = 30

Analyzers are polled using the check_streams service command, more details.

In order to set up the analyzer on the server, you need to install the microts package (the analyzer itself) and microts_agent (the service that receives requests from Smarty and launches microts processes). These packages are provided as part of Smarty and are available for download on the operator’s account page.

Adding analyzer servers and streams that need to be analyzed is carried out in the control panel; more details about this can be found in the corresponding section of the documentation: link.

Setting up the device monitoring module

A MongoDB server is used to save metrics data and system information of customer devices. This functionality is only available if a license for the MVision product is installed.

The minimum version of MongoDB required to work is 3.4.

MongoDB connection settings are specified by the following options in the Smarty configuration file:

  • DEVMON_SINGLE_CLIENT — enable single access mode for device monitoring. Provides equal access to both the functionality and the entire device monitoring database for all operators in Smarty. In single access mode, each operator can have access to devices that do not belong to the customers of this operator. Data type: bool. Default is False.
  • MONGODB_MONITORING_HOST — MongoDB server address. Data type: string. Default is 127.0.0.1.
  • MONGODB_MONITORING_PORT — MongoDB server port. Data type: int. Default is 27017.
  • MONGODB_MONITORING_NAME — database name. Data type: string. Default is smarty_device_monitoring.
  • MONGODB_MONITORING_USERNAME — username for authorization. Data type: string.
  • MONGODB_MONITORING_PASSWORD — password for authorization. Data type: string.
  • MONGODB_MONITORING_AUTH_METHOD — authorization method. The authorization method depends on the version of MongoDB. Data type: string. Default is MONGODB-CR.

In the INSTALLED_APPS section of the Smarty configuration file, you need to add the device_monitoring module, then re-migrate the data (migrate command) and restart uwsgi.

Setting example:

MONGODB_MONITORING_HOST = ‘127.0.0.1’

MONGODB_MONITORING_PORT = 27017

MONGODB_MONITORING_NAME = ‘smarty_device_monitoring’

MONGODB_MONITORING_USERNAME = ‘admin’

MONGODB_MONITORING_PASSWORD = ‘password’

MONGODB_MONITORING_PUSH_TIMEOUT = 150

MONGODB_MONITORING_VIEW_TIMEOUT = 600000

MONGODB_MONITORING_AUTH_METHOD = ‘MONGODB-CR’

INSTALLED_APPS += (

    ‘device_monitoring’,

)

Alarm setup

Adding triggers and contacts for sending notifications is described in the corresponding section of the documentation.

For the alarm to work, you also need to configure email sending.