cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
bStein
Level 8
Report Inappropriate Content
Message 1 of 16

How to create a custom query to show license status by machine or for a specific machine?

I'm trying to create a custom query that I can hit on 

 

https://<localHost>:8443/remote/core.executeQuery?queryId=<number>

 

to see the status of each machine's ePO registration.  I want to make a query that returns for each machine (or if possible to specify a particular machine in the parameters) all of its licenses, when those licenses were registered, what policy level they are at (default, high, relaxed, etc - 1,2,3,4,5), and the machine attributes.  How can I do something like this?  I would like to do something like this for both the antivirus and host intrusion.  I was looking at using the Query Builder but it seems under powered for what I'm trying to do.  Thanks.

I should note that I'm using ePO version 5.10.

15 Replies
McAfee Employee LKS
McAfee Employee
Report Inappropriate Content
Message 2 of 16

Re: How to create a custom query to show license status by machine or for a specific machine?

If i remember, we had something called "ePOLicensing extension" which you can checkin into ePO and generate a report to see Licensing status based on system/product something like that. Let me search for it. 

 

bStein
Level 8
Report Inappropriate Content
Message 3 of 16

Re: How to create a custom query to show license status by machine or for a specific machine?

Thanks, this sounds promising.  Also I should note that I'm using ePO 5.10.

McAfee Employee LKS
McAfee Employee
Report Inappropriate Content
Message 4 of 16

Re: How to create a custom query to show license status by machine or for a specific machine?

I myself tested this extension with ePO 5.10 and it works.

Here is the instruction :

Please click on the link named ePO Version 5.X to download the package. Once the download is completed, please extract the same.

https://www.mcafee.com/enterprise/en-us/downloads/epo-instructions.html

Inside this extracted folder, you’ll see a reporting extension named PPSREPORTS_1.0.0_Build_102_(reporting_extension).zip .

Please install this extension and then import the xml file named “Installed Products sorted by OS Type.xml “ to queries to reports.

You can find the instructions for this through the pdf file available inside the extracted folder named “Protection_Summary_Report_Instructions.pdf”.

Hope this information really helps.

Was my reply helpful?

If you find this post useful, please give it a Kudos! Also, please don't forget to select "Accept as a Solution" if this reply resolves your query!

 

bStein
Level 8
Report Inappropriate Content
Message 5 of 16

Re: How to create a custom query to show license status by machine or for a specific machine?

Thanks, LKS. Is there an example of the report that this produces?
McAfee Employee LKS
McAfee Employee
Report Inappropriate Content
Message 6 of 16

Re: How to create a custom query to show license status by machine or for a specific machine?

It is there in the ZIP file. The below one is taken from my machine. 

report.JPG

If you click on any of the product, that will show you number of machine consuming that particular product.

report1.JPG

Was my reply helpful?

If you find this post useful, please give it a Kudos! Also, please don't forget to select "Accept as a Solution" if this reply resolves your query!

bStein
Level 8
Report Inappropriate Content
Message 7 of 16

Re: How to create a custom query to show license status by machine or for a specific machine?

Thanks, @LKS .  This isn't quite what I'm looking for though.  I'm pretty close with:

 

https://127.0.0.1:1457/remote/core.executeQuery?target=EPOLeafNode&select=(select%20EPOLeafNode.AutoID%20EPOComputerProperties.ComputerName%20EPOComputerProperties.NetAddress)

 

Where 127.0.0.1:1457 is setup to point to my ePO server.  I believe that  EPOLeafNode.AutoID should give me a unique id for each license whenever it is created (so more frequently than the GUID, which is only when it is installed) such as whenever a server instance with an ePO agent installed is power cycled.  Please let me know if this is not the correct id.  I also want to get pieces of information like the date (timestamp) this license was created from other locations (but I don't know where) besides EPOLeafNode and EPOComputerProperties.  I can also add to the end something like:

 

&where=(where(eq EPOComputerProperties.NetAddress "<MacAddress>"))

 

to specify the data queried for a specific machine (or the name granted I can guarantee it is unique).  

So to summarize, what I need to do it get the above but also include a unique identifier (if I'm not already) for each time a license is registered, the date time (timestamp) that the license was registered, and for antivirus what policy level the license is operating at (default, high, minimal, etc), and I think then some other information from the EPOComputerProperties table.  If I was using SQL, I'd just join these tables on a common shared field but I don't know if I can do that.  Also I'm not familiar with the schema and am unsure of where the data I want lives.

McAfee Employee cdinet
McAfee Employee
Report Inappropriate Content
Message 8 of 16

Re: How to create a custom query to show license status by machine or for a specific machine?

Right now the only schema version available is for 5.9 - kb89939.  You have to be logged into the service portal to view it.  What specifically are you referring to as a license - a system with installed products?  

There are several default queries you can use.  The one for product protection summary can be filtered by computer name or whatever parameters you choose, and it can also be done as a table instead of chart.  The applied policies is another separate query that you can run.  You can look at the query syntax for each of those to find where the data is being pulled from in the epo console when you select a specific query.  You can then use that info to build your own query.

Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?

bStein
Level 8
Report Inappropriate Content
Message 9 of 16

Re: How to create a custom query to show license status by machine or for a specific machine?

Thanks for the quick reply.

What is the default query for "product protection summary"? I want to be able to curl or wget all of the calls that I make. I can't depend on the UI. Multiple queries are fine so long as I can easily link all the data together.

 

 

 

What specifically are you referring to as a license - a system with installed products?

 

 

 

By a license, I mean whatever record exists in the system that shows a machine has registered the Antivirus and or Host Intrusion Protection Software.  I'm working with a set of machines that all have access to a limited pool of licenses and whenever they are powered off, they release their license and whenever they are powered on they get a new license.  So I want to be able to see with a query for a particular machine that in completing a power cycle a new license has been issued.  I can do this in two basic ways, either power off a machine and see that its previous license is no longer present or power cycle a machine and see that some unique id for the license has changed (either from seeing a new id or a new registration date time). Either way I need some unique identifier that is more unique than the GUID (I think) as from what I understand GUID is more of an ID for a machine installing software than it is the registration of installed software.  Please correct me if I'm mistaken.

Also I need to see other things with a query as well, such as what policy level a license/machine is using at the time.  What targets or queries can I write to get this information?  Is there documentation on the schema for 5.10 somewhere that would make writing queries easier?  Is it possible to use the WebAPI to perform joins?

Thanks.

McAfee Employee cdinet
McAfee Employee
Report Inappropriate Content
Message 10 of 16

Re: How to create a custom query to show license status by machine or for a specific machine?

If you go here and download the epo versions file, it contains the default report that you can get once you install that PPSReports extension.

https://www.mcafee.com/enterprise/en-us/downloads/epo-instructions.html?_ga=2.34329506.267143351.157...

We do not have a schema available for epo 5.10 yet.  As for what queries to write, as stated before, if you go into the epo console for some initial investigation in where data is pulled from, there are default queries for policies.  Search for "applied policies", then select that query and go to actions, view sql and it will show you what tables it is pulling info from.  It is out of scope of support for writing custom queries for api - I am attaching the api scripting guide so you can also get some examples and available commands.  If you have detailed questions on syntax, you can post them under the community forum for McAfee open source.

Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?

More McAfee Tools to Help You

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community