/build/static/layout/Breadcrumb_cap_w.png

Can the K1000 run a report that has totals

I was wondering if I can run a report in the K1000 that would give a total number for a particular field. 

We have Dell Optiplex 755's in each of our schools. I want to run a report that has the total number of Optiplex 755's in each building.  I wanted the report to look something like this:

Optiplex 755s in the 10.48.x.x range would equal 300
Optiplex 755's in the 10.56.x.x range would equal 200.

I can get a total number of Optiplex 755's in the district, but I'd like to break it down per IP range.

0 Comments   [ + ] Show comments

Answers (2)

Posted by: chucksteel 8 years ago
Red Belt
1
You want to group by the first two parts of the IP address, and you can do that using substring_index:
SELECT substring_index(IP, ".", 2) as SUBNET, count(ID) as Count
FROM ORG1.MACHINE
WHERE CS_MODEL = "Optiplex 755"
GROUP BY SUBNET
For a more generic version that includes all of the models in each range you can include the model in the group by statement:
SELECT substring_index(IP, ".", 2) as SUBNET, CS_MODEL, count(ID) as Count
FROM ORG1.MACHINE
GROUP BY SUBNET, CS_MODEL

Posted by: StockTrader 8 years ago
Red Belt
0
hello,

two inprotu ideas:
  1. Put the hands in the SQL of the report...
  2. Create a Custom Inventory Field rule that valorizes the field with the first 2 octet of the IP of the device (e.g.:10.48) and then in the report wizard ''break'' for this field.

Kind regards,
Marco - StockTrader
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ