12 Replies Latest reply on Jul 30, 2010 4:22 PM by Fred Breton

    Compliance on N objects

      Is it possible to run a Compliance Job against an unknown number of objects?




      Server Live View -> Hardware Information -> Hardware -> Network Cards


      A situation came up where we needed to see if there were any servers using NIC sharing in our environment.  The main difficulty was that we didn't know what the MAX number of NIC cards would be for any given server.  We'd build a CT that checked for NICs 1 -> 8 only to find a server with 10.  And then 12.  and then 13.


      I've been experimenting with this problem, but the best working setup I can come up with is a wildcarded compliance RULE.  The PARTS still need to be included.  Example screenshot:




      I'm looking for a way to make the PARTS be a wildcard as well.  Unfortunately, all attempts to load the Parts similar to: /Hardware/NetworkCards/* has resulted in failure.


      Is this possible?

        • 1. Re: Compliance on N objects
          Fred Breton

          You don't need wildcard in the part but just select the parent level of the object that needs to be check in your rules.

          So, in your case, I guess that only selecting  /Hardware/NetworkCards as a part should make the job.

          • 2. Re: Compliance on N objects
            Fred Breton

            Forgot to mention that in your rule when you want to access to the child of the part you need to use /** and not /*

            • 3. Re: Compliance on N objects
              Fred Breton

              In BBSA 8.0, the following rule work perfectly with only the part /Hardware/NetworkCards:


              foreach "Hardware Information.Network Card:/**"

                   "Description (Windows)" does not contain "Teaming"


              • 4. Re: Compliance on N objects

                I'm on  I dont' recognize the "foreach" example you supplied above as being possible... Is that an 8.0 thing?


                When I use "/Hardware/NetworkCards" as my part, the job always ends in failure.  Well, technically it's a yellow ! telling me:


                "com.bladelogic.daaal.DAALException: DAAL Unspecified Error 100 : null : on host MyServerHere"


                Expanding the results shows that every single server is compilant (not so in reality) since the rule states: "Part must not exist OR Description must not contain "Teaming"  The rule is satisfied with the "must not exist" part since it's pulling up as NULL due to the configuration of the part.


                I've tried the parent part both with and without the "Includes/Excludes" area.  I've tried adding an include for * to no success.

                • 5. Re: Compliance on N objects








                  Job Log:




                  Prior to the run in the screenshots, I had deleted and rediscovered the components based off of the parts and rule above.  I've tried running the rule with /Hardware/NetworkCards/** as well with the same bad result.  All input is appreciated.

                  • 6. Re: Compliance on N objects
                    Fred Breton

                    Sorry, I've not a 7.x version installed so I can't test by myself. But when you select the part  /Hardware/NetworkCards part it should provide you access to the /Hardware/NetworkCard by recusivity.

                    So you should try to use in your wildcarded path  /Hardware/NetworkCard/** and I think it should work.

                    • 7. Re: Compliance on N objects
                      Fred Breton

                      I just thought that I should provide more information about your issue and the solution I just proposed (hoping it will work ;-)).

                      In what you did in your rule, you select as a type (and it's the right thing regarding what you want to achieve) a "Network Card" which is what you see as an object type in the prosing view. But in the wildcarded path, you put a path that is related to a "Network Cards" object type and this could not work.


                      The process of a compliance job is to first get the data from the target requesting data associated with the parts you defined as to be collected in the rules windows. Then when the data are collected the calculation of the rules is done.

                      When you select a part that containt childs and the recursive mode is selected (by default on Network Cards), during the data collection phase, the childs will be also collected (it's why when you know the exact childs you need, it's more efficient to put in the part the exact object needed).

                      So in you case, collecting "Network Cards" allow you to define rules on "Network Card" but the wildcarded path need to be coherent with the object type you used in your rule.


                      I hope this is clear.

                      • 8. Re: Compliance on N objects

                        If I make my wildcard path /Hardware/NetworkCards/** as suggested above, I still get the error.


                        In a different test I found that if I add each of the NICs individually into the parts, I can use the following "Wildcarded Path" WITH SUCCESS.




                        Then, if I take out each individual network card and simply give it the part /Hardware/NetworkCards with recurse checked, it fails.

                        • 9. Re: Compliance on N objects
                          Fred Breton

                          What I said is to make your wildcard path to /Hardware/NetworkCard/*, no "s", did you tried it? (may be /Hardware/NetworkCard/ is also good).

                          • 10. Re: Compliance on N objects

                            If I make my "Wildcarded Path" read:








                            results in a "No Template Parts used in compilance will Collect NetworkCard....blah blah blah" and throws an invalid rule error.


                            When I change it to read:








                            results in a valid expression.


                            I have had SOME success with /*  I have had NO sucess with /**


                            Should I create a ticket for this issue?  It sounds like it SHOULD be possible in 7.6, but absolutely NO combination of these suggestions is working.

                            • 11. Re: Compliance on N objects
                              Fred Breton

                              Try to just add one NIC (the first one, guessing that a server have at least one) in addition of the /Hardware/NetworkCards and you should not have the check issue, but also check that on the /Hardware/NetworkCards there is no recursive option to check that is not checked (in 8.0, no choice, it's checked by default).

                              • 12. Re: Compliance on N objects
                                Fred Breton

                                If those last advices don't provide the expected result, I won't be able to do test by myself has I've no 7.6 env, so you should hoppen a case or upgrade to 8.0 for which I provided a solution that I've tested.

                                But I hope those last ideas will work.