<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: NW Field Memo</title>
    <description>The latest articles on DEV Community by NW Field Memo (@nw_field_memo).</description>
    <link>https://dev.to/nw_field_memo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4112039%2Fc27e4663-6f4b-494b-aa62-7d382106621e.png</url>
      <title>DEV Community: NW Field Memo</title>
      <link>https://dev.to/nw_field_memo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nw_field_memo"/>
    <language>en</language>
    <item>
      <title>snmpwalk Works. Is Your Monitoring Actually Ready?</title>
      <dc:creator>NW Field Memo</dc:creator>
      <pubDate>Sun, 06 Sep 2026 09:17:12 +0000</pubDate>
      <link>https://dev.to/nw_field_memo/snmpwalk-works-is-your-monitoring-actually-ready-51m5</link>
      <guid>https://dev.to/nw_field_memo/snmpwalk-works-is-your-monitoring-actually-ready-51m5</guid>
      <description>&lt;p&gt;&lt;em&gt;Adapted from &lt;a href="https://note.com/nw_field_memo/n/n543cd0eb4a7d" rel="noopener noreferrer"&gt;my original Japanese article&lt;/a&gt;, with AI-assisted translation and editing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;My manager: “Test this device.” (Doesn't really know the product or the technology.)&lt;/p&gt;

&lt;p&gt;Me: “Sure.” (Also doesn't really know the product or the technology.)&lt;/p&gt;

&lt;p&gt;If you've worked in infrastructure, that may sound familiar. I'm Goda, a network engineer sharing things I learned while figuring out the job.&lt;/p&gt;

&lt;p&gt;SNMP comes up in a lot of network device testing. For a while, my idea of an SNMP test was simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;snmpwalk&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Watch a pile of OIDs and values scroll past.&lt;/li&gt;
&lt;li&gt;Mark SNMP as working.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A screen full of output is reassuring. It certainly &lt;em&gt;looks&lt;/em&gt; like something is being monitored.&lt;/p&gt;

&lt;p&gt;Then I was asked to write a test plan for a device. I added an item along the lines of “Confirm that information can be retrieved using SNMP” and sent it for review.&lt;/p&gt;

&lt;p&gt;The feedback was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which OIDs will you use for CPU and memory?&lt;/p&gt;

&lt;p&gt;The customer will probably ask. You should at least cover those.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That was when it clicked: &lt;strong&gt;a successful walk and successful retrieval of the metrics we need are two different things.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;My other thought was, “Fine, you write the test plan, then.”&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;But the feedback was fair. Getting &lt;em&gt;something&lt;/em&gt; back is not the same as getting what you need.&lt;/p&gt;

&lt;h2&gt;
  
  
  What did the successful walk actually prove?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;snmpwalk&lt;/code&gt; is useful. Net-SNMP's tool uses GETNEXT requests to walk through a subtree starting from a specified OID. &lt;a href="https://www.net-snmp.org/docs/man/snmpwalk.html" rel="noopener noreferrer"&gt;Net-SNMP manual&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If it successfully returns values, you've established that &lt;strong&gt;you could read those values under those test conditions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That matters. It does not, by itself, establish that your CPU and memory monitoring requirements are satisfied, or that every required OID is available.&lt;/p&gt;

&lt;p&gt;I had been treating a successful command as a much broader result than it actually was.&lt;/p&gt;

&lt;h2&gt;
  
  
  Break “SNMP testing” into specific checks
&lt;/h2&gt;

&lt;p&gt;Today, I'd separate at least these questions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;What to check&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Can I communicate over SNMP?&lt;/td&gt;
&lt;td&gt;Whether the device responds to the intended request under the defined conditions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Can I monitor CPU?&lt;/td&gt;
&lt;td&gt;The processor or resource being measured, the meaning of the value, and its averaging period&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Can I monitor memory?&lt;/td&gt;
&lt;td&gt;The resource being measured, its units, and any required conversion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Can the monitoring server collect the data?&lt;/td&gt;
&lt;td&gt;Results from the actual monitoring server and monitoring application&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Can I receive the required trap?&lt;/td&gt;
&lt;td&gt;The notification produced by the relevant event and its documented trigger conditions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;“SNMP polling: &lt;code&gt;snmpwalk&lt;/code&gt; returns values” leaves a lot of room for interpretation.&lt;/p&gt;

&lt;p&gt;It can be a perfectly reasonable connectivity check if you define its scope. If the goal includes CPU or memory monitoring, the acceptance criteria need to go further.&lt;/p&gt;

&lt;h2&gt;
  
  
  A number needs a definition
&lt;/h2&gt;

&lt;p&gt;Suppose you retrieve:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;123456
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What does it mean? Which resource does it describe? What are the units? Is it an instantaneous measurement or an average?&lt;/p&gt;

&lt;p&gt;The following examples use HOST-RESOURCES-MIB to illustrate why those questions matter. Check what your actual device and software release support.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;hrProcessorLoad&lt;/code&gt; reports an individual processor's non-idle time as a percentage, averaged over roughly the preceding minute. It is not simply an instantaneous, whole-device CPU percentage. The definition permits implementations to approximate that averaging period. &lt;a href="https://www.rfc-editor.org/rfc/rfc2790.html" rel="noopener noreferrer"&gt;RFC 2790&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If it differs from the number on the device's GUI, first ask whether both displays measure the same thing over the same period.&lt;/p&gt;

&lt;p&gt;For memory, &lt;code&gt;hrStorageUsed&lt;/code&gt; is a count of allocation units. To express usage in bytes, multiply it by &lt;code&gt;hrStorageAllocationUnits&lt;/code&gt; from the &lt;strong&gt;same table row&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Used bytes = allocation units in use × bytes per allocation unit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You also need to identify whether that row represents the memory area you intended to monitor. A readable OID is not enough; the interpretation needs to be right. &lt;a href="https://www.rfc-editor.org/rfc/rfc2790.html" rel="noopener noreferrer"&gt;RFC 2790&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My laptop can read it. Can the monitoring server?
&lt;/h2&gt;

&lt;p&gt;These are separate checks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;My laptop can retrieve the value.&lt;/li&gt;
&lt;li&gt;The actual monitoring server can retrieve the value.&lt;/li&gt;
&lt;li&gt;The monitoring application records it.&lt;/li&gt;
&lt;li&gt;The application displays it as the metric we intended.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Don't sign off on more than your evidence supports.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A successful walk from a laptop does not establish that the monitoring system is working end to end.&lt;/p&gt;

&lt;p&gt;That doesn't mean every device test has to cover the entire monitoring system. It means the test plan should state what this test covers, and what belongs to a later test or another team.&lt;/p&gt;

&lt;p&gt;If end-to-end monitoring is in scope, the requirements may also call for checking threshold evaluation and alert delivery.&lt;/p&gt;

&lt;p&gt;Network conditions matter, too. A laptop on the device's subnet and a monitoring server that reaches it through a router do not necessarily exercise the same path or access controls. Success from one does not prove access from the other.&lt;/p&gt;

&lt;h2&gt;
  
  
  Polling and traps need separate tests
&lt;/h2&gt;

&lt;p&gt;Polling is the monitoring side asking, “What's the current value?”&lt;/p&gt;

&lt;p&gt;A trap is the device reporting, “This event happened.”&lt;/p&gt;

&lt;p&gt;Retrieval requests and SNMPv2 traps are distinct protocol operations. Reading an OID successfully does not prove that a trap exists for that condition, or that the device will send it in your test. &lt;a href="https://www.rfc-editor.org/rfc/rfc3416.html" rel="noopener noreferrer"&gt;RFC 3416&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You need to check whether the product implements the notification and what triggers it.&lt;/p&gt;

&lt;p&gt;Cisco ISE provides a useful documented example. The &lt;strong&gt;ISE 3.5&lt;/strong&gt; administration guide explains that manually stopping a process also stops Monit's monitoring of that process, so that operation does not produce the process-stop trap. It describes the trap as applying to an unexpected process stop that is not automatically recovered. &lt;a href="https://www.cisco.com/c/en/us/td/docs/security/ise/3-5/admin_guide/b_ise_admin_3_5/b_ISE_admin_troubleshooting.html" rel="noopener noreferrer"&gt;Cisco ISE 3.5: Process-Monitoring SNMP Traps&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So “I stopped the process and received no trap” is not enough to conclude that SNMP is broken.&lt;/p&gt;

&lt;p&gt;This is an example from the ISE 3.5 documentation, not a rule for every product, release, or trap. Match your test to the documented behavior of the version you're testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I'd write the test items now
&lt;/h2&gt;

&lt;p&gt;My old test item was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;SNMP polling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Confirm that &lt;code&gt;snmpwalk&lt;/code&gt; returns values.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I'd now separate it into more specific checks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;CPU monitoring&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve the CPU-related metrics used by the monitoring design. Confirm that the measured resource, the meaning of the value, and the averaging period match that design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Memory monitoring&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Retrieve the memory-related metrics used by the monitoring design. Confirm that the resource, units, and any required conversion match that design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring system collection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Collect the required metrics through the actual monitoring system and confirm that they are recorded and displayed as intended.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the design specifies the OIDs, include them in the test plan. For table values, also record which instances to use and how to identify them.&lt;/p&gt;

&lt;p&gt;That gives you an answer when someone later asks, “What exactly did we verify?”&lt;/p&gt;

&lt;h2&gt;
  
  
  A successful command is one piece of evidence
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;snmpwalk&lt;/code&gt; returns data. A ping succeeds. An SSH login works.&lt;/p&gt;

&lt;p&gt;Each result is useful. Whether it is enough depends on the purpose of the test.&lt;/p&gt;

&lt;p&gt;For monitoring, the question is whether we can monitor the things we're supposed to monitor. Anything outside the current test's scope should be explicitly handed over to the next test or the responsible team.&lt;/p&gt;

&lt;p&gt;It sounds obvious now. I didn't really understand it until I had to write the test plan myself.&lt;/p&gt;

&lt;p&gt;If your current SNMP test plan is basically “run a walk and see what happens,” I hope this gives you a few useful questions to add.&lt;/p&gt;

&lt;p&gt;A related topic I plan to write about is whether knowing an OID tells you anything about the traps a device can send. That's another distinction I initially missed.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.net-snmp.org/docs/man/snmpwalk.html" rel="noopener noreferrer"&gt;Net-SNMP: snmpwalk manual&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc2790.html" rel="noopener noreferrer"&gt;RFC 2790: Host Resources MIB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc3416.html" rel="noopener noreferrer"&gt;RFC 3416: SNMP protocol operations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.cisco.com/c/en/us/td/docs/security/ise/3-5/admin_guide/b_ise_admin_3_5/b_ISE_admin_troubleshooting.html" rel="noopener noreferrer"&gt;Cisco ISE 3.5 Administration Guide: Troubleshoot&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>networking</category>
      <category>monitoring</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
