Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/squid_snmp?at=release/7.0
Squid by SNMP
Overview
This template is designed for the effortless deployment of Squid monitoring by Zabbix via SNMP and doesn't require any external scripts.
Requirements
Zabbix version: 7.0 and higher.
Tested versions
This template has been tested on:
- Squid 3.5.12
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
Setup Squid
Enable SNMP support following official documentation. Required parameters in squid.conf:
snmp_port <port_number>
acl <zbx_acl_name> snmp_community <community_name>
snmp_access allow <zbx_acl_name> <zabbix_server_ip>
Setup Zabbix
1. Import the template template_app_squid_snmp.yaml into Zabbix.
2. Set values for {$SQUID.SNMP.COMMUNITY}, {$SQUID.SNMP.PORT} and {$SQUID.HTTP.PORT} as configured in squid.conf.
3. Link the imported template to a host with Squid.
4. Add SNMPv2 interface to Squid host. Set Port as {$SQUID.SNMP.PORT} and SNMP community as {$SQUID.SNMP.COMMUNITY}.
Macros used
Name | Description | Default |
---|---|---|
{$SQUID.SNMP.PORT} | snmp_port configured in squid.conf (Default: 3401) |
3401 |
{$SQUID.HTTP.PORT} | http_port configured in squid.conf (Default: 3128) |
3128 |
{$SQUID.SNMP.COMMUNITY} | SNMP community allowed by ACL in squid.conf |
public |
{$SQUID.FILE.DESC.WARN.MIN} | The threshold for minimum number of available file descriptors |
100 |
{$SQUID.PAGE.FAULT.WARN} | The threshold for sys page faults rate in percent of received HTTP requests |
90 |
Items
Name | Description | Type | Key and additional info |
---|---|---|---|
Service ping | Simple check | net.tcp.service[tcp,,{$SQUID.HTTP.PORT}] Preprocessing
|
|
Uptime | The Uptime of the cache in timeticks (in hundredths of a second) with preprocessing |
SNMP agent | squid[cacheUptime] Preprocessing
|
Version | Cache Software Version |
SNMP agent | squid[cacheVersionId] Preprocessing
|
CPU usage | The percentage use of the CPU |
SNMP agent | squid[cacheCpuUsage] |
Memory maximum resident size | Maximum Resident Size |
SNMP agent | squid[cacheMaxResSize] Preprocessing
|
Memory maximum cache size | The value of the cache_mem parameter |
SNMP agent | squid[cacheMemMaxSize] Preprocessing
|
Memory cache usage | Total accounted memory |
SNMP agent | squid[cacheMemUsage] Preprocessing
|
Cache swap low water mark | Cache Swap Low Water Mark |
SNMP agent | squid[cacheSwapLowWM] |
Cache swap high water mark | Cache Swap High Water Mark |
SNMP agent | squid[cacheSwapHighWM] |
Cache swap directory size | The total of the cache_dir space allocated |
SNMP agent | squid[cacheSwapMaxSize] Preprocessing
|
Cache swap current size | Storage Swap Size |
SNMP agent | squid[cacheCurrentSwapSize] |
File descriptor count - current used | Number of file descriptors in use |
SNMP agent | squid[cacheCurrentFileDescrCnt] |
File descriptor count - current maximum | Highest number of file descriptors in use |
SNMP agent | squid[cacheCurrentFileDescrMax] |
File descriptor count - current reserved | Reserved number of file descriptors |
SNMP agent | squid[cacheCurrentResFileDescrCnt] |
File descriptor count - current available | Available number of file descriptors |
SNMP agent | squid[cacheCurrentUnusedFDescrCnt] |
Byte hit ratio per 1 minute | Byte Hit Ratios |
SNMP agent | squid[cacheRequestByteRatio.1] |
Byte hit ratio per 5 minutes | Byte Hit Ratios |
SNMP agent | squid[cacheRequestByteRatio.5] |
Byte hit ratio per 1 hour | Byte Hit Ratios |
SNMP agent | squid[cacheRequestByteRatio.60] |
Request hit ratio per 1 minute | Byte Hit Ratios |
SNMP agent | squid[cacheRequestHitRatio.1] |
Request hit ratio per 5 minutes | Byte Hit Ratios |
SNMP agent | squid[cacheRequestHitRatio.5] |
Request hit ratio per 1 hour | Byte Hit Ratios |
SNMP agent | squid[cacheRequestHitRatio.60] |
Sys page faults per second | Page faults with physical I/O |
SNMP agent | squid[cacheSysPageFaults] Preprocessing
|
HTTP requests received per second | Number of HTTP requests received |
SNMP agent | squid[cacheProtoClientHttpRequests] Preprocessing
|
HTTP traffic received per second | Number of HTTP traffic received from clients |
SNMP agent | squid[cacheHttpInKb] Preprocessing
|
HTTP traffic sent per second | Number of HTTP traffic sent to clients |
SNMP agent | squid[cacheHttpOutKb] Preprocessing
|
HTTP Hits sent from cache per second | Number of HTTP Hits sent to clients from cache |
SNMP agent | squid[cacheHttpHits] Preprocessing
|
HTTP Errors sent per second | Number of HTTP Errors sent to clients |
SNMP agent | squid[cacheHttpErrors] Preprocessing
|
ICP messages sent per second | Number of ICP messages sent |
SNMP agent | squid[cacheIcpPktsSent] Preprocessing
|
ICP messages received per second | Number of ICP messages received |
SNMP agent | squid[cacheIcpPktsRecv] Preprocessing
|
ICP traffic transmitted per second | Number of ICP traffic transmitted |
SNMP agent | squid[cacheIcpKbSent] Preprocessing
|
ICP traffic received per second | Number of ICP traffic received |
SNMP agent | squid[cacheIcpKbRecv] Preprocessing
|
DNS server requests per second | Number of external dns server requests |
SNMP agent | squid[cacheDnsRequests] Preprocessing
|
DNS server replies per second | Number of external dns server replies |
SNMP agent | squid[cacheDnsReplies] Preprocessing
|
FQDN cache requests per second | Number of FQDN Cache requests |
SNMP agent | squid[cacheFqdnRequests] Preprocessing
|
FQDN cache hits per second | Number of FQDN Cache hits |
SNMP agent | squid[cacheFqdnHits] Preprocessing
|
FQDN cache misses per second | Number of FQDN Cache misses |
SNMP agent | squid[cacheFqdnMisses] Preprocessing
|
IP cache requests per second | Number of IP Cache requests |
SNMP agent | squid[cacheIpRequests] Preprocessing
|
IP cache hits per second | Number of IP Cache hits |
SNMP agent | squid[cacheIpHits] Preprocessing
|
IP cache misses per second | Number of IP Cache misses |
SNMP agent | squid[cacheIpMisses] Preprocessing
|
Objects count | Number of objects stored by the cache |
SNMP agent | squid[cacheNumObjCount] |
Objects LRU expiration age | Storage LRU Expiration Age |
SNMP agent | squid[cacheCurrentLRUExpiration] Preprocessing
|
Objects unlinkd requests | Requests given to unlinkd |
SNMP agent | squid[cacheCurrentUnlinkRequests] |
HTTP all service time per 5 minutes | HTTP all service time per 5 minutes |
SNMP agent | squid[cacheHttpAllSvcTime.5] Preprocessing
|
HTTP all service time per hour | HTTP all service time per hour |
SNMP agent | squid[cacheHttpAllSvcTime.60] Preprocessing
|
HTTP miss service time per 5 minutes | HTTP miss service time per 5 minutes |
SNMP agent | squid[cacheHttpMissSvcTime.5] Preprocessing
|
HTTP miss service time per hour | HTTP miss service time per hour |
SNMP agent | squid[cacheHttpMissSvcTime.60] Preprocessing
|
HTTP hit service time per 5 minutes | HTTP hit service time per 5 minutes |
SNMP agent | squid[cacheHttpHitSvcTime.5] Preprocessing
|
HTTP hit service time per hour | HTTP hit service time per hour |
SNMP agent | squid[cacheHttpHitSvcTime.60] Preprocessing
|
ICP query service time per 5 minutes | ICP query service time per 5 minutes |
SNMP agent | squid[cacheIcpQuerySvcTime.5] Preprocessing
|
ICP query service time per hour | ICP query service time per hour |
SNMP agent | squid[cacheIcpQuerySvcTime.60] Preprocessing
|
ICP reply service time per 5 minutes | ICP reply service time per 5 minutes |
SNMP agent | squid[cacheIcpReplySvcTime.5] Preprocessing
|
ICP reply service time per hour | ICP reply service time per hour |
SNMP agent | squid[cacheIcpReplySvcTime.60] Preprocessing
|
DNS service time per 5 minutes | DNS service time per 5 minutes |
SNMP agent | squid[cacheDnsSvcTime.5] Preprocessing
|
DNS service time per hour | DNS service time per hour |
SNMP agent | squid[cacheDnsSvcTime.60] Preprocessing
|
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Squid: Port {$SQUID.HTTP.PORT} is down | last(/Squid by SNMP/net.tcp.service[tcp,,{$SQUID.HTTP.PORT}])=0 |
Average | Manual close: Yes | |
Squid: Squid has been restarted | Uptime is less than 10 minutes. |
last(/Squid by SNMP/squid[cacheUptime])<10m |
Info | Manual close: Yes |
Squid: Squid version has been changed | Squid version has changed. Acknowledge to close the problem manually. |
last(/Squid by SNMP/squid[cacheVersionId],#1)<>last(/Squid by SNMP/squid[cacheVersionId],#2) and length(last(/Squid by SNMP/squid[cacheVersionId]))>0 |
Info | Manual close: Yes |
Squid: Swap usage is more than low watermark | last(/Squid by SNMP/squid[cacheCurrentSwapSize])>last(/Squid by SNMP/squid[cacheSwapLowWM])*last(/Squid by SNMP/squid[cacheSwapMaxSize])/100 |
Warning | ||
Squid: Swap usage is more than high watermark | last(/Squid by SNMP/squid[cacheCurrentSwapSize])>last(/Squid by SNMP/squid[cacheSwapHighWM])*last(/Squid by SNMP/squid[cacheSwapMaxSize])/100 |
High | ||
Squid: Squid is running out of file descriptors | last(/Squid by SNMP/squid[cacheCurrentUnusedFDescrCnt])<{$SQUID.FILE.DESC.WARN.MIN} |
Warning | ||
Squid: High sys page faults rate | avg(/Squid by SNMP/squid[cacheSysPageFaults],5m)>avg(/Squid by SNMP/squid[cacheProtoClientHttpRequests],5m)/100*{$SQUID.PAGE.FAULT.WARN} |
Warning |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums