8 Replies Latest reply on Dec 7, 2016 12:48 AM by seyhmusatli

    WMI Discovery Volumes Problem

    seyhmusatli

      Hi folks,

       

      I am implementing an integration with our CMDB. Trying to discover new server nodes added on CMDB. Nightly the my perl script is connecting to CMDB and Solarwinds DB, finding differences, if needed updates some custom properties or discovers new nodes.

       

      Everything is going as it was planned with snmp devices (AIX and Linux ones). However i wanted to extend the script for wmi devices. Discovery finishes successfully everytime.

       

      Volumes are listed on GUI but not monitored. For snmp i did not need to add related pollers. For wmi, i added polers for cpu and memory by hand and tried to add pollers for volumes as well, but even the api successfully returns there is no pollers for related volumes on DB.

       

      Any comment is appreciated.

       

      Thanks.

       

      Orion Platform 2015.1.3, NPM 11.5.3

        • Re: WMI Discovery Volumes Problem
          tdanner

          Can you make a simple script for adding a WMI node with volumes that demonstrates the problem?

            • Re: WMI Discovery Volumes Problem
              seyhmusatli

              Here is my discovery profile variable:

               

              my %DiscoveryProfile = (

                Name => 'SDKDiscovery_'.$dayMonthYear,

                EngineId => undef,

                JobTimeoutSeconds => 3600,

                SearchTimeoutMiliseconds => 2000,

                SnmpTimeoutMiliseconds => 2000,

                SnmpRetries => 4,

                RepeatIntervalMiliseconds => 1800,

                SnmpPort => 161,

                HopCount => 0,

                PreferredSnmpVersion => "SNMP3",

                DisableIcmp => 0,

                AllowDuplicateNodes => 0,

                IsAutoImport => 1,

                IsHidden => 0,

                PluginConfigurations => undef

              );

              EngineID is replaced with a suitable one,

              and Plugin Configuration:

               

              my $json_text = '[
              {
              "BulkList": ['.$ip_addr.'],
              "IpRanges": null,
              "Subnets": null,
              "Credentials": ['
              .$creStr.
              '],
              "WmiRetriesCount": 1,
              "WmiRetryIntervalMiliseconds": 1000
              }
              ]';

               

              my $uri = $SWServer->{JSONUriBase}."/Invoke/Orion.Discovery/CreateCorePluginConfiguration";

               

               

              with discovery profile i call:

               

              my $uri = $SWServer->{JSONUriBase}."/Invoke/Orion.Discovery/StartDiscovery";

               

              Hope i covered your questiontdanner

               

              Thanks.

               

              edit:

               

              Also wanted to mention the pollers i added (cpu&mem - volume):

               

              my @wminodepollers = (

                "N.Details.WMI.Vista",

                "N.Uptime.WMI.XP",

                "N.Cpu.WMI.Windows",

                "N.Memory.WMI.Windows"

                );

               

              my @wmivolpollers = (

                "V.Details.WMI.Windows",

                "V.Statistics.WMI.Windows",

                "V.Status.WMI.Windows"

                );

                • Re: WMI Discovery Volumes Problem
                  tdanner

                  What does your code for adding the volume pollers look like?

                    • Re: WMI Discovery Volumes Problem
                      seyhmusatli

                      I think i could not express myself clearly enough.

                       

                      After creation of my Discovery Profile i run the discovery. For unix servers (with their own discovery configuration not mentioned above) disks, cpu and memory are automatically added no need to add pollers afterward.

                       

                      For windows servers, nothing is added so i decided to add pollers by hand. I first added the cpu, memory, uptime etc. pollers then volume pollers:

                       

                      create_poller(\%SWServer,$node_id,$nodepoll,"V");

                       

                      my $uri = $SWServer->{JSONUriBase}."Create/Orion.Pollers";

                       

                      my %SWPoller = (

                       

                      PollerType => $poller_type,
                      NetObject => $net_object.":".$node_id,
                      NetObjectType => $net_object,
                      NetObjectID => $node_id

                       

                      );

                      $rest->POST( $uri, $json_text, $SWServer->{JSONHeaders} );

                       

                      Cpu and memory pollers are added w/o any problem, however i connet see volume pollers not on gui or db itself (Pollers table) even if it returns success ("swis://server/Orion/Orion.Pollers/PollerID=526064")