3 Replies Latest reply on May 19, 2020 2:10 PM by Matthew Ragland

    Create a smart group based on IP range

    Soundappan Shanmugam
      Share This:

      what category to select for IP Range based Smart grouping of servers

      What category would be good if that the case

       

      it can be either based on subnet or it can be based on IP range from 

      10.192.204.10 to

      10.192.204.100

       

      or any string regex is needed for this within the smart group?

       

      if you have any screen shot it would be good.

        • 1. Re: Create a smart group based on IP range
          Parag Desai

          Is this possible?

           

          Regards,

          Parag

          • 2. Re: Create a smart group based on IP range
            Newton Nyante

            Currently cannot define an ip range for a smart group.  The ip_address property is a string, so just string conditions can be used.  so limited options for ranges to be defined.

            • 3. Re: Create a smart group based on IP range
              Matthew Ragland

              Here is how I did it:

              1. Create a Custom Property Class (If you don't already have one) call it something like SERVER_PROPERTY

              2. Add 4 integer properties to the SERVER_PROPERTY property class:

              • IP_FIRST_OCTET
              • IP_SECOND_OCTET
              • IP_THIRD_OCTET
              • IP_FOURTH_OCTET

              3. Create a Server Property and associate the Server Property to the SERVER_PROPERTY custom property class, like this:

              4. Create a Component Template (Compliance type)

              5. Add an extended object to component template, make it like this:

              If using multiple OS's make sure to make one for each OS

              6. Create a local property called VAR_INT, make it an integer type

              7. Create a compliance rule, use assign/persist to set the property instance values to the octet values like this:

              ??VAR_INT?? := "Extended Object Entry:IP_OCTETS//*"."Value1 as Integer (All OS)"  AND
              ??TARGET.SERVER_PROPERTY.IP_FIRST_OCTET?? persist ??VAR_INT??  AND
              ??VAR_INT?? := "Extended Object Entry:IP_OCTETS//*"."Value2 as Integer (All OS)"  AND
              ??TARGET.SERVER_PROPERTY.IP_SECOND_OCTET?? persist ??VAR_INT??  AND
              ??VAR_INT?? := "Extended Object Entry:IP_OCTETS//*"."Value3 as Integer (All OS)"  AND
              ??TARGET.SERVER_PROPERTY.IP_THIRD_OCTET?? persist ??VAR_INT??  AND
              ??VAR_INT?? := "Extended Object Entry:IP_OCTETS//*"."Value4 as Integer (All OS)"  AND
              ??TARGET.SERVER_PROPERTY.IP_FOURTH_OCTET?? persist ??VAR_INT??
              

               

              8. Now run create a compliance job from your component template, select auto discovery

              9. Once the compliance has finished, you can now create a smart group that looks like this:

              1 of 1 people found this helpful