302-snmp-monitoring-patterns

302-snmp-monitoring-patterns is a cursor rule for Cursor from hamzaamjad/cursor-rules. It costs 0 tokens per session (1,079 once invoked), scanned A, original, MIT.

A set of rules for monitoring network devices with SNMP, a standard for reading device statistics remotely. It covers finding interfaces, checking counters, testing gradually, and handling failures.

In plain words
What is it for?
It is for discovering network interfaces, measuring download and upload counters, testing monitoring commands, and handling unreachable devices.
Why use it?
It helps avoid incorrect interface numbers, misleading traffic readings, and fragile monitoring scripts.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit It is for discovering network interfaces, measuring download and upload counters, testing monitoring commands, and handling unreachable devices.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/hamzaamjad/cursor-rules/302-snmp-monitoring-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/hamzaamjad/cursor-rules

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 302-snmp-monitoring-patterns

README.md
[![agentmods](https://agentmods.dev/badge/rules/hamzaamjad/cursor-rules/302-snmp-monitoring-patterns/github.svg)](https://agentmods.dev/rules/hamzaamjad/cursor-rules/302-snmp-monitoring-patterns)
Your own site
<a href="https://agentmods.dev/rules/hamzaamjad/cursor-rules/302-snmp-monitoring-patterns"><img src="https://agentmods.dev/badge/rules/hamzaamjad/cursor-rules/302-snmp-monitoring-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for 302-snmp-monitoring-patterns

Your own site · 80×15
<a href="https://agentmods.dev/rules/hamzaamjad/cursor-rules/302-snmp-monitoring-patterns"><img src="https://agentmods.dev/badge/rules/hamzaamjad/cursor-rules/302-snmp-monitoring-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,079 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01079
Opus 5 $0.00000 $0.00540
Sonnet 5 $0.00000 $0.00216
Haiku 4.5 $0.00000 $0.00108

Measured 12d ago against content hash 8d3f5afebc66, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

302-snmp-monitoring-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/300-techniques/302-snmp-monitoring-patterns.mdc · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

snmp-monitoring-patterns.mdc

  • Purpose: Standardize SNMP network monitoring implementation patterns to prevent common pitfalls and ensure reliable monitoring setup.
  • Requirements:
    1. Interface Discovery First: Always run snmpwalk -v2c -c [community] [host] 1.3.6.1.2.1.2.2.1.2 to get interface descriptions before hardcoding OIDs. Map interface names to indices.
    2. Counter Validation: Test specific OIDs with snmpget commands before implementing continuous monitoring loops. Verify counters are incrementing as expected.
    3. Activity Characterization: Clarify monitoring goals with user:
      • Stability: Minimal counter changes, low noise
      • Activity: High frequency changes, real-time traffic
      • Specific Traffic: WAN, LAN, or application-specific monitoring
    4. Incremental Testing: Follow progression: single measurement → short interval testing → continuous monitoring
    5. OID Construction Pattern: Use format 1.3.6.1.2.1.2.2.1.[10|16].[interface_index] where 10=download, 16=upload
    6. Error Handling: Include timeout handling, community string validation, and graceful degradation for unreachable interfaces
  • Common Interface Patterns:
    • WAN Interfaces: switch0, br0, eth0, ppp0
    • Bridge Interfaces: br0, br1 (often aggregate traffic)
    • VLAN Interfaces: switch0.1, eth0.2 (sub-interfaces)
    • Loopback: lo (avoid for WAN monitoring)
  • Discovery Optimization Patterns:
    • WAN Interface Filtering: Use strict pattern matching (eth0-9, br0-9, specific VLANs) over broad inclusion to reduce 5000+ interfaces to 10-50 candidates
    • Discovery vs Monitoring Split: Always clarify whether optimizing discovery speed or monitoring accuracy before implementing
    • Interface Ranking: Present discovered interfaces in priority table for user selection rather than automatic optimization
    • Batch Validation: Process interface validation in batches of 5 to avoid overwhelming router
    • Deduplication: Remove duplicate interface names (common with multiple SNMP indices for same interface)
    • IP Address Filtering: Exclude IP addresses (/^\d+\.\d+\.\d+\.\d+$/) from interface name results
    • Priority Categories:
      • primary_wan (switch0, br0, eth0 + common VLANs) - highest priority
      • physical_wan (eth1-9) - physical ports
      • bridge_wan (br1-9) - bridge interfaces
      • ppp_wan (ppp0+) - PPP connections
      • named_wan (wan*, internet*, uplink*) - explicitly named
  • Validation:
    • Check: Was interface discovery performed before OID hardcoding?
    • Check: Were test measurements taken to validate counter behavior?
    • Check: Are monitoring goals clearly defined (stability vs activity)?
    • Check: Does the implementation handle SNMP errors gracefully?
    • Check: For optimization requests, were performance targets and output preferences confirmed upfront?
    • Check: Was interface filtering applied to reduce discovery scope to manageable size (10-50 candidates)?
    • Check: Were discovered interfaces presented in ranking table for user selection?
  • Examples:
    • Discovery Command: snmpwalk -v2c -c public 192.168.1.1 1.3.6.1.2.1.2.2.1.2
    • Validation Test: snmpget -v2c -c public 192.168.1.1 1.3.6.1.2.1.2.2.1.10.4
    • Activity Test: Run 3 measurements 2 seconds apart to assess counter change frequency
    • Optimization Scope Confirmation: "Target interface count? Acceptable discovery time? Minimal vs detailed output?"
    • Interface Ranking Table: Present "1. br0 [primary_wan] - 14M bytes activity, 2. eth4 [physical_wan] - 18M bytes activity" before selecting
    • Assumption Echo: "Using strict eth0-9/br0-9 patterns to limit to ~10-50 interfaces...OK?"
  • Changes:
    • v1.0: Initial version based on bandwidth monitoring retrospective
    • v1.1: Added Discovery Optimization Patterns section based on WAN interface filtering task retrospective (reduced 5000+ to 13 interfaces)
  • Source References: Retrospective from SNMP bandwidth monitoring implementation task and WAN interface discovery optimization task.

Read the full file on GitHub · 58 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 58 lines · 0 tokens per session scan A 8d3f5afebc66

Subscribe to this mod's changes

302-snmp-monitoring-patterns is a cursor rule published in the GitHub repository hamzaamjad/cursor-rules (2 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,079 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.