6 Replies Latest reply on Jan 3, 2014 12:23 PM by derhally

    Database default value null causes issue adding

    ed_gpc

      When using the API to add a device, the default for IOS Version and OS type are null.

       

      Without these values in the DB, the node details fail to display.

       

      Perhaps a default value of Unknown would be better.

       

      My instance: we use Juniper SRX210 devices and the OS Type and Version are part of the description string.

        • Re: Database default value null causes issue adding
          Jan Pelousek

          Hello,

          you're right. AFAIK that's something that is planned in the future. For now you have to initialize the values (not all) as on example:

           

          $newNodeProps = @{

                            EntityType="Orion.Nodes";

                            IPAddress='1.1.1.1';

                             IPAddressGUID= [guid]::NewGuid();

                            Caption='blabla';

                            DynamicIP=$False;

                              NodeDescription="desc";

                            EngineID=1;

                            Status=1;

                            UnManaged=$False;

                            Allow64BitCounters='True';

                            SysObjectID='';   

                            ObjectSubType="SNMP";

                            SNMPVersion=2;

                            Community='public';

                              RediscoveryInterval="5";

                              #NextRediscovery=$NextRediscovery;

                              BufferNoMemThisHour='-2';

                              BufferNoMemToday='-2';

                              BufferSmMissThisHour='-2';

                              BufferSmMissToday='-2';

                              BufferMdMissThisHour='-2';

                              BufferMdMissToday='-2';

                              BufferBgMissThisHour='-2';

                              BufferBgMissToday='-2';

                              BufferLgMissThisHour='-2';

                              BufferLgMissToday='-2';

                              BufferHgMissThisHour='-2';

                              BufferHgMissToday='-2';

                              IOSImage = '';

                              IOSVersion = '';

                              SNMPV2Only = '0';

                              CPULoad = '-2';

                              TotalMemory = '-2';

                              MemoryUsed = '-2';

                              PercentMemoryUsed = '-2';

                              RWSNMPv3AuthKeyIsPwd='1';

                              RWSNMPV3AuthKey = 'None';

                              RWSNMPV3AuthMethod = 'None';

                              RWSNMPV3Context  = 'None';

                              RWSNMPv3PrivKeyIsPwd ='1';

                              RWSNMPV3PrivKey  = 'None';

                              RWSNMPv3PrivMethod = 'None';

                              RWSNMPV3Username  = 'None';

                              SNMPv3AuthKeyIsPwd  = '1';

                              SNMPV3AuthKey  = 'None';

                              SNMPv3AuthMethod  = 'None';

                              SNMPV3Context  = 'None';

                              SNMPv3PrivKeyIsPwd  = '1';

                              SNMPv3PrivKey  = 'None';

                              SNMPv3PrivMethod = 'None';

                              SNMPV3Username  = 'None';

                              PollInterval = '3600';

                              StatCollection = '60';

                              }

           

          You don't need to initialize all (e.g. you don't need buffer values etc.. I don't have in my head the exact list), but this is something which should work