Junos accounting-options configuration module
Version: 2019-01-01
module junos-conf-accounting-options { yang-version 1; namespace "http://yang.juniper.net/junos/conf/accounting-options"; prefix jc-accounting-options; import junos-common-ddl-extensions { prefix junos; revision-date "2019-01-01"; } import junos-common-types { prefix jt; revision-date "2019-01-01"; } import junos-conf-root { prefix jc; revision-date "2019-01-01"; } organization "Juniper Networks, Inc."; contact "yang-support@juniper.net"; description "Junos accounting-options configuration module"; revision "2019-01-01" { description "Junos: 21.3R1.9"; } augment /jc:configuration { uses accounting-options-group; } augment /jc:configuration/jc:groups { uses accounting-options-group; } grouping accounting-options-group { container accounting-options { description "Accounting data configuration"; uses juniper_accounting_options; } // container accounting-options } // grouping accounting-options-group grouping juniper_accounting_options { description "Accounting data configuration"; uses apply-advanced; container selective-aggregate-interface-stats { description "Toggle selective aggregate interface statistics collection"; choice enable-disable { leaf disable { type empty; description "Disable selective aggregate interface statistics collection"; } } // choice enable-disable } // container selective-aggregate-interface-stats container periodic-refresh { description "Toggle periodic statistics collection"; choice enable-disable { leaf disable { type empty; description "Disable statistics refresh"; } } // choice enable-disable } // container periodic-refresh list file { key "name"; ordered-by user; description "Accounting data file configuration"; leaf name { type string { junos:posix-pattern "^[^/]+$"; junos:pattern-message "Do not include directory in filename"; } description "Name of file in which to write accounting data"; } uses apply-advanced; leaf nonpersistent { type empty; description "File does not persist across reboot"; } leaf size { type string; description "Maximum accounting data file size"; } leaf files { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "3 .. 1000"; } } default "10"; description "Maximum number of files for this profile"; } leaf transfer-interval { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "5 .. 2880"; } } units "minutes"; default "30"; description "Frequency at which to transfer files to archive sites"; } leaf start-time { type jt:time; description "Start time for file transmission (yyyy-mm-dd.hh:mm) in local time format"; } leaf compress { type empty; description "Transfer file in compressed format"; } container backup-on-failure { description "Backup on transfer failure"; uses apply-advanced; choice backuponfailure { leaf master-only { type empty; description "Backup on master only"; } leaf master-and-slave { type empty; description "Backup on both master and slave"; } } // choice backuponfailure } // container backup-on-failure leaf push-backup-to-master { type empty; description "Push backup files to master RE"; } list archive-sites { key "name"; ordered-by user; description "List of archive destinations"; leaf name { type string; description "Primary and failover URLs to receive archive files"; } leaf password { type jt:unreadable; description "Password for login into the archive site"; } } // list archive-sites } // list file list interface-profile { key "name"; ordered-by user; description "Interface profile for accounting data"; leaf name { type string; description "Name of profile"; } uses apply-advanced; leaf file { type string; description "Name of file for accounting data"; } leaf interval { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 2880"; } } units "minutes"; default "30"; description "Polling interval"; } leaf start-time { type jt:time; description "Profile start time (yyyy-mm-dd.hh:mm) in local time format"; } container fields { description "Statistics to log to file"; uses apply-advanced; leaf input-bytes { type empty; description "Input bytes"; } leaf output-bytes { type empty; description "Output bytes"; } leaf input-packets { type empty; description "Input packets"; } leaf output-packets { type empty; description "Output packets"; } leaf input-errors { type empty; description "Generic input error packets"; } leaf output-errors { type empty; description "Generic output error packets"; } leaf input-multicast { type empty; description "Input packets arriving by multicast"; } leaf output-multicast { type empty; description "Output packets sent by multicast"; } leaf input-unicast { type empty; description "Input unicast packets"; } leaf output-unicast { type empty; description "Output unicast packets"; } leaf unsupported-protocol { type empty; description "Packets for unsupported protocol"; } leaf rpf-check-bytes { type empty; description "Bytes failing IPv4 reverse-path-forwarding check"; } leaf rpf-check-packets { type empty; description "Packets failing IPv4 reverse-path-forwarding check"; } leaf rpf-check6-bytes { type empty; description "Bytes failing IPv6 reverse-path-forwarding check"; } leaf rpf-check6-packets { type empty; description "Packets failing IPv6 reverse-path-forwarding check"; } leaf rpf-check-total-bytes { type empty; description "Total Bytes failing reverse-path-forwarding check"; } leaf rpf-check-total-packets { type empty; description "Total Packets failing reverse-path-forwarding check"; } } // container fields } // list interface-profile list filter-profile { key "name"; ordered-by user; description "Filter profile for accounting data"; leaf name { type string; description "Name of profile"; } uses apply-advanced; leaf file { type string; description "Name of file for accounting data"; } leaf interval { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 1048576"; } } units "minutes"; default "30"; description "Polling interval"; } list counters { key "name"; ordered-by user; description "Name of counter"; uses counter-object; } // list counters leaf start-time { type jt:time; description "Profile start time (yyyy-mm-dd.hh:mm) in local time format"; } } // list filter-profile list class-usage-profile { key "name"; ordered-by user; description "Class usage profile for accounting data"; leaf name { type string; description "Name of profile"; } uses apply-advanced; leaf file { type string; description "Name of file for accounting data"; } leaf interval { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 1048576"; } } units "minutes"; default "30"; description "Polling interval"; } leaf start-time { type jt:time; description "Profile start time (yyyy-mm-dd.hh:mm) in local time format"; } choice class-name { list destination-classes { key "name"; ordered-by user; description "Name of destination class"; uses dest-class-name-object; } // list destination-classes list source-classes { key "name"; ordered-by user; description "Name of source class"; uses source-class-name-object; } // list source-classes } // choice class-name } // list class-usage-profile list routing-engine-profile { key "name"; ordered-by user; description "Routing Engine profile for accounting data"; leaf name { type string; description "Name of profile"; } uses apply-advanced; leaf file { type string; description "Name of file for accounting data"; } leaf interval { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 2880"; } } units "minutes"; default "30"; description "Polling interval"; } leaf start-time { type jt:time; description "Profile start time (yyyy-mm-dd.hh:mm) in local time format"; } container fields { description "Information to log to file"; uses apply-advanced; leaf host-name { type empty; description "Hostname for this router"; } leaf date { type empty; units "YYYYMMDD"; description "Date"; } leaf time-of-day { type empty; units "HHMMSS"; description "Time of day"; } leaf uptime { type empty; units "seconds"; description "Time since last reboot"; } leaf cpu-load-1 { type empty; description "Average system load over last 1 minute"; } leaf cpu-load-5 { type empty; description "Average system load over last 5 minutes"; } leaf cpu-load-15 { type empty; description "Average system load over last 15 minutes"; } leaf memory-usage { type empty; description "Instantaneous active memory usage"; } leaf total-cpu-usage { type empty; description "Total CPU usage percentage"; } leaf cpu-usage-5sec { type empty; description "System CPU usage for last 5 seconds"; } leaf cpu-usage-1min { type empty; description "System CPU usage for the last minute"; } leaf cpu-usage-5min { type empty; description "System CPU usage for the 5 minutes"; } leaf free-mem { type empty; description "Total free memory available"; } leaf total-mem { type empty; description "Total memory available"; } } // container fields } // list routing-engine-profile list mib-profile { key "name"; ordered-by user; description "MIB profile for accounting data"; leaf name { type string; description "Name of profile"; } uses apply-advanced; leaf file { type string { junos:posix-pattern "!/"; junos:pattern-message "Do not include directory in filename"; } description "Name of file for accounting data"; } leaf interval { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 2880"; } } units "minutes"; default "30"; description "Polling interval"; } leaf start-time { type jt:time; description "Profile start time (yyyy-mm-dd.hh:mm) in local time format"; } leaf operation { type enumeration { enum "get" { value 0; description "Get SNMP object value"; } enum "get-next" { value 1; description "Get next SNMP object value"; } enum "walk" { value 2; description "Walk SNMP object values"; } } default "walk"; description "SNMP operation"; } list object-names { key "name"; ordered-by user; description "Names of MIB objects"; uses mib-variable-name-object; } // list object-names } // list mib-profile list flat-file-profile { key "name"; ordered-by user; description "Flat file profile for accounting data"; leaf name { type string; description "Name of profile"; } uses apply-advanced; leaf file { type string; description "Name of file for accounting data"; } leaf interval { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 2880"; } } units "minutes"; default "15"; description "Polling interval"; } leaf schema-version { type string; description "Name of the schema"; } leaf start-time { type jt:time; description "Profile start time (yyyy-mm-dd.hh:mm) in local time format"; } leaf use-fc-ingress-stats { type empty; description "Use Ingress stats for reporting forwarding class counters"; } container fields { description "Statistics to log to file"; uses apply-advanced; leaf all-fields { type empty; description "All parameters"; } leaf service-accounting { type empty; status deprecated; description "Service accounting for filters - obsolete config"; } container general-param { presence "enable general-param"; description "General interface parameters"; uses apply-advanced; leaf all-fields { type empty; description "All general interface parameters"; } leaf timestamp { type empty; description "Timestamp"; } leaf accounting-type { type empty; description "Accounting status type"; } leaf descr { type empty; description "Description"; } leaf routing-instances { type empty; description "Routing Instances where interface belongs"; } leaf nas-port-id { type empty; description "NAS port id"; } leaf line-id { type empty; description "Line id"; } leaf vlan-id { type empty; description "Vlan-id"; } leaf logical-interface { type empty; description "Logical-Interface"; } leaf physical-interface { type empty; description "Physical Interface name"; } leaf user-name { type empty; description "User name of the subscriber"; } } // container general-param container overall-packet { presence "enable overall-packet"; description "Overall packet statistics"; uses apply-advanced; leaf all-fields { type empty; description "All overall packet statistics"; } leaf input-bytes { type empty; description "Input bytes"; } leaf input-packets { type empty; description "Input packets"; } leaf input-v6-bytes { type empty; description "Input IPV6 bytes"; } leaf input-v6-packets { type empty; description "Input IPV6 packets"; } leaf output-bytes { type empty; description "Output bytes"; } leaf output-packets { type empty; description "Output packets"; } leaf output-v6-bytes { type empty; description "Output IPV6 bytes"; } leaf output-v6-packets { type empty; description "Output IPV6 packets"; } leaf input-errors { type empty; description "Total input errors"; } leaf output-errors { type empty; description "Total output errors"; } leaf input-discards { type empty; description "Total input discards"; } leaf input-v4-bytes { type empty; description "Input IPV4 bytes"; } leaf input-v4-packets { type empty; description "Input IPV4 packets"; } leaf output-v4-bytes { type empty; description "Output IPV4 bytes"; } leaf output-v4-packets { type empty; description "Output IPV4 packets"; } leaf input-bytes-per-sec { type empty; description "Input bytes per second"; } leaf input-packets-per-sec { type empty; description "Input packets per second"; } } // container overall-packet container l2-stats { presence "enable l2-stats"; description "Layer2 statistics"; uses apply-advanced; leaf all-fields { type empty; description "All Layer2 statistics"; } leaf input-mcast-bytes { type empty; description "L2 multicast bytes from input side"; } leaf input-mcast-packets { type empty; description "L2 multicast packets from input side"; } } // container l2-stats container ingress-stats { presence "enable ingress-stats"; description "Ingress queue statistics"; uses apply-advanced; leaf all-fields { type empty; description "All ingress queue statistics"; } leaf queue-id { type empty; description "Queue ID"; } leaf input-packets { type empty; description "Total input packets on the queue"; } leaf input-bytes { type empty; description "Total input bytes on the queue"; } leaf output-packets { type empty; description "Total output packet on the queue"; } leaf output-bytes { type empty; description "Total output bytes on the queue"; } leaf drop-packets { type empty; description "Ingress queue dropped packets"; } } // container ingress-stats container egress-stats { presence "enable egress-stats"; description "Egress queue statistics"; uses apply-advanced; leaf all-fields { type empty; description "All egress queue statistics"; } leaf queue-id { type empty; description "Queue ID"; } leaf input-packets { type empty; description "Total input packets on the queue"; } leaf input-bytes { type empty; description "Total input bytes on the queue"; } leaf output-packets { type empty; description "Total output packet on the queue"; } leaf output-bytes { type empty; description "Total output bytes on the queue"; } leaf tail-drop-packets { type empty; description "Egress queue tail dropped packets"; } leaf red-drop-packets { type empty; description "Egress queue red dropped packets"; } leaf red-drop-bytes { type empty; description "Egress queue red drop bytes"; } leaf total-drop-packets { type empty; description "Egress queue total drop packets"; } } // container egress-stats } // container fields container format { description "Flat file accounting format"; uses apply-advanced; choice flatfileformat { leaf ipdr { type empty; description "IPDR format"; } leaf csv { type empty; description "CSV format"; } } // choice flatfileformat } // container format } // list flat-file-profile container cleanup-interval { presence "enable cleanup-interval"; description "Backup files cleanup interval"; uses apply-advanced; leaf interval { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 31"; } } units "day"; default "1"; description "Cleanup interval in days"; } } // container cleanup-interval } // grouping juniper_accounting_options grouping apply-advanced { description "Apply advanced configuration logic"; leaf-list apply-groups { type string; ordered-by user; description "Groups from which to inherit configuration data"; } leaf-list apply-groups-except { type string; ordered-by user; description "Don't inherit configuration data from these groups"; } list apply-macro { key "name"; ordered-by user; description "Macro and parameters for commit script expansion"; uses apply-macro-type; } // list apply-macro } // grouping apply-advanced grouping apply-macro-type { description "Macro data for commit-script expansion"; leaf name { type string; description "Name of the macro to be expanded"; } list data { key "name"; uses macro-data-type; } // list data } // grouping apply-macro-type grouping counter-object { leaf name { type string; description "Name of counter"; } } // grouping counter-object grouping dest-class-name-object { leaf name { junos:must "((any "policy-options policy-statement <*> then destination-class $$" || (any "policy-options policy-statement <*> term <*> then destination-class $$" || (any "policy-options policy-statement <*> from route-filter <*> <*> destination-class $$" || (any "policy-options policy-statement <*> then forwarding-class $$" || (any "policy-options policy-statement <*> term <*> then forwarding-class $$" || any "policy-options policy-statement <*> from route-filter <*> <*> forwarding-class $$"))))))"; junos:must-message "referenced destination-class must be defined"; type string; description "Class name"; } } // grouping dest-class-name-object grouping macro-data-type { leaf name { type string; description "Keyword part of the keyword-value pair"; } leaf value { type string; description "Value part of the keyword-value pair"; } } // grouping macro-data-type grouping mib-variable-name-object { leaf name { type string { junos:posix-pattern "^([.]?1|[a-zA-Z][a-zA-Z0-9]*)([.]([a-zA-Z]|[0-9]+))*$"; junos:pattern-message "Must be an OID of the form 1.x.y.z... or objname[.x.y.z] where x, y, & z are either numbers or a single letter"; } description "MIB variable name"; } } // grouping mib-variable-name-object grouping source-class-name-object { leaf name { junos:must "((any "policy-options policy-statement <*> then source-class $$" || (any "policy-options policy-statement <*> term <*> then source-class $$" || (any "policy-options policy-statement <*> from route-filter <*> <*> source-class $$" || (any "policy-options policy-statement <*> then forwarding-class $$" || (any "policy-options policy-statement <*> term <*> then forwarding-class $$" || any "policy-options policy-statement <*> from route-filter <*> <*> forwarding-class $$"))))))"; junos:must-message "referenced source-class must be defined"; type string; description "Class name"; } } // grouping source-class-name-object } // module junos-conf-accounting-options
© 2023 YumaWorks, Inc. All rights reserved.