Open-AudIT
https://www.open-audit.org/phpBB3/

Add items to Statistics?
https://www.open-audit.org/phpBB3/viewtopic.php?f=10&t=3821
Page 1 of 1

Author:  cburbs [ Wed Oct 13, 2010 4:23 am ]
Post subject:  Add items to Statistics?

Is is possible to add Office Versions and Service Packs to the Statistics options?

Author:  jpa [ Wed Oct 13, 2010 10:38 am ]
Post subject:  Re: Add items to Statistics?

Why not... It's a bit messy with the way Microsoft installs the suite with all the individual apps but should be close to usefull.

Create the view in list_viewdef_statistic_office.php
[code]<?php

$query_array=array("headline"=>__("Statistic for Microsoft Office Versions"),
"sql"=>"
SELECT
DISTINCT software_name, software_version,
COUNT( * ) AS count_item,
round( 100 / (
SELECT count(software_uuid) FROM software, system
WHERE
software_name LIKE 'Microsoft Office%' AND
software_timestamp=system_timestamp AND
software_uuid=system_uuid
)
* COUNT( * )
,$round_to_decimal_places ) AS percentage
FROM
software, system
WHERE
software_name LIKE 'Microsoft Office%' AND
software_timestamp=system_timestamp AND
software_uuid=system_uuid
GROUP BY software_name
",
"sort"=>"software_name",
"dir"=>"ASC",
"get"=>array("file"=>"list.php",
"title"=>__("Systems installed this Version of this Software"),
"var"=>array("name"=>"%software_name",
"version"=>"%software_version",
"view"=>"systems_for_software_version",
"headline_addition"=>"%software_name",
),
),
"fields"=>array("10"=>array("name"=>"software_name",
"head"=>__("Name"),
"show"=>"y",
"link"=>"y",
),
"20"=>array("name"=>"software_version",
"head"=>__("Version"),
"show"=>"y",
"link"=>"y",
),
"30"=>array("name"=>"count_item",
"head"=>__("Count"),
"show"=>"y",
"link"=>"n",
"search"=>"n",
),
"40"=>array("name"=>"percentage",
"head"=>__("Percentage"),
"show"=>"y",
"link"=>"n",
"search"=>"n",
),
),
);
?>[/code]

Make the view accessible from the main menu

[code]Index: include_menu_array.php
===================================================================
--- include_menu_array.php (revision 1251)
+++ include_menu_array.php (working copy)
@@ -210,8 +210,9 @@
"22"=>array("name"=>"Thunderbird Versions", "link"=>"./list.php?view=statistic_thunderbird", "image"=>"images/mail_tb.png", "title"=>"Mozilla Thunderbird Versions",),
"23"=>array("name"=>"Adobe Flash Player Versions", "link"=>"./list.php?view=statistic_adobe_flash_player", "image"=>"images/adobe_flash_player.png", "title"=>"Adobe Flash Player Versions",),
"24"=>array("name"=>"Adobe Reader Versions", "link"=>"./list.php?view=statistic_adobe_reader", "image"=>"images/adobe_reader.png", "title"=>"Adobe Reader Versions",),
- "25"=>array("name"=>"OpenOffice.org Versions", "link"=>"./list.php?view=statistic_openoffice.org", "image"=>"images/oo.org.png", "title"=>"OpenOffice.org Versions",),
- "26"=>array("name"=>"Java Versions", "link"=>"./list.php?view=statistic_java", "image"=>"images/java.png", "title"=>"Java Versions",),
+ "25"=>array("name"=>"Microsoft Office Versions", "link"=>"./list.php?view=statistic_office", "image"=>"images/x-office-spreadsheet.png", "title"=>"Microsoft Office Versions",),
+ "26"=>array("name"=>"OpenOffice.org Versions", "link"=>"./list.php?view=statistic_openoffice.org", "image"=>"images/oo.org.png", "title"=>"OpenOffice.org Versions",),
+ "29"=>array("name"=>"Java Versions", "link"=>"./list.php?view=statistic_java", "image"=>"images/java.png", "title"=>"Java Versions",),
"30"=>array("name"=>"Memory Size", "link"=>"./list.php?view=statistic_memory", "image"=>"images/memory.png", "title"=>"Memory Size",),
"40"=>array("name"=>"Processor Types", "link"=>"./list.php?view=statistic_processor", "image"=>"images/processor.png", "title"=>"Processor Types",),
"50"=>array("name"=>"Hard Drive", "link"=>"./list.php?view=statistic_harddrive", "image"=>"images/harddisk.png", "title"=>"Hard Drive",),
[/code]

Author:  jpa [ Wed Oct 13, 2010 10:57 am ]
Post subject:  Re: Add items to Statistics?

Maybe something that filters for Office Suite only installs would be better.

list_viewdef_statistic_office.php
[code]<?php

$query_array=array("headline"=>__("Statistic for Microsoft Office Versions"),
"sql"=>"
SELECT
DISTINCT software_name, software_version,
COUNT( * ) AS count_item,
round( 100 / (
SELECT count(software_uuid) FROM software, system
WHERE
(software_name LIKE 'Microsoft Office Basic%' OR
software_name LIKE 'Microsoft Office Enterprise%' OR
software_name LIKE 'Microsoft Office Home and Student%' OR
software_name LIKE 'Microsoft Office Personal%' OR
software_name LIKE 'Microsoft Office Professional%' OR
software_name LIKE 'Microsoft Office Small Business Edition%' OR
software_name LIKE 'Microsoft Office Standard%' OR
software_name LIKE 'Microsoft Office Ultimate%' OR
software_name LIKE 'Microsoft Office XP Media%' OR
software_name LIKE 'Microsoft Office XP PIPC%' OR
software_name LIKE 'Microsoft Office XP Professional%' OR
software_name LIKE 'Microsoft Office XP Small Business%' OR
software_name LIKE 'Microsoft Office XP Standard%' OR
software_name LIKE 'Microsoft Office XP Web Server%') AND
software_timestamp=system_timestamp AND
software_uuid=system_uuid
)
* COUNT( * )
,$round_to_decimal_places ) AS percentage
FROM
software, system
WHERE
(software_name LIKE 'Microsoft Office Basic%' OR
software_name LIKE 'Microsoft Office Enterprise%' OR
software_name LIKE 'Microsoft Office Home and Student%' OR
software_name LIKE 'Microsoft Office Personal%' OR
software_name LIKE 'Microsoft Office Professional%' OR
software_name LIKE 'Microsoft Office Small Business Edition%' OR
software_name LIKE 'Microsoft Office Standard%' OR
software_name LIKE 'Microsoft Office Ultimate%' OR
software_name LIKE 'Microsoft Office XP Media%' OR
software_name LIKE 'Microsoft Office XP PIPC%' OR
software_name LIKE 'Microsoft Office XP Professional%' OR
software_name LIKE 'Microsoft Office XP Small Business%' OR
software_name LIKE 'Microsoft Office XP Standard%' OR
software_name LIKE 'Microsoft Office XP Web Server%') AND
software_timestamp=system_timestamp AND
software_uuid=system_uuid
GROUP BY software_name
",
"sort"=>"software_name",
"dir"=>"ASC",
"get"=>array("file"=>"list.php",
"title"=>__("Systems installed this Version of this Software"),
"var"=>array("name"=>"%software_name",
"version"=>"%software_version",
"view"=>"systems_for_software_version",
"headline_addition"=>"%software_name",
),
),
"fields"=>array("10"=>array("name"=>"software_name",
"head"=>__("Name"),
"show"=>"y",
"link"=>"y",
),
"20"=>array("name"=>"software_version",
"head"=>__("Version"),
"show"=>"y",
"link"=>"y",
),
"30"=>array("name"=>"count_item",
"head"=>__("Count"),
"show"=>"y",
"link"=>"n",
"search"=>"n",
),
"40"=>array("name"=>"percentage",
"head"=>__("Percentage"),
"show"=>"y",
"link"=>"n",
"search"=>"n",
),
),
);
?>[/code]

Author:  cburbs [ Thu Oct 14, 2010 1:12 am ]
Post subject:  Re: Add items to Statistics?

Alright that worked - I appreciate the help.

Is there a way to add What service pack windows is running as well?

Author:  jpa [ Thu Oct 14, 2010 2:11 am ]
Post subject:  Re: Add items to Statistics?

Add service pack info to the "OS Type" statistics page or somewhere els?. The info is collected by audit.vbs but not displayed on very many screens. Maybe the only current display area is the "OS Information" report for individual systems. I'm not sure the "OS Type" stats page would be a good place.

Author:  cburbs [ Sat Oct 16, 2010 3:58 am ]
Post subject:  Re: Add items to Statistics?

How is the service pack defined?

Take for example
"130"=>array("name"=>"system_build_number", "head"=>__("Build Number"),),

I tried changing this with
"130"=>array("name"=>"system_build_number", "head"=>__("Service Pack"),),

I tried replacing system_build_number with Servicepack and OSSerPack and neither displayed any info.
I was referencing Audit.vbs for the info.


Figured it out by looking at some of the other script stuff - system_service_pack....

Author:  jpa [ Sat Oct 16, 2010 4:07 am ]
Post subject:  Re: Add items to Statistics?

I assume you're trying to add the service pack info to the system_viewdef_summary.php file. You can see an example of the service pack in system_viewdef_os.php.

"50"=>array("name"=>"system_service_pack", "head"=>__("Service Pack"),)

The "head" is just the display name text for the value which is determined by "name."

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/