Hello!
I would like to deduce to receive alerts by mail every day if new records appear on the devices in the OS_Windows group in the History tab. Events that interest me:
1. Installation/removal of software
2. Changing the size of RAM
3. Changing the number of nuclei
4. Installation/removal Hotfix
5. Changing the composition of local groups
I began to write a request to view the event "Installation/removal of software" and it works correctly. Here he is
Select Top 1000000 tsysOS.Image As Icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
Case tblSoftwareHist.Action
When '1' Then '+'
When '2' Then '-'
End As [+/-],
tblSoftwareUni.softwareName As Software,
tblSoftwareHist.softwareVersion As Version,
tblSoftwareUni.SoftwarePublisher As Publisher,
tblSoftwareHist.Installdate,
tblSoftwareHist.Lastchanged,
tsysOS.OSname As OS
From tblAssets
Inner Join tblSoftwareHist On tblAssets.AssetID = tblSoftwareHist.AssetID
Inner Join tblSoftwareUni On tblSoftwareHist.softid = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblAssetGroupLink On tblAssets.AssetID = tblAssetGroupLink.AssetID
Inner Join tblAssetGroups On tblAssetGroups.AssetGroupID =
tblAssetGroupLink.AssetGroupID
Where tblSoftwareHist.Lastchanged > GetDate() - 7 And
tblAssetGroups.AssetGroup = 'OS_Windows'
Order By tblAssets.AssetName Collate Latin1_General_CI_AS
But if you add a viewing of the event "Changing the size of RAM" are shown only the VM on which both events occurred. This request. And I need to see all the events on the points described above on each VM.
Select Top 1000000 tsysOS.Image As Icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
Case tblSoftwareHist.Action
When '1' Then '+'
When '2' Then '-'
End As [+/-],
tblSoftwareUni.softwareName As Software,
tblSoftwareHist.softwareVersion As Version,
tblSoftwareUni.SoftwarePublisher As Publisher,
tblSoftwareHist.Installdate,
tblSoftwareHist.Lastchanged,
tsysOS.OSname As OS,
tblPhysicalMemoryArrayHist.MaxCapacity
From tblAssets
Inner Join tblSoftwareHist On tblAssets.AssetID = tblSoftwareHist.AssetID
Inner Join tblSoftwareUni On tblSoftwareHist.softid = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblAssetGroupLink On tblAssets.AssetID = tblAssetGroupLink.AssetID
Inner Join tblAssetGroups On tblAssetGroups.AssetGroupID =
tblAssetGroupLink.AssetGroupID
Inner Join tblPhysicalMemoryArrayHist On tblAssets.AssetID =
tblPhysicalMemoryArrayHist.AssetID
Where tblSoftwareHist.Lastchanged > GetDate() - 7 And
tblAssetGroups.AssetGroup = 'OS_Windows'
Order By tblAssets.AssetName Collate Latin1_General_CI_AS
Maybe there is another table in which all events are stored? And not as I look at separate tables (tblSoftwareHist, tblPhysicalMemoryArrayHist ...)