Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:ipfixreceiver [2017/03/09 11:32] – [Проблемы и решения] aalekseenko | en:ipfixreceiver [2019/02/13 16:32] (current) – removed lexx26 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== IPFIX receiver utility ====== | ||
| - | ===== Introduction ===== | ||
| - | IPFIX receiver is used for receiving an IPFIX (Netflow 10) stream from DPI devices and store the stream to a local file. The stored file can be processed as a text file any unix utilities. | ||
| - | |||
| - | ===== Installation and upgrade ===== | ||
| - | - use VAS Experts repositore according to p.1 of the [[dpi_10_update|DPI installation instruction]]. | ||
| - |   - install ipfixreceiver: | ||
| - |   - check changes in configuration files for installed version look at part " | ||
| - | |||
| - | ===== Important changes in version 1.0.3 vs 1.0.2 ===== | ||
| - |   - chenged configuration file in part of IP address transformation, | ||
| - | - saving data now in separate process, important if DPI has more than 25 000 session per second, it can load upto 2 proccesor cores. In DEBUG loging added check records to controll save processing\\ (a)cnt=NNNNN - send NNNNN buffer\\ (b)cnt=YYYYY - saved YYYYY buffer. | ||
| - |   - buffer_size parameter added - size of buffer to interchange between receiver and saver processes, use it in [dump] section, default value - 100000 records (for 20Gbe or 25 000 seesion per second). If the buffer size is not reached then 30sec timeout is used to push buffer into saver process.  | ||
| - | |||
| - | ===== Supplied files ===== | ||
| - |   - configuration expamples: | ||
| - | / | ||
| - | / | ||
| - |   - programm files directory: | ||
| - |   - additional files:\\ < | ||
| - |   - link to executable: | ||
| - | |||
| - | ===== Additional OS settings ===== | ||
| - |   - set iptables for receive external data\\ Ipfixreceiver is requred to open ports that will be used to receive IPFIX streams (in configuration see section [connect])\\ For instance you  are using TCP protocol, 1500 port and IP=212.12.11.10\\ < | ||
| - | protocol=tcp | ||
| - | host=212.12.11.10 | ||
| - | port=1500</ | ||
| - |   - configure logrotate\\ Example for logrotate file / | ||
| - | / | ||
| - | rotate 5 | ||
| - | missingok | ||
| - | notifempty | ||
| - | compress | ||
| - | size 10M | ||
| - | daily | ||
| - | copytruncate | ||
| - | nocreate | ||
| - | postrotate | ||
| - | endscript | ||
| - | }</ | ||
| - |   - configure remove old files. Example, removing old archive files (more then 31 days) with session records in gzip:\\ < | ||
| - | |||
| - | ===== Execution parameters ===== | ||
| - | ipfixreceiver utility has next parameters: | ||
| - | < | ||
| - | где | ||
| - | start - start as service | ||
| - | stop - stop service | ||
| - | state - get state of service | ||
| - | restart - restart service | ||
| - | -v - version info | ||
| - | -f <config file> - config file name (required) | ||
| - | |||
| - | Example: | ||
| - |   ipfixreceiver start -f / | ||
| - | </ | ||
| - | ===== Configuration ===== | ||
| - | |||
| - | By default config file / | ||
| - | :!:More information about config parameter you can find by link [[https:// | ||
| - | |||
| - | ==== Logging sections ==== | ||
| - | - loggers - define logging identifiers | ||
| - | - handlers - define used logging workers | ||
| - | - formatters - define used logging formats | ||
| - | |||
| - | ==== logger_root ==== | ||
| - |   - level - log level\\ Values:< | ||
| - | CRITICAL  | ||
| - | ERROR - errors included | ||
| - | WARNING  | ||
| - | INFO - information included | ||
| - | DEBUG - debug messages included | ||
| - | NOTSET  | ||
| - | </ | ||
| - |   - handlers - used message handlers\\ Example: < | ||
| - | ==== handler_ipfixreceiverlogger ==== | ||
| - |   - class - class of the message handler\\ Example: < | ||
| - |   - level - log level < | ||
| - |   - formatter - name of formatter that is used< | ||
| - |   - args - handlers' | ||
| - | ==== formatter_ipfixreceiverlogger ==== | ||
| - |   - format - log message format description\\ Example: < | ||
| - | here: | ||
| - | %(name)s  | ||
| - | %(levelname)s - level (' | ||
| - | %(asctime)s  | ||
| - | %(message)s  | ||
| - | </ | ||
| - |   - datefmt - date format\\ Example: < | ||
| - | ==== connect ==== | ||
| - |   - protocol - protocol(tcp or udp). < | ||
| - |   - host - IP or server name or 0.0.0.0 (to receive from all devices). < | ||
| - |   - port - port number. < | ||
| - | ==== dump ==== | ||
| - |   - rotate_minutes - rotation period in minuties, after it temp file will be moved to dumpfiledir/< | ||
| - |   - processcmd - command that will be executed to process new data file after rotation, parameter is full file name.< | ||
| - |   - dumpfiledir - directory where received data files will be stored. < | ||
| - |   - buffer_size - size of buffer to interchange between receiver and saver processes, use it in [dump] section, default value - 100000 records (for 20Gbe or 25 000 seesion per second). If the buffer size is not reached then 30sec timeout is used to push buffer into saver process.  | ||
| - | |||
| - | ==== InfoModel ==== | ||
| - | the section describes IPFIX receiveng template. | ||
| - |   - InfoElements - parameter with description of information model elements for IPFIX template < | ||
| - |                 packetDeltaCount,  | ||
| - |                 protocolIdentifier,  | ||
| - |                 session_id,  | ||
| - | here, | ||
| - | session_id - field name according to IPFIX description table (see according sections) | ||
| - |   43823  - enterprise number or general IPFIX protocol number  | ||
| - | 1 - unique field name | ||
| - | UINT64 - field type | ||
| - | True - endian (True or empty). | ||
| - | </ | ||
| - | Field types:\\ | ||
| - | ^ Type      ^ Length  | ||
| - | | OCTET_ARRAY  | ||
| - | | UINT8          | 1          | unsigned8  | ||
| - | | UINT16  | ||
| - | | UINT32  | ||
| - | | UINT64  | ||
| - | | INT8           | 1          | signed8  | ||
| - | | INT16          | 2          | signed16  | ||
| - | | INT32          | 4          | signed32  | ||
| - | | INT64          | 8          | signed64  | ||
| - | | FLOAT32  | ||
| - | | FLOAT64  | ||
| - | | BOOL           | 1          | boolean  | ||
| - | | MAC_ADDR  | ||
| - | | STRING  | ||
| - | | SECONDS  | ||
| - | | MILLISECONDS  | ||
| - | | MICROSECONDS  | ||
| - | | NANOSECONDS  | ||
| - | | IP4ADDR  | ||
| - | | IP6ADDR  | ||
| - | |||
| - | Field names and their description: | ||
| - | - [[statistics_ipfix|Flow export template in IPFIX]] | ||
| - | - [[li_ipfix|Meta information export template]] | ||
| - | |||
| - | additional information: | ||
| - | [[https:// | ||
| - | ==== ExportModel ==== | ||
| - | defines the export model parameters, reserved for future use. | ||
| - |   - Mode - type used export (File only) < | ||
| - | ==== ExportModelFile ==== | ||
| - | defines the File export model. | ||
| - |   - Delimiter field delimiter ( \t - TAB, examples - |,;) < | ||
| - |   - ExportElements - fields description that will be saved to file. < | ||
| - | login | ||
| - |                   | ||
| - |                   | ||
| - | host, decodehost | ||
| - | path, decodepath | ||
| - |                   | ||
| - |                   | ||
| - | here: | ||
| - | name - field name from infornation model described before [InfoModel] (login, session_id и т.п.) | ||
| - | worker - internal transformation routune | ||
| - |                 | ||
| - |                 | ||
| - |                 | ||
| - |                 | ||
| - |                 | ||
| - |                 | ||
| - |                 | ||
| - |   format - format for seconds, milliseconds.  | ||
| - |             | ||
| - |             | ||
| - | </ | ||
| - | ===== Troubleshooting ===== | ||
| - |   - how can I get version?\\ Use:\\ < | ||
| - | - can I send IPFIX streams fom differ DPI deveces to one port?\\ Yes, for UDP. Ipfixreceiver will write it to the same output files. | ||
| - |   - How can I learn that utility is working?\\ a) check port is lissening, example 1500:< | ||
| - | - all checked, but no data is received?\\ a) check iptables rules.\\ b) check ipfixreceiver configuration for IP server address. | ||
| - |   - DPI sends more then 2 mln session per second, in DEBUG level I see that counter in saver is slower  | ||