This plugin help you to monitor SQL Servers environments extracting information with the help of: Powershell 2.0 Console, an open interface to specify free SQL queries, the system integrated with the windows agent, and SQLPS.exe. For more information visit the following webpage: http://pandorafms.com/index.php?sec=Library&sec2=repository&lng=es&action=view_PUI&id_PUI=315
7. 5 SOFTWARE AGENT MODULES GENERATES CLASSIFICATION
5.1. Status verification in SQL Server
The verification of the status of the SQL servers is done through the plugin
Pandora_Plugin_SQL.ps1 and could be applied in the SQL specific technology, in a generic
way (in the case of local instances) or adding different instance lists.
Generated modules:
– SQL Monitoring
– CPU_Busy – InstanceName, CPU_Timetick – InstanceName
– Idle Time – InstanceName, IO_Busy – InstanceName
– Input Packets Read – InstanceName, Input Packets Sent – InstanceName
– Instance Status – InstanceName, DatabaseName Status – InstanceName
– Packet Errors – InstanceName, Total Disk R/W Errors – InstanceName
– Total Disk Reads – InstanceName, Total Disk Writes – InstanceName
– Total Login Attempts – InstanceName
Page 7
8. 5.2. Verification of Performance Counters
The verification of performance counters is done through the
Pandora_Plugin_PerfCounter.ps1 plugin and could be applied in different policies for
different technologies, each of them with different counter lists depending on which we
want to monitor in each of those thechnologies.
Next we are going to show the list of counters to monitor in the case of SQL Server:
– SQL Server Monitoring
– SQLServer:Access MethodsFull Scans/sec
– SQLServer:Access MethodsRange Scans/sec
– SQLServer:Access MethodsProbe Scans/sec
– SQLServer:Access MethodsScan Point Revalidations/sec
– SQLServer:Access MethodsWorkfiles Created/sec
– SQLServer:Access MethodsWorktables Created/sec
– SQLServer:Access MethodsWorktables From Cache Ratio
– SQLServer:Access MethodsForwarded Records/sec
– SQLServer:Access MethodsSkipped Ghosted Records/sec
– SQLServer:Access MethodsIndex Searches/sec
– SQLServer:Access MethodsFreeSpace Scans/sec
– SQLServer:Access MethodsFreeSpace Page Fetches/sec
– SQLServer:Access MethodsPages Allocated/sec
– SQLServer:Access MethodsExtents Allocated/sec
– SQLServer:Access MethodsMixed page allocations/sec
– SQLServer:Access MethodsExtent Deallocations/sec
– SQLServer:Access MethodsPage Deallocations/sec
– SQLServer:Access MethodsPage Splits/sec
– SQLServer:Access MethodsTable Lock Escalations/sec
– SQLServer:Access MethodsDeferred Dropped rowsets
– SQLServer:Access MethodsDropped rowset cleanups/sec
– SQLServer:Access MethodsDropped rowsets skipped/sec
– SQLServer:Access MethodsDeferred dropped AUs
– SQLServer:Access MethodsAU cleanups/sec
– SQLServer:Access MethodsAU cleanup batches/sec
– SQLServer:Access MethodsFailed AU cleanup batches/sec
– SQLServer:Access MethodsUsed tree page cookie
– SQLServer:Access MethodsFailed tree page cookie
– SQLServer:Access MethodsUsed leaf page cookie
– SQLServer:Access MethodsFailed leaf page cookie
– SQLServer:Access MethodsLobSS Provider Create Count
– SQLServer:Access MethodsLobSS Provider Destroy Count
Page 8
17. An example of the use of this command would be this:
Get-Service | Select-Object -Property *
Usually, the result of the GetService cmdlet would be a list in table format of all the serveices with
their description and status. Though, whn applying this second cmdlet, we will get, for each service,
information of all the properties that this service has:
Name : service
RequiredServices : {service1, service2}
CanPauseAndContinue : False
CanShutdown : True
CanStop : True
DisplayName : This is a Windows Service
DependentServices : {service3}
MachineName : .
ServiceName : service
ServicesDependedOn : {service1, service2}
ServiceHandle : SafeServiceHandle
Status : Stopped
ServiceType : Win32ShareProcess
Site :
Container :
Page 17
18. 7.2. SQL Instances Monitoring
In an active/pasive cluster architecture with remote instances, accesibles form all the SQL Server
nodes, it is possible using the SQL Server Powershell administration console, to do checks of the
availability of these instances from these nodes, and also to extract information about the
performance and the status of the databases stored in those started instances, from the cluster
active nodes.
In the case of the passive nodes, the monitoring is limited to the instance availability checks, in
order to show if this node remains passive or changes to active status and meanwhile it won't try to
connect with the instances or returns any information about its status.
Additionaly, from the Pandora server it is possible to define ICMP checks against the remote
instances service Ips in order to guarantee their connectivity.
With this aim, we have developped a Powershell plugin that, showing in a list of instances to
monitor, will search in the node list of services, for each instance, if the SQL Server service of that
instance is up (in cse of the active node) and in that case it will try to connect with the
Ipinstancename when collecting information about the DDBB status that are located in that
instance. If it is specified, it will get also the status of all the service of tha node linked with SQL.
The parameters of this plugin are the following:
-select all All local instances and services are checked (not to
be used in clusters)
-select list Instances from the list are checked
-select services All local services are checked
-list Provides a path for a list with instances to check
Usage example: .Pandora_Plugin_SQL_v1.0.ps1 -select all -list instances.txt 2>
plugin_error.log
In order the plugin works right we should inform that:
– The “select all” mode will only be used in SQL servers whose instances are all locals.
– In the case of instances located in remote servers, it isn't possible to resolve the hostname of
the machine where the SQL server remote instance is located, so, to connect with the
instance you will have to do it with the combo IPinstancename.
Page 18