module flowmon { namespace "http://cesnet.cz/ns/netopeer/flowmon/3.0"; prefix flm; import inet-types { prefix inet; } organization "CESNET, z.s.p.o."; contact "Ladislav Lhotka "; description "Data model for FlowMon configuration data and statistics."; revision 2008-05-07; container flowmon { typedef sampling-rate { type uint16 { range 1..65535; } default 1; } container systemInformation { leaf description { type string; } leaf sysName { type string; } leaf sysContact { type string; } leaf sysLocation { type string; } leaf sysUpTime { type uint32; } } container global { choice cache-control { mandatory true; case adaptive { container adaptiveControl { leaf cacheOccupancyThreshold { type uint8 { range 0..100; } units percent; } leaf newFlowRateThreshold { type uint32; } } } case static { leaf inactiveTimeout { type uint8 { range 0..60; } default 10; units seconds; } leaf sampleAndHoldRate { type sampling-rate; } } } leaf activeTimeout { type uint16 { range 0..1200; } default 300; units seconds; } container logging { presence "enables logging"; leaf disabled { type boolean; default false; } container logDestination { choice dest { leaf console { type empty; } leaf file { type string; } leaf syslogHost { type inet:host; } } } leaf logLevel { type enumeration { enum emerg; enum alert; enum crit; enum err; enum warn; enum notice; enum info; enum debug; } default err; } } leaf flowsInCache { config false; type uint32; } leaf recGenerated { config false; type uint32; } leaf recUploaded { config false; type uint32; } leaf recOverwritten { config false; type uint32; } } container interfaces { list interface { key ifNumber; leaf ifNumber { type uint8 { range 0..3; } } leaf ifType { type enumeration { enum monitoring; enum mirroring; } } leaf disabled { type boolean; default false; } leaf linkRate { type uint16 { range 10|100|1000|10000; } } leaf ifOperStatus { config false; type enumeration { enum up; enum down; } } container inputSampling { when "../ifType='monitoring'"; leaf samplingMethod { type enumeration { enum regular; enum statistical; } default statistical; } leaf samplingRate { type sampling-rate; } } leaf ifInPackets { when "../ifType='monitoring'"; config false; type uint32; } leaf ifInErrors { when "../ifType='monitoring'"; config false; type uint32; } leaf ifInDiscards { when "../ifType='monitoring'"; config false; type uint32; } } } container collectors { grouping address-choice { leaf sourceIPAddress { type empty; } leaf destinationIPAddress { type empty; } } list collector { key "host udpPort"; leaf description { type string; } leaf host { type inet:host; } leaf udpPort { type inet:port-number; } leaf exportProtocol { type enumeration { enum netflow-v5; enum netflow-v9; enum ipfix; } } leaf templateSendPeriod { when "../exportProtocol!='netflow-v5'"; type uint16; default 60; units seconds; } container flowFilter { presence "enables per-collector flow filtering"; list filterCondition { key name; ordered-by user; leaf name { type string; } choice filter-conditions { leaf ipVersion { type inet:ip-version; } container addressRange { leaf startAddress { mandatory true; type inet:ip-address; } leaf endAddress { mandatory true; type inet:ip-address; } container matchAgainst { uses address-choice; } } } leaf ifNumber { type uint8 { range 0..1; } } } } container anonymization { choice anonymization-methods { container simpleRewrite { leaf maskPrefix { type inet:ipv4-prefix; default 192.168.0.0/16; } container applyTo { uses address-choice; } } container encryptAES { leaf initialization { type enumeration { enum clock; enum none; } default none; } container applyTo { leaf sourceIPAddress { type empty; } leaf destinationIPAddress { type empty; } leaf sourcePort { type empty; } leaf destinationPort { type empty; } } } } } leaf recExported { config false; type uint32; } } } } }