Option: Use a Flow Collector Interface to Process and Export Multiple cflowd Records
You can manage multiple cflowd records with a flow collector interface. You create a flow collector interface from a Monitoring Services II PIC. The flow collector interface combines multiple cflowd records into a compressed ASCII data file and exports the file to an FTP server. To convert a Monitoring Services II PIC into a flow collector interface, include the
flow-collectorstatement at the [edit chassis fpcfpc-slotpicpic-slotmonitoring-services application] hierarchy level. To restore the monitoring functions of a Monitoring Services II PIC, include themonitorstatement at the [edit chassis fpcfpc-slotpicpic-slotmonitoring-services application] hierarchy level.After you commit the configuration to convert the PIC between the
monitorandflow-collectorservice types, you must take the PIC offline and then bring the PIC back online. Rebooting the router does not enable the new service type. You can use the Monitoring Services II PIC for either flow collection or monitoring, but not both types of service simultaneously.A flow collector interface, designated by the
cp-fpc/pic/portinterface name, requires three logical interfaces for correct operation. Units 0 and 1 are used respectively as export channels 1 and 2 to send the compressed ASCII data files to an FTP server, while Unit 2 is used as a flow receive channel to receive cflowd records from a monitoring services interface.
To activate flow collector services after the Monitoring Services II PIC is converted into a flow collector, include the
flow-collectorstatement at the [edit services] hierarchy level. You also need to configure several additional components:
- Destination of the FTP server—Determines where the compressed ASCII data files are sent after the cflowd records are collected and processed. To specify the destination FTP server, include the
destinationsstatement at the [edit services flow-collector] hierarchy level. You can specify up to two FTP server destinations and include the password for each configured server. If two FTP servers are configured, the first server in the configuration is the primary server and the second is a backup server.- File specifications—Presets data file formats, name formats, and transfer characteristics. Files are sent by FTP to the destination FTP server when the timer expires or when a preset number of records are received, whichever comes first. To set the data file format, include the
data-formatstatement at the [edit services flow-collectorfile-specificationfile-name] hierarchy level. The default data format isflow-compressed. To set the file name format, include thename-formatstatement at the [edit services flow-collectorfile-specificationfile-name] hierarchy level. To set the export timer and file size thresholds, include thetransferstatement at the [edit services flow-collectorfile-specificationfile-name] hierarchy level and specify values for thetimeoutandrecord-leveloptions. The default values are 600 seconds fortimeoutand 500,000 records forrecord-level.- Input interface-to-flow collector interface mappings—Matches an input interface with a flow collector interface and applies the preset file specifications to the input interface. To configure the default flow collector and file specifications for all input interfaces, include the
file-specificationandcollectorstatements at the [edit services flow-collectorinterface-map] hierarchy level. To override the default settings and apply flow collector and file specifications to a specific input interface, include thefile-specificationandcollectorstatements at the [edit services flow-collectorinterface-mapinterface-name] hierarchy level.- Transfer log settings—Allows you to configure the destination FTP server where log files containing the transfer activity history for a flow collector interface are to be archived, the name for the log file, and the amount of time the router waits before sending the log file to the FTP server. To configure, include the
archive-sites,filename-prefix, andmaximum-agestatements at the [edit services flow-collectortransfer-log-archive] hierarchy level.To specify a flow collector interface as the destination for cflowd records coming from a Monitoring Services or Monitoring Services II PIC, include the
collector-picstatement at the [edit forwarding-options monitoringgroup-namefamily inet output flow-export-destination] hierarchy level. You can select either the flow collector interface or a cflowd server as the destination for cflowd records, but you cannot select both destination types simultaneously.The following is the combined set of hierarchy levels used for the flow collector service:
[edit]chassis {fpcfpc-slot{picpic-slot{monitoring-services {application flow-collector;}}}}interfaces {cp-fpc/pic/port{description "flow_collector_interface";unit 0 {family inet {addressip-address{destinationip-address;}}}unit 1 {family inet {addressip-address{destinationip-address;}}}unit 2 {family inet {addressip-address{destinationip-address;}}}}interface-fpc/pic/port{description "export_interface";unit 0 {family inet {addressip-address;}}}mo-fpc/pic/port{description "monitoring_services_interface";unit 0 {family inet;}}SONET-or-ATM-interface-fpc/pic/port{description "input_interface";encapsulation ppp;unit 0 {passive-monitor-mode;}}}forwarding-options {monitoring group1 {family inet {output {export-format cflowd-version-5;flow-active-timeoutvalue;flow-inactive-timeoutvalue;flow-export-destination collector-pic;interface mo-fpc/pic/port{source-addressip-address;}}}}}services {flow-collector {destinations {"ftp://username@ftp-server-address-1//directory/" {password "encrypted-password";}"ftp://username@ftp-server-address-2//directory/" {password "encrypted-password";}}file-specification {file-specification-name{name-format "name-0-date_time-IfAlias_generation-number.bcp.bi.gz";data-format flow-compressed;transfer timeoutvaluerecord-levelsize;}}interface-map {file-specificationfile-specification-name;collector cp-fpc/pic/port;interface-name{file-specificationfile-specification-name;collector cp-fpc/pic/port;}}transfer-log-archive {filename-prefixfilename;maximum-agetimeout-value;archive-sites {"ftp://username@ip-address//directory/" {password "encrypted-password";}}}}}There is also a Juniper Networks enterprise Management Information Base (MIB) for the flow collector interface. The Flow Collector Services MIB allows you to use SNMP to monitor the flow collector interface. The MIB provides statistics on files, records, memory, FTP, and error states of a flow collector interface. It also provides SNMP traps for unavailable destinations, unsuccessful file transfers, flow overloading, and memory overloading. For more information, you can view the enterprise-specific Juniper Networks MIBs at:
http://www.juniper.net/techpubs/software/junos/mibs.html.