Enterprise Mib's with the snmp monitor

Topics: Developer Forum, User Forum
Feb 16, 2009 at 11:17 PM


 I'm trying to monitor an AS400 and continually get "system.Exception" errors when trying to use the SNMP monitor to monitor CPU usage. The oid is . If I monitor a "standard" snmp oid, IE one that's not under the private, enterprises part of the mib tree it works fine. Is it possible to load / use enterprise mib files with the SNMP monitor? i've tried placing the files in the Polymon Executive and monitor directories without success.




Feb 16, 2009 at 11:34 PM
System does not support loading MIB files.
If the standard SNMP support is not sufficient, you are probably best off using PowerShell to do this. I don't have any specific examples on using PowerShell for SNMP polling, but here a few resources that may be of help:


Maybe someone else has some ideas on this?
Feb 17, 2009 at 1:17 AM
Thanks for such a prompt reply. I'll try the powershell route using the netcmdlets product. Love Polymon by the way, does everything we've asked of it so far except this particular issue.
Feb 17, 2009 at 1:36 AM
The /n NetCmdlets might be the route to go, but I've found some oddness with SNMP monitors both when running from the built in monitor and using the Netcmdlets.  The monitor will always run properly in the user context, but occasionally will get an object reference error when running as a service.  I've tried changing the account and having the service run under my account, with the same results.  One of these days (when the pain is great enough), I'll dig further into this. 
Feb 17, 2009 at 3:38 AM
Thanks for all the replies. I've got this working using the /n netCmdlets get-snmp cmdlet. for those who may be interested this is the code I've used for the Powershell monitor:

Add-PSSnapin -name NetCmdlets

#Alter IP to suit
$cpu = get-snmp -agent -oid . -version 1

# divide value by 100 to get percentage value

$cpuUsage = ($cpu.OIDValue / 100)

$Counters.Add("CPU", $cpuUsage)

if ($cpuUsage -lt 85) {

$Status.StatusText="Cpu UsageOK. Below 85%"


} elseif ($cpuUsage -gt 85 -and $cpuUsage -lt 90) {

$Status.StatusText="Warning Cpu Above 85%"


} else {

$Status.StatusText="Critical ! Cpu Above 90%"