2 Replies Latest reply on Jul 18, 2019 8:40 AM by Lucas David Ferreira da Costa

    Hosts to Location (main location per subnet, subsidiary location per hostname)

    Lucas David Ferreira da Costa
      Share This:

      Hello, I'm trying to write a pattern that links hosts to one main location per subnet and to subsidiary locations per hostname. My question is how can I join the attached pattern with the template_host_location pattern.

       

      For example: I want to link the host with the subnet 10.*.*.*/24 to the main location 'Main Location' and at the same time the hostname which starts with BCBA[S]*, BCBA[C]* BCBA[P]*, BCBA[F]*, BCBA[H]*, BCBA[DC]* to the subsidiary location 'Production'. And the hostname which starts which BCBA[TV]*, BCBA[DV]*, BCBA[LV]* on the subsidiary location 'No production'.

       

      Discovery version is 11.3.0.2.

      Latest TKU:TKU-2019-07-1-ADDM-11.3+

       

      Any kind of help is welcome. Thank you very much.

        • 1. Re: Hosts to Location (main location per subnet, subsidiary location per hostname)
          Nick Smith

          I don't see any attached pattern.

           

          At a high level, once you have triggered off a Host, you can certainly use different logic to attach different arbitrary Location nodes: once based on the Subnets, another Location node bases on a string extracted from a hostname.

          • 2. Re: Hosts to Location (main location per subnet, subsidiary location per hostname)
            Lucas David Ferreira da Costa

            Sorry, now I attach it. In the pattern I created a table with the subnets relating them to the locations. What I'm confused about is how to make another condition to relate those same hosts to the subsidiary locations conditioning by the hostname. Below is the logic that I want to implement.

            --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

            10.250.*.*/16--|                            /Hostname which starts with BCBA[S]*, BCBA[C]*, BCBA[P]*, BCBA[F], BCBA[H]*, BCBA[DC]* -> Location1.SubLocation1

            172.17.*.*/16--|                          /

            172.27.*.*/16--|---> Location 1 /

            172.21.*.*/16--|                        \

            192.*.*.*/19----|                          \Hostname which starts with BCBA[TV]*, BCBA[DV]*, BCBA[LV]* -> Location1.SubLocation2

             

             

             

            172.18.*.*/16---|                        /Hostname which starts with BCBA[S]*, BCBA[C]*, BCBA[P]*, BCBA[F], BCBA[H]*, BCBA[DC]* -> Location2.SubLocation1

            172.28.*.*/16---|---> Location 2/

            172.20.*.*/16---|                        \Hostname which starts with BCBA[TV]*, BCBA[DV]*, BCBA[LV]* -> Location2.SubLocation2

             

             

             

            10.150.*.*/16---|                          /Hostname which starts with BCBA[S]*, BCBA[C]*, BCBA[P]*, BCBA[F], BCBA[H]*, BCBA[DC]* -> Location3.SubLocation1

            172.19.*.*/16---|                        /

            172.29.*.*/16---|---> Location 3/

            172.22.*.*/16---|                        \

            192.168.*.*/19--|                        \Hostname which starts with BCBA[TV]*, BCBA[DV]*, BCBA[LV]* -> Location3.SubLocation2

             

             

            10.251.*.*/24---|                        /Hostname which starts with BCBA[S]*, BCBA[C]*, BCBA[P]*, BCBA[F], BCBA[H]*, BCBA[DC]* -> Location4.SubLocation1

            10.211.*.*/19---|---> Location 4/

            10.211.*.*/16---|                        \Hostname which starts with BCBA[TV]*, BCBA[DV]*, BCBA[LV]* -> Location4.SubLocation2

            --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------