8 Replies Latest reply on Aug 26, 2014 3:56 AM by DC Kidson

    Complaince Via Extended Object | PATROL |

    DC Kidson

      Good Day All


      I am trying to run a complaince rule againt Extended Object which i have created.



      I have created a local extended object which queires via pconfig the patrol agent and shows the current publish hostname.

      I want to use the above result and use a complaince rule to verify that the returned value corresponds with the actaul hostname of the host.


      Command used in the local extended object

      cmd /c "pconfig.exe +get | findstr publish"


      Ive tried a few OOB grammar files and the one that displays the above result the best is name = multi values grammar (nvp.gm)


      Please see discoverd component with the above extended object




      As one can see the value i am after is Value4.

      Value 4 shows a the "hostname" which i want to run my rule against.




      The problem i am facing it when i am testing my complaince rule it does not show any values bar the the "Left Hand Value"

      even though i am pionting it to value4 within my rule.


      Please see below



      The rule i am running:

      "Extended Objec Entry:Patrol PH" . "Value4 as String (ALL OS)" contains "??NAME??"


      Ive tried changing a couple of values within the rule using differnt Values with other grammar files and also using ??TARGET.HOST?? to match against.


      Can anybody please assit in trying to resolve this?


      Any information or tips would help




        • 1. Re: Complaince Via Extended Object | PATROL |
          Monoj Padhy

          As per my understanding your compliance rule not even able to find/check of existence of value4 from the extended object.(rule is non-compliant with exists error)


          At 1st try to check if your rule able to find the value4 existence itself and then go for checking the value of value4.

          something like this.( may be I have some syntax error but when you write the rule BSA will take care of this)

          "Extended Objec Entry:Patrol PH" . "Value4" exists


          If above one is complaint then go for checking the value of value4. something like below must do


          "Extended Objec Entry:Patrol PH//Name" . "Value4 as String (ALL OS)" contains "??NAME??"

          • 2. Re: Complaince Via Extended Object | PATROL |
            Dipak Gaigole

            I think changing:

            "Extended Object Entry:Patrol PH"."Value4 as String (ALL OS)" contains "??NAME??"


            "Extended Object Entry:Patrol PH//*"."Value4 as String (ALL OS)" contains "??NAME??"

            should work for your use case.

            • 3. Re: Complaince Via Extended Object | PATROL |
              DC Kidson

              Thanks Both.


              I have tried changing the rules as requested ,but it does seem like the rule is unaware of the value of "value4".


              Quite frustrating as the Discovered component does shoe values populated in value4.


              Any ideas why these cant be leveraged within the ruleset??

              • 4. Re: Complaince Via Extended Object | PATROL |
                Monoj Padhy

                by any chance did you get success for checking existence of value4. Does your rule able read it from the extended object ?


                Also can you just give a try by creating a global EO instead of local one.

                • 5. Re: Complaince Via Extended Object | PATROL |
                  Dipak Gaigole

                  Can you check if "compliance" option is selected in the "parts" for this extended object? If not that might also cause this issue.

                  • 6. Re: Complaince Via Extended Object | PATROL |
                    Joe Piotrowski

                    Just some thoughts. It looks like you're comparing two variables against each other. ??NAME?? might not necessarily mean the NAME of your EXO. You might need it in a format like ??YOUR_EXO.NAME??


                    Also, I've seen running tests like this vs running it against a server can, on occasion, have slightly different results.


                    I would recommend building and verifying your Rule at a more basic level, and slowly add complexity to it. Verify it Live browse's successfully on a target server. Review the values. Focus on getting the left side value correct. Then focus on getting the right side value correct. Etc.

                    • 7. Re: Complaince Via Extended Object | PATROL |

                      I think the problem you might be experiencing is related to Value 3. In your example Value 3 contains "=" which possibly breaks the grammar interpretation. You could try to substitute the second occurrence of the "=" sign by an explicit string like "equals". That might help.


                      Also you might want to use a different grammar like the INI grammar. I found myself in what I believe is a similar situation (only not with the pconfig command as a data source) and I transformed my EO in a centrally executed EO, wrote a few lines of script in NSH (mainly sed and awk) to transform the output into something compatible with the INI grammar. Also I got rid of the findstr part and used those keywords as the section header in the INI structure. The advantage of doing that is that I used the same EO and therefore the same part for many compliance rules. I just built these rules against a different path in the result of that same EO.

                      • 8. Re: Complaince Via Extended Object | PATROL |
                        DC Kidson

                        Thanks Oliver.


                        It did turn out the = and some specail charaters was the cause of the issue.


                        Stripping them resolved the porblem.