SnmpKit.SnmpSim.ValueSimulator (snmpkit v0.6.3)
Generate realistic values based on MIB-derived behavior patterns. Supports counters, gauges, enums, and correlated metrics with time-based variations.
Summary
Functions
Apply configurable jitter to gauge values based on device and metric type. Different metrics have different jitter characteristics.
Simulate realistic counter wrap behavior with device-specific patterns. Different device types may handle wrap differently.
Check if a counter value is approaching its maximum and likely to wrap soon. Used to predict and prepare for counter wrap events.
Generate counter discontinuity events that occur during counter wraps. Some devices increment discontinuity counters when main counters wrap.
Simulate a value based on profile data, behavior configuration, and device state.
Calculate the time until counter wrap based on current increment rate. Returns estimated seconds until wrap occurs.
Functions
Apply configurable jitter to gauge values based on device and metric type. Different metrics have different jitter characteristics.
Simulate realistic counter wrap behavior with device-specific patterns. Different device types may handle wrap differently.
Check if a counter value is approaching its maximum and likely to wrap soon. Used to predict and prepare for counter wrap events.
Generate counter discontinuity events that occur during counter wraps. Some devices increment discontinuity counters when main counters wrap.
Simulate a value based on profile data, behavior configuration, and device state.
Examples
# Traffic counter simulation
value = SnmpKit.SnmpSim.ValueSimulator.simulate_value(
%{type: "Counter32", value: 1000000},
{:traffic_counter, %{rate_range: {1000, 125_000_000}}},
%{device_id: "cm_001", uptime: 3600, interface_utilization: 0.3}
)
Calculate the time until counter wrap based on current increment rate. Returns estimated seconds until wrap occurs.