Managed Objects for Controlling the Collection and Storage of Accounting Information for Connection-Oriented Networks
Extracted elements (27)
Accounting data is stored in files for later retrieval via file transfer rather than retrieved directly via SNMP, because the potential quantity of such data makes direct SNMP retrieval infeasible in general.
Object selection uses (subtree, list) tuples so that only one OID and one OCTET STRING are needed to define a subset of objects, requiring an NM application to create only one conceptual row per subset rather than one row per object.
The same set of objects is collected for every connection record within a file, allowing object names to be stored once in the header rather than as (name, value) pairs per record, resulting in significantly smaller file sizes.
Two agent behaviors are defined for file-full events: 'swapOnCommand' lets the management application control swap timing (risks data discard) while 'swapOnFull' has the agent automatically begin a new suffixed file version (risks needing extra storage). Neither is mandated; agents advertise their mode via acctngAgentMode.
The MIB is specified in SMIv2 but a semantically equivalent SMIv1 translation is possible, except where no translation exists (e.g., Counter64 objects must be omitted). Machine-readable SMIv2 information becomes textual descriptions in SMIv1.
The standard collection file format is BER-encoded ASN.1 (acctngFileFormat = ber(2)), but the MIB permits enterprise-specific formats (other(1)). A new format value takes effect only after the next swap to a new file.
A conceptual row in acctngSelectionTable cannot have status 'active' until values have been assigned to acctngSelectionSubtree, acctngSelectionList, and acctngSelectionFile.
acctngFileName must be unique across all instances; an agent returns an error (e.g., wrongValue) if a SET attempts to duplicate an existing name or uses a name invalid on the local file system. The value cannot be changed while acctngFileRowStatus is 'active'.
An agent must not refuse to modify acctngSelectionSubtree, acctngSelectionList, or acctngSelectionFile even while the row is 'active', and must not refuse to destroy a row whose referenced file is active. Such changes only take effect at the next file swap.
Every completed collection file must contain an integral number of connection records. When a file reaches its maximum size, collection is terminated either immediately before or immediately after storing the whole current connection record.
Minimum compliance (acctngCompliance) requires only SVC collection (svcIncoming, svcOutgoing), onRelease collect mode, and BER file format. Write access to most file and selection objects is not required for compliance.
acctngAgentMode (read-only) advertises whether the agent operates as swapOnCommand(1) (discards data until management instructs a swap) or swapOnFull(2) (automatically swaps to a new file version when the current file becomes full).
acctngFileCollectMode BITS controls when data is written: onRelease(0) writes on connection termination/removal; periodically(1) writes on expiry of acctngFileInterval. The collectNow command always writes regardless of this setting.
acctngFileCommand is a state/action object: readable states are idle(1) and cmdInProgress(2); writable actions are swapToNewFile(3) (terminates current file and begins a new one) and collectNow(4) (immediately stores records for all qualifying active connections). Writing is only permitted when the value is 'idle'.
acctngFileTable entries control collection files with fields for name, suffix (read-only, appended when agent auto-swaps), description, command, maximum size (default 5 MB), current size, format (ber/other), collect mode, failed-attempt collection, periodic interval (default 3600 s), and minimum connection age (default 3600 s).
acctngProtection uses TestAndIncr to prevent duplicate SNMP messages from causing repeated swap commands. A management application must retrieve the current value and include a binding that sets it to that same value in any protected Set operation.
acctngSelectionTable holds entries each specifying a (subtree, list) tuple (acctngSelectionSubtree + acctngSelectionList), the target file (acctngSelectionFile), and connection types (acctngSelectionType BITS) to collect. Changes only take effect at the next file swap.
acctngSelectionType is a BITS object with ten flags: svcIncoming(0), svcOutgoing(1), svpIncoming(2), svpOutgoing(3), pvc(4), pvp(5), spvcOriginator(6), spvcTarget(7), spvpOriginator(8), spvpTarget(9), defaulting to SVC types only.
Notifications acctngFileNearlyFull and acctngFileFull are defined. NearlyFull fires on transition to exceeding acctngControlTrapThreshold percent of max size; Full fires on transition to max size and, if acctngAgentMode is swapOnCommand, fires periodically until collection resumes.
IANA assigned the ACCOUNTING-CONTROL-MIB MODULE-IDENTITY the OID { mib-2 60 } (1.3.6.1.2.1.60) for this MIB module.
SNMPv1 alone is not a secure environment. Implementers are recommended to use SNMPv3 with the User-based Security Model (RFC 2274) and View-based Access Control Model (RFC 2275) to restrict GET/SET access to authorized principals.
Unauthorized access to the accounting control MIB could disrupt data collection — for example, by disabling collection or causing the wrong data items to be collected — potentially with fraudulent intent. Access must be restricted.
acctngAdminStatus/acctngOperStatus: setting adminStatus to enabled causes operStatus to become enabled if collection can begin; setting adminStatus to disabled causes operStatus to become disabled once collection has terminated. Disabling does not remove existing configuration.
acctngFileCommand transitions: idle → cmdInProgress on a successful write of swapToNewFile or collectNow; cmdInProgress → idle on command completion. Writing is rejected unless the current state is idle.
A collection file is an ASN.1 SEQUENCE (tag [1] IMPLICIT) encoded in BER containing: sysName (DisplayString), description (DisplayString), startTime (DateAndTime), a SEQUENCE OF (subtree OBJECT IDENTIFIER, list OCTET STRING) tuples, followed by a SEQUENCE OF connection records each containing per-tuple sequences of ObjectSyntax values.
BER encoding of collection files permits indefinite-form length encoding for structured types (SEQUENCE and SEQUENCE OF), which is an exception to the standard SNMPv2 BER encoding rules.
DataCollectionList is an OCTET STRING (SIZE 0..8) bit-field: data items 1–8 occupy the first octet with item 1 at the MSB; a set bit means the item is included. If the OCTET STRING is too short to represent an item, that item is absent from the set.