ipfixreceiver2: IPFIX/NetflowV9 collector [Документация VAS Experts]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:dpi:dpi_components:utilities:ipfixreceiver2 [2019/04/01 07:08] kvazikraven:dpi:dpi_components:utilities:ipfixreceiver2 [2024/09/26 15:29] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== ipfixreceiver2: IPFIX/NetflowV9 collector  ====== ====== ipfixreceiver2: IPFIX/NetflowV9 collector  ======
 +{{indexmenu_n>2}}
  
 ===== Introduction ===== ===== Introduction =====
Line 13: Line 13:
 ==== CentOS ==== ==== CentOS ====
  
-  - Add the VAS Experts repository according to the p.1 of the [[en:dpi:dpi_components:platform:dpi_update:dpi_update_10:dpi_10_update:start|DPI installation instruction]].+  - Add the VAS Experts repository <code>rpm --import http://vasexperts.ru/centos/RPM-GPG-KEY-vasexperts.ru 
 +rpm -Uvh http://vasexperts.ru/centos/6/x86_64/vasexperts-repo-1-0.noarch.rpm</code>
   - Add the [[https://fedoraproject.org/wiki/EPEL|EPEL]] repository   - Add the [[https://fedoraproject.org/wiki/EPEL|EPEL]] repository
   - Install the ipfixreceiver2:\\ <code>yum install -y ipfixreceiver2</code>   - Install the ipfixreceiver2:\\ <code>yum install -y ipfixreceiver2</code>
Line 64: Line 65:
 === Section [connect] === === Section [connect] ===
  
-В данной секции задаются параметры для приема данных ipfix. +The section is used to specify the parameters for receiving ipfix data
-  * protocol - IP протокол (tcp или udp)\\ :!: При использовании протокола udp необходимо убедитьсячто размер ipfix записи не превышает размер MTU (clickstream данные можно принимать только по протоколу tcp). +  * protocol - IP protocol (tcp or udp)\\ :!: Before using the udp protocolyou should make sure that the size of the ipfix record does not exceed the size of the MTU (clickstream data can be received using the tcp protocol only). 
-  * host - интерфейсна котором будет осуществляться прием данных +  * host - interfaceused to receive the data 
-  * port - номер порта +  * port - port number 
-  * flow_type - тип принимаемого потока: ipfix или netflow9. В случае использования netflow9 protocol может быть только udp.+  * flow_type - the type of flow to receive: ipfix or netflow9. When netflow9 protocol is used the flow_type can be equal to 'udp' only.
  
-=== Секция [dump] ===+=== Section [dump] ===
  
-В данной секции задаются параметры дампа принятых данных в файл.+The section is used to specify the parameters of data dump received.
  
-  * delimiter - символ разделителей данных в файле+  * delimiter - character used as delimiter within the file
-  * rotate_minutes - через сколько минут закрывать временный файл и переименовывать его в постоянный. +  * rotate_minutes - the time period after which the temporary file will be closed and renamed to a persistent one 
-  * rotate_flows - через какое количество ipfix записей закрывать временный файл и переименовывать его в постоянный. 0 - отключение данного вида ротации+  * rotate_flows - the ipfix records number upon the exceeding of which the temporary file will be closed and renamed to a persistent one. 0 - to disable this rotation type
-  * dumpfiledir - каталог для размещения файлов с дампом+  * dumpfiledir - directory used to store the dump files
-  * fileprefix - префикс имени файла с дампом+  * fileprefix - dump file name prefix
-  * rotateformat - формирует имя файла с дампом+  * rotateformat - generates a dump file name
-  * extension - расширение файла с дампом+  * extension - extension of a dump file
-  * temp_file_suffix - суффикс имени временного файла+  * temp_file_suffix - name suffix of a temporary file
-  * processcmd - команда для запуска при ротации файла. %s задает имя постоянного файла с дампом+  * processcmd - command used to set rotate option. %s specifies the name of persistent file containing the dump
-  * detach_child - если true, то процесс processcmd отвязывается от процесса ipfixreceiver'а+  * detach_child - when is set to true, the processcmd process will be unbound from ipfixreceiver's process
-  * decode_url - декодировать символы в url при использовании decodepath. +  * decode_url - to decode characters in url when using decodepath. 
-  * decode_host - декодировать idna в имени хоста при decodehost. +  * decode_host - to decode idna within the host name when using decodehost. 
-  * decode_referer - декодировать idna в referer при decodereferer. +  * decode_referer - to decode idna to referer when using decodereferer. 
-  * reopen_time - через сколько секунд будет предпринята попытка открыть файл для записи дампа после возникшей ошибки с файломПо умолчанию 30 секунд+  * reopen_time - the time period upon the exceeding of which the attempt to reopen a file for recording a dump after an error occurred (when attempting to access the file) will be madeThe default value is 30 seconds
-  * checkdir - проверять ли на существование dumpfiledir и в случае отсутствия создать каталог (создаются все каталоги из dumpfiledir). По умолчанию true. +  * checkdir - boolean parameter; is used to check whether dumpfiledir exists and, if it does not exist, the corresponding directories will be created (including all the dumpfiledir subdirectories). The default value is true. 
-  * fw_max_elements_in_queue - количество элементов, при котором они отправляются в очередь на запись в файлПо умолчанию 100000. +  * fw_max_elements_in_queue - the items number upon the exceeding of which they will be forwarded to the queue to be written to the fileThe default value is 100000. 
-  * fw_max_queue_size - максимальное количество массивов элементов в очередиЕсли на момент добавления в очередь количество находящихся в очереди будет большето добавляемые данные будут отброшеныПо умолчанию 2. +  * fw_max_queue_size - the maximum number of arrays of elements in the queueIf the number of people at the time of adding them to the queue  will be more than fw_max_queue_sizethen the data will be discardedThe default value is 2. 
-  * bad_characters - символы, которые не нужно выводить при записи в файлМогут быть указаны одиночные символы и escape последовательностиПо умолчанию "\t\r\n;\x00".+  * bad_characters - characters that do not need to be displayed when writing to a fileSingle characters along with escape sequences can be specifiedDefault value is "\t\r\n;\x00".
  
-=== Секция [InfoModel] === +=== Section [InfoModel] === 
-В данной секции задается xml файл с описанием типа данных в принимаемом потоке ipfix. +This section specifies an xml file describing the type of data within the received ipfix flow
-  * XMLElements - путь к xml файлу с описанием типа данных в формате [[https://www.iana.org/assignments/ipfix/ipfix.xml|IANA IPFIX Entities registry]].+  * XMLElements - path to xml file with data type description using the [[https://www.iana.org/assignments/ipfix/ipfix.xml|IANA IPFIX Entities registry]] format.
  
-=== Секция [Template] === +=== Section [Template] === 
-В данной секции задается порядок следования данных в принимаемом потоке ipfix и при небходимости фильтр принимаемых данных по идентификатору+The section is responsible for the data sequence order within the received ipfix flow and, if necessary, for the received data filtering by the given identifier
-  * Elements - список принимаемых данных (через запятую)+  * Elements - comma separated list of received data
-  * filter_tid - только данные с данным идентификатором будут обрабатыватьсяа с иными будут отброшены.+  * filter_tid - only the data with the given identifier will be processedall the other ones will be discarded.
  
-=== Секция [ExportModel] === +=== Section [ExportModel] === 
-В данной секции определяется порядок и формат вывода полученных данных+This section specifies the order and format of the received data to be exported
-  * Elements - список данных, которые необходимо сохранять в файле (через запятую). Возможно изменить предопределенный формат вывода в файл для каждого типа данных, используя следующий форматимя_поля:формат_вывода[:опция]. Возможны следующие типы вывода данных:+  * Elements - comma separated list of data to be stored in the file. You can change the predefined export format (the data will be exported to a filefor each data type using the following formatfield_nameoutput_format [: option]. The following types of data output are possible:
  
-^Формат_вывода^Описание+^Output_format^Description
-|decode_unsigned|Декодировать как unsinged| +|decode_unsigned|Decode as unsinged| 
-|decode_signed|Декодировать как signed| +|decode_signed|Decode as signed| 
-|decodeipv4|Декодировать как IPv4 адрес+|decodeipv4|Decode as IPv4 address
-|decodeipv6|Декодировать как IPv6 адрес+|decodeipv6|Decode as IPv6 address
-|decode_string|Декодировать как строку+|decode_string|Decode as string
-|decode_seconds|Декодировать как дату и время в секундахФормат вывода по умолчанию '%Y-%m-%d %H:%M:%S'В опции можно задать свой формат вывода.| +|decode_seconds|Decode as date and time in secondsThe default output format is '%Y-%m-%d %H:%M:%S'You can specify date/time format on your own.| 
-|decode_milliseconds|Декодировать как дату и время в миллисекундахФормат вывода по умолчанию '%Y-%m-%d %H:%M:%S'В опции можно задать свой формат вывода.| +|decode_milliseconds|Decode as date and time in millisecondsThe default output format is  '%Y-%m-%d %H:%M:%S'You can specify date/time format on your own.| 
-|decodehost|Декодировать как имя хоста+|decodehost|Decode as host name
-|decodepath|Декодировать как путь в url| +|decodepath|Decode as url| 
-|decodereferer|Декодировать как referer|+|decodereferer|Decode as referer|
  
-=== Секция [stats] === +=== Section [stats] === 
-В данной секции задаются параметры вывода статистики работы программы в telegraf. +The section specifies the export options for sending ipfixreceiver2 statistics (metrics and events) to the telegraf agent
-  * socket_path - путь к datagram socket telegraf'а+  * socket_path - path to the telegraf's datagram socket
-  * interval - через сколько секунд отправлять статистику в telegraf. +  * interval - the time period upon the exceeding of which the statistics will be sent to the telegraf agent
-  * tag - тег, выставляемый в поле ipfix_tag при отправке статистики в telegraf.+  * tag - tag set in the ipfix_tag field when sending statistics to the telegraf agent.
  
-=== Секция [export] ===+=== Section [export] ===
  
-  *to - задаются адреса коллекторов для экспорта полученных ipfix записейФормат ip/port/proto[,ip/port/proto]. Например:<code>[export] +  *to - specifies the collector addresses to be used to export received ipfix records.\\ Used format: ip/port/proto[,ip/port/proto]. For example:<code>[export] 
-to=10.0.0.2/9921/tcp, 10.0.0.3/3444/udp</code> :!: При использовании протокола udp необходимо убедиться что одна ipfix запись не превышает размер MTU.+to=10.0.0.2/9921/tcp, 10.0.0.3/3444/udp</code> 
 +:!: When using the udp protocol, you should make sure that one ipfix record does not exceed the size of the MTU.
  
-=== Секция [logging] === +=== Section [logging] === 
-В данной секции задаются параметры логирования программы+The section specifies the logging parameters
-  * loggers.root.level - уровень логирования +  * loggers.root.level - log level 
-  * loggers.root.channel - канал для вывода сообщений +  * loggers.root.channel - channel to display messages 
-  * channels.fileChannel.class - класс канала вывода +  * channels.fileChannel.class - output channel class 
-  * channels.fileChannel.path - путь к лог-файлу +  * channels.fileChannel.path - path to the log file 
-  * channels.fileChannel.rotation - параметр ротации +  * channels.fileChannel.rotation - rotation parameter 
-  * channels.fileChannel.archive параметр имени архивных файлов  +  * channels.fileChannel.archive archive file name parameter  
-  * channels.fileChannel.purgeCount - количество архивных файлов +  * channels.fileChannel.purgeCount - number of archive files 
-  * channels.fileChannel.formatter.class - класс форматировщика +  * channels.fileChannel.formatter.class - formatter class 
-  * channels.fileChannel.formatter.pattern - шаблон для форматировщика +  * channels.fileChannel.formatter.pattern - formatter pattern 
-  * channels.fileChannel.formatter.times - время +  * channels.fileChannel.formatter.times - time 
-:!: Более подробно ознакомиться с параметрами логирования можно по ссылке [[https://pocoproject.org/docs/Poco.FileChannel.html|Class FileChannel]].+:!: For more information about logging parameters please follow the [[https://pocoproject.org/docs/Poco.FileChannel.html|Class FileChannel]] link.
  
-===== Примеры конфигураций =====+===== Configuration examples =====
  
-=== Приём ipfix данных ===+=== Receiving of ipfix data ===
  
-В файлах /etc/rcollector/ipfixreceiver_*.ini приведены примеры настройки для получения различных потоков данных ipfix. Перед запуском программы необходимо изменить конфигурационный файл под ваши требования+The /etc/rcollector/ipfixreceiver_*.ini files provide configuration examples for receiving various ipfix data flowsBefore starting the program, you should to change the configuration file to meet your requirements
-  * При необходимости внести изменения в секцию [connect], указав интерфейспорт и протокол для приема ipfix данных+  * If necessary, make changes to the [connect] sectionspecifying the interfaceport and protocol for receiving ipfix data
-  * В секции [dump] указать+  * Specify within [dump] section the following stuff
-    * dumpfiledir - каталог, где будут создаваться временный файл и файлы с данными+    * dumpfiledir - the directory where the temporary file and data files will be created
-    * rotate_minutes - времячерез которое закрывать временный файл, переименовывать его в файл с постоянным именем и выполнить команду из параметра processcmd для действий над полученным файлом+    * rotate_minutes - the time period upon the exceeding of which to close the temporary filerename it to a file with a permanent name and execute a command from the processcmd parameter to operate on the received file
-    * processcmd - команду, небходимую выполнить над файлом с данными+    * processcmd - this command should be executed on the file with data
-    * delimiter - символ разделитель между полями данных+    * delimiter - delimiter character between data fields
-  * В секции [ExportModel] указать необходимый порядок следования полей в сохраняемом файле.+  * You should specify the required order of the fields in the saved file within the [ExportModel] section
  
-=== Экспорт ipfix данных ===+=== Exporting of ipfix data ===
  
-Для экспорта получаемых ipfix данных необходимо внести изменения в конфигурационный файлпутем добавления секции [export] и указания адресов назначенияНапримердля отправки ipfix данных на ipfix коллектор с адресом 10.0.0.5:1501 по протоколу tcp, элемент конфигурации будет выглядеть следующим образом:+To export the data received by ipfix, you need to make changes to the configuration file by adding the [export] section and specifying the destination addressesFor exampleto send ipfix data to an ipfix collector having the 10.0.0.5:1501 address using the tcp protocolthe configuration item within [export] section will look like this:
 <code>[export] <code>[export]
 to = 10.0.0.5/1501/tcp</code> to = 10.0.0.5/1501/tcp</code>
-Если необходимо задать несколько ipfix коллекторовто их можно указать через запятуюНапример:+If you need to specify multiple ipfix collectorsyou can specify comma-separated list of ipfix collectorsFor example:
 <code>[export] <code>[export]
 to = 10.0.0.5/1501/tcp, 192.168.1.200/1501/tcp</code> to = 10.0.0.5/1501/tcp, 192.168.1.200/1501/tcp</code>