Squid (Windows)
This SAM application monitor template allows you to monitor the performance of Squid proxy server installed on a Windows machine by using SNMP and PowerShell monitors.
Prerequisites
WinRM is installed and properly configured on the target server. SNMP should be installed and configured on the target server. The Squid SNMP module must be configured on the target server:
By default, Squid uses UPD port 3401 for SNMP. You can change this port by using the snmp_port
directive in squid.conf
file.
The following configuration should be present in the squid.conf
file:
acl Snmppublic snmp_community <your_community_string>acl APMhost src <IP_address_of_SAM_server> snmp_access allow APMhost Snmppublic
For example:
acl Snmppublic snmp_community public acl APMhost src snmp_access allow APMhost Snmppublic
After these changes are made, restart Squid.
Credentials
Administrator on the target server.
Components
This was tested on Squid 3 for Windows.
Component monitors
Storage Mem Size
This monitor returns the amount of memory (in kilobytes) currently used to store in-memory objects.
OID: 1.3.6.1.4.1.3495.1.1.2.0
Storage Swap Size
This monitor returns the amount of disk space (in kilobytes) currently used to store on-disk objects.
OID: 1.3.6.1.4.1.3495.1.1.2.0
Page Faults
This monitor returns the number of page faults for the Squid process since it was started.
OID: 1.3.6.1.4.1.3495.1.3.1.1.0
HTTP Reads
This monitor returns the number of times this process called read( ) on HTTP sockets connected to origin servers and neighbor caches.
OID: 1.3.6.1.4.1.3495.1.3.1.2.0
Accounted Memory
This monitor returns the amount of memory allocated by the memory pooling routines. Not the same as the total memory used by Squid.
OID: 1.3.6.1.4.1.3495.1.3.1.3.0
CPU Usage (%)
This monitor returns the CPU utilization, as a percentage, since Squid was started.
OID: 1.3.6.1.4.1.3495.1.3.1.5.0
Stored Objects
This monitor returns the total number of objects currently in the cache.
OID: 1.3.6.1.4.1.3495.1.3.1.7.0
Available File Descriptors
This monitor returns the current number of available (unused) file descriptors.
OID: 1.3.6.1.4.1.3495.1.3.1.10.0
Reserved File Descriptors
This monitor returns the number of reserved file descriptors.
OID: 1.3.6.1.4.1.3495.1.3.1.11.0
HTTP Requests Received
This monitor returns the total number of HTTP requests received from cache clients.
OID: 1.3.6.1.4.1.3495.1.3.2.1.1.0
HTTP Hits
This monitor returns the number of client requests that were cache hits.
OID: 1.3.6.1.4.1.3495.1.3.2.1.2.0
HTTP Errors
This monitor returns the number of client requests that resulted in an error.
OID: 1.3.6.1.4.1.3495.1.3.2.1.3.0
HTTP Received (KB)
This monitor returns the amount of network traffic, in kilobytes, read from cache clients.
OID: 1.3.6.1.4.1.3495.1.3.2.1.4.0
HTTP Transmitted (KB)
This monitor returns the amount of network traffic, in kilobytes, written to cache clients.
OID: 1.3.6.1.4.1.3495.1.3.2.1.5.0
ICP Transmitted (KB)
This monitor returns the amount of network traffic, in kilobytes, used for ICP messages sent to neighbors, not including UDP and IP headers.
OID: 1.3.6.1.4.1.3495.1.3.2.1.8.0
ICP Received (KB)
This monitor returns the amount of network traffic, in kilobytes, used for ICP messages received from neighbors, not including UDP and IP headers.
OID: 1.3.6.1.4.1.3495.1.3.2.1.9.0
Requests From Clients
This monitor returns the number of requests forwarded to origin servers and neighbor caches.
OID: 1.3.6.1.4.1.3495.1.3.2.1.10.0
Errors For Client Requests
This monitor returns the number of errors received from origin servers and neighbor caches.
OID: 1.3.6.1.4.1.3495.1.3.2.1.11.0
Traffic Received From Servers (KB)
This monitor returns the amount of network traffic, in kilobytes, read from origin servers and neighbor caches.
OID: 1.3.6.1.4.1.3495.1.3.2.1.12.0
Traffic Sent To Servers (KB)
This monitor returns the amount of network traffic, in kilobytes, written to origin servers and neighbor caches.
OID: 1.3.6.1.4.1.3495.1.3.2.1.13.0
Clients
This monitor returns the number of clients that sent HTTP requests to Squid since it was started.
OID: 1.3.6.1.4.1.3495.1.3.2.1.15.0
IP Cache Requests
This monitor returns the number of requests received by Squid's IP cache. If the ratio of hits to requests is less than 60-75%, you may want to increase the size of your IP cache.
OID: 1.3.6.1.4.1.3495.1.4.1.2.0
IP Cache Hits
This monitor returns the number of lookups that were hits in the IP cache. If the ratio of hits to requests is less than 60-75%, you may want to increase the size of your IP cache.
OID: 1.3.6.1.4.1.3495.1.4.1.3.0
IP Cache Negative Hits
This monitor returns the number of lookups that were negative hits in the IP cache. Certain failed queries may be negatively cached for an amount of time determined by the negative_dns_ttl directive.
OID: 1.3.6.1.4.1.3495.1.4.1.5.0
IP Cache Misses
This monitor returns the number of IP cache misses.
OID: 1.3.6.1.4.1.3495.1.4.1.6.0
FQDN Cache Requests
This monitor returns the number of requests to the FQDN cache.
OID: 1.3.6.1.4.1.3495.1.4.2.2.0
FQDN Cache Hits
This monitor returns the number of FQDN cache requests satisfied as hits.
OID: 1.3.6.1.4.1.3495.1.4.2.3.0
FQDN Cache Negative Hits
This monitor returns the number of FQDN requests satisfied as negative cache hits.
OID: 1.3.6.1.4.1.3495.1.4.2.5.0
FQDN Cache Misses
This monitor returns the number of FQDN cache misses.
OID: 1.3.6.1.4.1.3495.1.4.2.6.0
External DNS Server Requests
This monitor returns the number of DNS queries made by Squid. This counter is reset each time you reconfigure the running Squid process.
OID: 1.3.6.1.4.1.3495.1.4.3.1.0
External DNS Server Replies
This monitor returns the number of DNS replies received by Squid. This counter is reset each time you reconfigure the running Squid process.
OID: 1.3.6.1.4.1.3495.1.4.3.2.0
External DNS Server Processes
For internal DNS (the default) this monitor reports the number of nameservers that Squid knows about. For external DNS, it reports the number of (running) dnsserver helper processes.
OID: 1.3.6.1.4.1.3495.1.4.3.3.0
Squid HTTP Port Monitor
This component monitor tests the ability of a Squid service to accept incoming sessions. By default it monitors 3128 TCP port.
Top 10 Active Sites
This monitor returns the top 10 of the most visited sites for specific proxy client.
You must specify the correct arguments for this component in the Script Arguments field. This PowerShell monitor uses the following argument structure:
IP_address,Path_to_logfile,Time
IP_address
– This is the IP address of the computer that uses the target squid server as a proxy server. This argument allows SAM to monitor specific proxy clients.Path_to_logfile
– This is the full path to the squidaccess.log
file.
For example:192.168.2.211,c:\squid\var\logs\access.log,week
Time
– This argument allows the user to get statistics during the last minute/hour/day/week/month/year.
For example: If you set Day, you will get the statistics for the last day.
Possible values: Minute, Hour, Day, Week, Month, Year. By default, this value it set to Week.
Due to the specific way of determining the statistic, there is an issue with showing sites with the “-” symbol in its names. For example: “
www.some-site.com
”, in the message field we will only receive everything before the dash, as in “www.some
”.
Top 10 Blocked Sites
This monitor returns the top 10 most blocked sites which the proxy client tried to open.
You must specify the correct arguments for this component in the Script Arguments field. This PowerShell monitor uses the following argument structure:
IP_address,Path_to_logfile,Time
IP_address
– This is the IP address of the computer that uses the target squid server as a proxy server. This argument allows SAM to monitor specific proxy clients.Path_to_logfile
– This is the full path to the squidaccess.log
file.
For example:192.168.2.211,c:\squid\var\logs\access.log,week
Time
– This argument allows the user to get statistics during the last minute/hour/day/week/month/year.
For example: If you set Day, you will get the statistics for the last day.
Possible values: Minute, Hour, Day, Week, Month, Year. By default, this value it set to Week.
Due to the specific way of determining the statistic, there is an issue with showing sites with the “-” symbol in its names. For example: “
www.some-site.com
”, in the message field will only receive everything before the dash, as in “www.some
”.
Traffic Statistic
This monitor returns the total amount of download and upload traffic in MB for a specific proxy client.
You must specify the correct arguments for this component in the Script Arguments field. This PowerShell monitor uses the following argument structure:
IP_address,Path_to_logfile,Time
IP_address
– This is the IP address of the computer that uses the target squid server as a proxy server. This argument allows SAM to monitor specific proxy clients.Path_to_logfile
– This is the full path to the squidaccess.log
file.
For Example:192.168.2.211,c:\squid\var\logs\access.log,week
Time
– This argument allows the user to get statistics during the last minute/hour/day/week/month/year.
For example: If you set Day, you will get the statistics for the last day.
Possible values: Minute, Hour, Day, Week, Month, Year. By default, this value it set to Week.
Process: Squid
This monitor returns the CPU and memory usage of the Squid process.