Hello,

I want to monitor raidstatus on a HP proliant server running windows server 2012, to my knowledge so far this is only doable through snmp, which has been deprecated with the release of windows server 2012. I did however manage to enable the server but I can't seem to configure it at all. there's no useful configurations to be seen when going to service properties for snmp.

When I try to use a snmp sensor from prtg I get snmp error 2003 however I can't configure the snmp service on the server so I can't troubleshoot it. UPD ports are open and should not the problem.

Does anyone have any experience with snmp on windows server 2012 or know any alternative ways to monitor raid status other than through snmp?


Article Comments

You need to install and configure / start the SNMP service of the operating system. The service is no longer automatically available, but can be installed and then activated. This should allow you to connect to the machine in case.


Mar, 2013 - Permalink

Thanks for the reply Patrick, I do however realize this and I've been able to enable the snmp service, however there doesn't seem to be any configuration options for the service, i think there's tabs missing from the configuration. Which is why I can't troubleshoot it further myself. is this something you've seen before?


Apr, 2013 - Permalink

If you just install the SNMP service and immediately try to configure the snmp settings without a restart of the server the tab is missing. This behaviour exists since Windows 2008.

In order to get the SNMP setting tabs you have to open the service settings, start the service, close the settings and re-open the settings again. Now the tabs should be there.

Kind regards, Christoph


Apr, 2013 - Permalink

This did not work for me. I've even tried restarting the entire server. without luck.


Apr, 2013 - Permalink

For basic settings and discovering snmp it will be usefull to add a 'public' community in the 'Security'-tab with 'READ ONLY'(!)-rights.
If this setting is working you can refine community settings as well as host-restrictions for your needs.


Apr, 2013 - Permalink

Dieter, that's what I'm trying to get at indeed, however as mentioned I'm missing these additional tabs for the snmp service. reinstalling snmp, rebooting the hardware etc. have not solved the issue as I've read plenty of places that it should. so that's why I wondered if anyone here has ever seen this behaviour before.


Apr, 2013 - Permalink

Have you already tried the hints at joshancel.wordpress.com?


Apr, 2013 - Permalink

I though I searched pretty extensively however I did not come across that site, so good find! however it did not solve the issue.


Apr, 2013 - Permalink

You can although add the specific values to the registry manually or using the following powershell-script. The script is based on the work of Sander Stad and is slightly modified to work with Powershell 3.0 but only on localhost:

# PowerShell script to edit the SNMP registry
#
# Author: Sander Stad
# Version: 1.0 June 2011 tested on Powershell v2.0
# Version: 1.1 April 2013 tested on Powershell v3.0, working on localhost only!
# Usage: <script-path and name> -Manager '10.0.0.1, 10.0.0.2' -Community 'public, test' 

Param(
    [string] $Manager,                  # List of managers to add, a manager is the host who has access to snmp on this machine
    [string] $Community                 # List of communties to add
)

$Server='localhost'

$serviceCheck = Get-WmiObject -computer $Server Win32_Service -Filter "Name='SNMP'" -ErrorAction SilentlyContinue

# Check if the SNMP Service is installed
if($serviceCheck.Name -eq 'SNMP')
{
# Create the registry object
    $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $Server)
    $regKeyMan = $reg.OpenSubKey('SYSTEM\CurrentControlSet\services\SNMP\Parameters\PermittedManagers', $true)
    $regKeyCom = $reg.OpenSubKey('SYSTEM\CurrentControlSet\services\SNMP\Parameters\ValidCommunities', $true)

    # Get the amount of managers and communities already present
    $managerCount = $regKeyMan.ValueCount
    $communityCount = $regKeyCom.ValueCount
    $managerArray = @()
    $communityArray = @()

    # Get all the present values and save them in the array
    for($i = 1; $i -le $managerCount; $i++)
    {
        $managerArray += $regKeyMan.GetValue($i)
    }
    for($i = 0; $i -le $communityCount; $i++)
    {
        $communityArray += $regKeyCom.GetValue($i)
    }

    # Increase counters
    $managerCount++
    
    write-host $communityArray

    #Check if the localhost can query the SNMP service.
    if(($managerArray -contains 'localhost') -eq $false)
    {
         Write-Host -foregroundcolor Blue " - Adding manager key: localhost"
         $regKeyMan.SetValue($managerCount, 'localhost')
         $managerCount++
    }

    # Run through each of the managers and check the registry if the entry
    # already exists.
    $Manager.split(',') | foreach {
         $m=$_.Trim()
         if(($managerArray -contains $m) -eq $false)
         {
             Write-Host -foregroundcolor Blue " - Adding manager key: $m"
             # Add the manager if it doesn't exist
             $regKeyMan.SetValue($managerCount, $m, [Microsoft.Win32.RegistryValueKind]::String)
             #Increase the manager counter
             $managerCount++
         }
     }

     # Run through each of the communities and check the registry if the entry
     # already exists.
     $Community.split(',') | foreach {
         $c=$_.Trim()
         if(($communityArray -contains $c) -eq $false)
         {
         Write-Host -foregroundcolor Blue " - Adding community key: $c"
         # Add the community if it doesn't exist
         $regKeyCom.SetValue($c, 4, [Microsoft.Win32.RegistryValueKind]::DWord)
         # Increase the community counter
         }
     }
}
else
{
    write-host -foregroundcolor Red "SNMP Service not present!"
}

Write-host -foregroundcolor Green “Completed”

Apr, 2013 - Permalink

Hey, I found a solution. If I run compmgmt.msc as a domain admin and then connect to the server with said problem using computer management, the additional tabs show up when looking at properties for services.


May, 2013 - Permalink