Lansweeper logo
Home Download Features Demo Buy now Help Support forum
 
    Most requested support articles:
  Lansweeper troubleshooting guide.
  The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
  WMI Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
  How to configure the windows firewall using group policies.
  Support:  
 support@lansweeper.com  
Skype: Lansweeper  
  Mo-Fri 9h-17h CET  
Welcome Guest Search | Active Topics | Log In | Register

Tag as favorite
Excluding "Performance Logs and Alerts" from Services report
FlagonFly
#1 Posted : Tuesday, May 25, 2010 8:55:02 PM
Rank: Freeware user

Groups: Member
Posts: 2
Since most of our systems are configured for the "Performance Logs and Alerts" service to be set to Automatic but usually is not in Running state, I'd like to exclude it from the two reports for "Services: Automatic services which are stopped on servers" and "Services: Automatic services which are stopped on clients"

When I add the following line to the clients report just before the Order By, it works great:
And dbo.tblServices.Name <> 'Performance Logs and Alerts'

However, doing the same thing for the servers report still shows all the servers with that service not running.

Here is the full query for the server report where i was also trying a wildcard statement, still not working. Any help greatly appreciated!



Select Top 1000000 dbo.tblComputers.Computername, dbo.tblComputers.ComputerUnique, dbo.tblComputers.Domain, dbo.tblOperatingsystem.Description, dbo.tblServices.Caption, dbo.tblServices.Lastchanged, Web40OSName.Compimage As icon From dbo.tblServices Inner Join dbo.tblComputers On dbo.tblServices.Computername = dbo.tblComputers.Computername Inner Join dbo.tblComputersystem On dbo.tblComputers.Computername = dbo.tblComputersystem.Computername Inner Join dbo.tblOperatingsystem On dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername Inner Join dbo.web40ActiveComputers On dbo.tblComputers.Computername = dbo.web40ActiveComputers.Computername Inner Join Web40OSName On Web40OSName.Computername = dbo.tblComputers.Computername Where dbo.tblServices.Startmode = 'Auto' And dbo.tblServices.State = 'stopped' And dbo.tblServices.Name Not Like 'Performance%' And dbo.tblComputersystem.Domainrole <> 1 Order By dbo.tblComputers.Computer
Lansweeper
#2 Posted : Tuesday, May 25, 2010 10:41:29 PM

Rank: Administration

Groups: Administration, Premium Users
Posts: 10,369
Try this:

Code:
Select Top 1000000 dbo.tblComputers.Computername,
  dbo.tblComputers.ComputerUnique, dbo.tblComputers.Domain,       
  dbo.tblOperatingsystem.Description, dbo.tblServices.Caption,
  dbo.tblServices.Lastchanged, Web40OSName.Compimage As icon
From dbo.tblServices Inner Join
  dbo.tblComputers On dbo.tblServices.Computername =
    dbo.tblComputers.Computername Inner Join
  dbo.tblComputersystem On dbo.tblComputers.Computername =
    dbo.tblComputersystem.Computername Inner Join
  dbo.tblOperatingsystem On dbo.tblComputers.Computername =
    dbo.tblOperatingsystem.Computername Inner Join
  dbo.web40ActiveComputers On dbo.tblComputers.Computername =
    dbo.web40ActiveComputers.Computername Inner Join
  Web40OSName On Web40OSName.Computername = dbo.tblComputers.Computername
Where dbo.tblServices.Startmode = 'Auto' And dbo.tblServices.State = 'stopped'
  And dbo.tblServices.Name Not Like 'sysmonlog' And
  dbo.tblComputersystem.Domainrole <> 1
Order By dbo.tblComputers.Computer
FlagonFly
#3 Posted : Tuesday, June 01, 2010 4:45:38 PM
Rank: Freeware user

Groups: Member
Posts: 2
Thanks, I will try that one. Also figured out I was looking at the wrong table. While "Performance Logs and Alerts" is the name of the service when you look in the list, in the database it is saved as the Caption. So I learned that this works:

Code:
Select Top 1000000 dbo.tblComputers.Computername, dbo.tblComputers.ComputerUnique, dbo.tblComputers.Domain, dbo.tblOperatingsystem.Description, dbo.tblServices.Caption, dbo.tblServices.Lastchanged, Web40OSName.Compimage As icon From dbo.tblServices Inner Join dbo.tblComputers On dbo.tblServices.Computername = dbo.tblComputers.Computername Inner Join dbo.tblComputersystem On dbo.tblComputers.Computername = dbo.tblComputersystem.Computername Inner Join dbo.tblOperatingsystem On dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername Inner Join dbo.web40ActiveComputers On dbo.tblComputers.Computername = dbo.web40ActiveComputers.Computername Inner Join Web40OSName On Web40OSName.Computername = dbo.tblComputers.Computername Where dbo.tblServices.Caption <> 'Performance Logs and Alerts' And dbo.tblServices.Startmode = 'Auto' And dbo.tblServices.State = 'stopped' And dbo.tblComputersystem.Domainrole <> 1 And dbo.tblServices.Caption <> 'Security Center' Order By dbo.tblComputers.Computer
Lansweeper
#4 Posted : Tuesday, June 01, 2010 7:05:24 PM

Rank: Administration

Groups: Administration, Premium Users
Posts: 10,369
If you have only english systems you can use the caption, if you have different languages it's better to use dbo.tblServices.Name because this will be the same everywhere.
Users browsing this topic
Guest
Tag as favorite
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Contact: E-mail Lansweeper - Skype : Lansweeper
Copyright 2004 - 2011 © Hemoco bvba