How to Create a Report for Recently Installed Software on KBOX
I am supposed to write a report to get the recently installed software on peoples computers. I am new to writing reports in KBOX and KBOX in general and I am not real good at writing scripts to begin with. If someone could please help me with this I would appreciate it or if someone can explain how to go about doing this/if it is even possible that would be great also.
I am looking to get the report with a date and time or at least the date, Name of the System, Software Title, Vendor Information, Description, etc. Basically I need the general information about the software that was recently installed.
Thanks!
~blentz31
I am looking to get the report with a date and time or at least the date, Name of the System, Software Title, Vendor Information, Description, etc. Basically I need the general information about the software that was recently installed.
Thanks!
~blentz31
0 Comments
[ + ] Show comments
Answers (9)
Please log in to answer
Posted by:
blentz31
13 years ago
Posted by:
dchristian
13 years ago
blentz31,
This is going to be tricky because of the way the KBOX handles assets in the database....
Here's a basic report that will list all software changes within the last 7 days (rolling 7 days like you asked).
Does anybody else have something they use?
This is going to be tricky because of the way the KBOX handles assets in the database....
Here's a basic report that will list all software changes within the last 7 days (rolling 7 days like you asked).
SELECT A.NAME,
AH.TIME,
AH.DESCRIPTION
FROM ASSET_HISTORY AH,
ASSET A
WHERE AH.ASSET_ID = A.ID
AND AH.DESCRIPTION LIKE '%SOFTWARE%INVENTORY%'
AND AH.TIME > DATE_SUB(NOW(),INTERVAL 7 DAY)
ORDER BY NAME
Does anybody else have something they use?
Posted by:
cblake
13 years ago
Here's what I use:
Almost verbatim what David said, so it's gotta be darned close to correct between us :)
"INTERVAL 2 DAY" you'd change to 7, or 20, or whatever you wanted your target to be. I set this up as a daily report because it was too much to sift through on a weekly basis.
Edit- Side note, I used this as a custom ticket rule and had emails sent that way, instead of reporting. Not because it's better, but because that's how reports were scheduled back in the stoneage when I wrote this.
SELECT CONCAT(S.DISPLAY_NAME, ' ', S.DISPLAY_VERSION) AS 'Software',
A.NAME as 'Computer', AH.TIME as 'Installed'
FROM ASSET_HISTORY AH, ASSET A, ASSET_TYPE AST, SOFTWARE S
WHERE AST.ASSET_CATEGORY = "Computer"
and A.ID = AH.ASSET_ID
and AH.DESCRIPTION LIKE CONCAT('%%Found software item ', S.DISPLAY_NAME,
' ', S.DISPLAY_VERSION, '%%')
and DATE(AH.TIME) > DATE(DATE_SUB(NOW(), INTERVAL 2 DAY))
ORDER BY Installed, Computer
Almost verbatim what David said, so it's gotta be darned close to correct between us :)
"INTERVAL 2 DAY" you'd change to 7, or 20, or whatever you wanted your target to be. I set this up as a daily report because it was too much to sift through on a weekly basis.
Edit- Side note, I used this as a custom ticket rule and had emails sent that way, instead of reporting. Not because it's better, but because that's how reports were scheduled back in the stoneage when I wrote this.
Posted by:
blentz31
13 years ago
Posted by:
cblake
13 years ago
Posted by:
diverdaveman1
13 years ago
I'm trying to take your code and run it in MSSQL for different reasons. I can't seem to get it to work even though I've changed the code over to MSSQL.
Here is the MSSQL code if have wrote:
M.NAME as 'Computer',
AH.TIME as 'Installed'
FROM KBOX...ASSET_HISTORY AH, KBOX...ASSET A, KBOX...ASSET_TYPE AST, KBOX...SOFTWARE S, KBOX...MACHINE M
WHERE AST.ASSET_CATEGORY = 'Computer'
and A.ID = AH.ASSET_ID
and AH.DESCRIPTION LIKE ('%%Found software item '+S.DISPLAY_NAME+' '+S.DISPLAY_VERSION+'%%')
--and DATE(AH.TIME) > DATE(DATE_SUB(NOW(), INTERVAL 2 DAY))
and DATEDIFF(DD,AH.TIME,GETDATE())>2
AND M.ID = A.MAPPED_ID
AND M.OS_NAME LIKE '%SERVER%'
ORDER BY Software, Computer
Do you or anyone else have any suggestions on my question?
Thanks
Dave
Posted by:
azd_dmt
13 years ago
cblake
Thank you for the code.
If their a string I can add to it so it does not display Microsoft Security Updates that have been recently installed? The comon name appears in the report as: "Security Update for Windows...."
Also, the report shows software on a few machine being installed in 1 min intervals. Here is an example?
330 Winamp 5.541 azurew001 03/10/2011 21:39:14
331 Winamp 5.541 azurew001 03/10/2011 22:39:23
332 Winamp 5.541 azurew001 03/10/2011 23:39:43
Thank You
Thank you for the code.
If their a string I can add to it so it does not display Microsoft Security Updates that have been recently installed? The comon name appears in the report as: "Security Update for Windows...."
Also, the report shows software on a few machine being installed in 1 min intervals. Here is an example?
330 Winamp 5.541 azurew001 03/10/2011 21:39:14
331 Winamp 5.541 azurew001 03/10/2011 22:39:23
332 Winamp 5.541 azurew001 03/10/2011 23:39:43
Thank You
Posted by:
dchristian
13 years ago
Posted by:
serkowski
13 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.