Symantec Management Platform (Notification Server)

 View Only
Expand all | Collapse all

filter or SQL for pcAnywhere plug-in is not installed

  • 1.  filter or SQL for pcAnywhere plug-in is not installed

    Posted Sep 14, 2010 03:39 PM

    There is a target created and used by the PCAnywhere install policy but..

     

    How do I get the sql code or a filter created to replicate this?

     

    I would like to report on this instead of having to go to the Policy to see how does not have this Plug-in installed.

     

    I tried to reverse engineer without any luck a filter using sql that tells me where PCanywhere is installed.  I figured it would be easy to reverse that and boy was I wrong.



  • 2.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Sep 15, 2010 02:09 AM

    Are you looking for sql query to get all the agents where PCAnywhere is installed?

    Thanks,
    Ashutosh T



  • 3.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Sep 15, 2010 05:44 PM

    Create a custom report and base it on the filter's membership.  This KB explains how to do this:

    https://kb.altiris.com/article.asp?article=52055&p=1

    Does this help?



  • 4.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Sep 28, 2010 02:47 PM

    SQL Query would be great but let me look at mclemson's suggestion to see if it provides what I need.

     

    Sorry for the delay I thought I was getting notified of updates to this topic but I never got any.



  • 5.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Sep 28, 2010 02:54 PM

    mclemson

    What you suggest does not work because it does not exist.   If you read my post I would love to create a filter I could use in a report.

    The problem is they collect this somehow built into a target because that is what is used to generate targets for the Install of PCanywhere but I would like to report on this.

    A filter only exist for where it IS installed not where it IS NOT installed.  I maybe missing something that you are suggesting.



  • 6.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 01, 2010 07:34 AM

    Give this  a shot. I'm not sure why the Identification table was included, but I left it in there.

    The below is the negative of the existing filter for all windows computers with the agent. I removed the part about whether the license was active or not. It's a shame we can't view 'targets' in the console. This is a mystery to me why they choose to hide them. It would make so much more sense if you could manage them through the console.

    Not having installed the agent myself, I can't verify if the results returned will be correct!

     

    Dan

     

    select r.Guid

    from vComputerResource r,Inv_AeX_AC_Client_Agent i, Inv_AeX_AC_Identification a

    where i.[Agent Class Guid] = '452f2bcf-7261-4aa6-9228-387676f3a183'

    and r.Guid = i.[_ResourceGuid] and r.Guid = a.[_ResourceGuid] and r.IsManaged=1

    and r.Guid NOT IN (

    select r.Guid

    from vComputerResource r,Inv_AeX_AC_Client_Agent i, Inv_AeX_AC_Identification a

    where i.[Agent Class Guid] = '452f2bcf-7261-4aa6-9228-387676f3a183'

    and r.Guid = i.[_ResourceGuid] and r.Guid = a.[_ResourceGuid] and r.IsManaged=1

    )



  • 7.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 01, 2010 08:36 AM

    Dan, I will give this a shot and I TOTALLY agree with management of targets!  I hate it because I have a bunch now that I converted to actual filters and now I can't get rid of those targets that are no longer needed.

    Check this out though and vote on it if you agree.

    https://www-secure.symantec.com/connect/idea/management-targets

     

    I had a support ticket in regarding managing these and they went all the way up the chain and could only recommend I vote on the above idea.



  • 8.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 01, 2010 08:40 AM

    Dan the sql inculded does not return any results and it should have returned 27 results from what the filter returns.



  • 9.  RE: filter or SQL for pcAnywhere plug-in is not installed
    Best Answer

    Posted Oct 01, 2010 10:40 PM

    It's not too bad really.  Here's the process.  I hope this helps for future reports.

    1) find the policy and target.  In this case it's settings\all settings\agents and plugins\Remote management\Remote Control\Windows\PC Anywhere Plugin...

    2) highlight the Target, which is "Windows Computers with No PC Anywhere Plugin Installed" and click the pencil to edit it.

    3) in the Edit window, you'll see the Filter for the target.  The Filter is called "windows computers with no PCAnywhere Plugin"

    4) Now go find the Filter.  Click Manage|Filters\Software Filters, and expand Agent Plugin Filters.

    5) Scroll down the filter we found in step 3 above.  Highlight the filter in question and you can edit the SQL from there.

    Unfortunately, THIS filter is hidden, so we have to go to SQL.

    6) connect to the Symantec CMDB and run the following sql:

    Select * from Item where name like 'Windows computers with no pcanywhere%'

    7) You'll get 2 results from this.  One has a description next to it telling you it's the filter in question.  Success!  Note: If you look at the attributes, anything over 0 is hidden (sort of) and wont show in the console.

    8) Now, copy the state column to anything - drag up to the window, right-click copy to notepad - it doesn't matter.

    9) In the state values, look for CDATA.  The SQL used for this filter follows that.

     

     

    Poof.  You have your SQL.

     

    I hope this has been helpful for anyone wanting to find the value of a filter.  GL all!



  • 10.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 04, 2010 08:27 AM

    Hey Thomas,

    Thanks for that. Makes it easier. I still wish we had a way to view and manage all targets though! :-)

     

    Dan



  • 11.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 04, 2010 08:48 AM

    I'd personally agree, and frankly I'm not sure what the incentive is for hiding some filters and/or targets.  I'm sure there is/was a reason, but I'm not sure if it's worth the pain for those of us who have to administer the console.

    That said, there are some things I know are hidden from the console for a good reason - because people tend to muck around with them and break the console.  However, in this case, I just can't see the value of keeping it hidden.  Make it Read-Only so we can't break it, but keep it visible.

    IMO.  Anyway, again, GL with the filter creation!



  • 12.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 04, 2010 09:17 AM

    Thomas, Thank you very much for this helpful piece of data!  I have what I need now.

    Hey stupid question and I know I could do it but is there a way to make these not hidden?  I hate the fact I'm going to go into my console and just duplicate (create filter) something that already exist.  I do agree 100% on the read only.

    If you can't provide this information I understand I just know it is possible and would be nice to have available.  I have asked this in a tech support question and they didn't even give me this amount of detail.  I created a bunch of targets in the start thinking I could manage them or that they were becoming filters only to find out they were not.  I would now like to obviously delete these or get these in as a filter for other uses.

    Again thank you for this valuable piece of information you have provided.



  • 13.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 04, 2010 09:23 AM

    To add here is the code - with the Computer Name added to the select and ordered by the computer name:

    SELECT Guid, name

    FROM vComputer

    WHERE (NOT EXISTS (SELECT i._ResourceGuid FROM Inv_AeX_AC_Client_Agent i WHERE vComputer.Guid = i.[_ResourceGuid] AND i.[Agent Class Guid] = '452f2bcf-7261-4aa6-9228-387676f3a183')) AND EXISTS (SELECT r.Guid FROM vComputerResource r, Inv_AeX_AC_Identification a WHERE r.Guid = vComputer.Guid AND a.[_ResourceGuid] = r.Guid AND (a.[System Type] = 'Win32' OR a.[System Type] = 'Win64') AND r.IsManaged = 1) AND Guid NOT IN (select r.Guid from vComputerResource r, Inv_AeX_AC_Roles c where r.Guid=c.[_ResourceGuid] and c.Role='Altiris Server' and r.IsManaged=1)

    order by name



  • 14.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 04, 2010 11:09 AM

    There is a way to modify a filter to make it visible in the console, though WHERE it would then appear is another matter.

    If you remember the Query you ran to find the row in ITEM and the STATE column you copied out, well, that same row also has Attributes, set to 23 on my results.

    However, it's not supported.  In short, you have to directly modify the SQL in the table to change the value of that to probably 22.

    The Attributes column is a combination column in essentially hex.  1 = hidden, 2 = no modify, 4 =, 8=, 16=...

    23 therefore is a combination of 16, 4, 2, 1.  The 1 is the culprit, so remove it, you get 22, and in theory it'd be visible in the console.

    The problem becomes finding it.  IF it's in the default location, no problem, right?  But remember, it's hidden, so WHERE it is didn't matter to the developers.  It doesn't have to be completely organized.  So if it's not where you expect it, finding it is tricky, but possible.  For instance, using the GUID for the PCA filter we found in the previous post, I built the following SQL:

    Select i.name, i2.name [parent folder]
    from item i
      join itemfolder ifo on ifo.itemguid = i.guid
      join item i2 on i2.guid = ifo.parentfolderguid
    where i.name like 'windows computers with no pcanywhere%'
      and i.description like '%filter%'

    Conceptually, this is how you find anything in the console.  This approximates how the tree is built.  And, it turns out from the results of this, that the filter would be approximately where we would expect.

    Have fun!



  • 15.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 04, 2010 01:54 PM

    Remember feature requests.  We make them here in Connect, though honestly, I never have yet.  Do so though when you have a good idea, like one where maybe we could have a filter manager...  :-)  I personally love reading these for some of the great ideas that come out.



  • 16.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 04, 2010 02:53 PM

    Thomas I agree also and why I posted the feature request earlier in this post for those to vote on.



  • 17.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 04, 2010 02:58 PM

    Thanks for the insight into finding items in the console. I have made a few 'enhancement' requests... I don't know how effective they are though.

    My most recent was to eliminate the behavior of reports running automatically when selected...

    I mean, who thought it would be a good idea to pull ALL data from the server  to the client and THEN ask the user if he needs it?? :-)

    Dan



  • 18.  RE: filter or SQL for pcAnywhere plug-in is not installed

    Posted Oct 06, 2010 10:40 AM

    Thomas, 

    Do you have a complete list of the attirubtes #'s and respective settings?