Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator. It runs on most available operating systems, including Windows and is licensed under the GNU GPL.

Prerequisite

For Virtual Machines, install the Linux Agent.

Configuring the credentials

Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml

squid:
- name: squid
  user: <username>
  pwd: <Password>
  encoding-type: plain
  labels:
    key1: val1
    key2: val2

Configuring the application

Virtual Machine

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml

- name: squid
  instance-checks:
    service-check:
      - squid
    process-check:
      - squid
    port-check:
      - 3128

Docker environment

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml

- name: squid
  container-checks:
    image-check:
      - squid
    port-check:
      - 3128

Kubernetes environment

Configure the application in config.yaml

- name: squid
  container-checks:
    image-check:
      - squid
    port-check:
      - 3128

Validate

Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.

Metrics

OpsRamp MetricMetric Display NameUnit
squid_cachemgr_client_http_requests

Number of HTTP requests received from clients
Client Http RequestsRequests / second
squid_cachemgr_client_http_hits

Number of cache hits in response to client requests
Client Http HitsHits / second
squid_cachemgr_client_http_errors

Number of client transactions that resulted in an error
Client Http ErrorsErrors / second
squid_cachemgr_client_http_kbytes_in

Amount of traffic received from clients in their requests
Client Http Kbytes InKibibytes / second
squid_cachemgr_client_http_kbytes_out

Amount of traffic sent to clients in responses
Client Http Kbytes Outkibibytes / second
squid_cachemgr_client_http_hit_kbytes_out

Amount of traffic sent to clients in responses that are cache hits
Client Http Hit Kbytes Outkibibytes / second
squid_cachemgr_server_all_requests

Number of requests forwarded to origin servers (or neighbor caches) for all server-side protocols
Server All RequestsRequests / second
squid_cachemgr_server_all_errors

Number of server-side requests (all protocols) that resulted in some kind of error
Server All ErrorsErrors / second
squid_cachemgr_server_all_kbytes_in

Amount of traffic read from the server-side for all protocols
Server All Kbytes Inkibibytes / second
squid_cachemgr_server_all_kbytes_out

Amount of traffic written to origin servers and/or neighbor caches for server-side requests
Server All Kbytes Outkibibytes / second
squid_cachemgr_server_http_requests

Number of server-side requests to HTTP servers, including neighbor caches
Server Http RequestsRequests / second
squid_cachemgr_server_http_errors

Number of server-side HTTP requests that resulted in an error
Server Http ErrorsErrors / second
squid_cachemgr_server_http_kbytes_in

Amount of traffic read from HTTP origin servers and neighbor caches
Server Http Kbytes Inkibibytes / second
squid_cachemgr_server_http_kbytes_out

Amount of traffic written to HTTP origin servers and neighbor caches
Server Http Kbytes Outkibibytes / second
squid_cachemgr_server_ftp_requests

Number of requests sent to FTP servers
Server Ftp RequestsRequests / second
squid_cachemgr_server_ftp_errors

Number of requests sent to FTP servers that resulted in an error
Server Ftp ErrorsErrors / second
squid_cachemgr_server_ftp_kbytes_in

Amount of traffic read from FTP servers, including control channel traffic
Server Ftp Kbytes Inkibibytes / second
squid_cachemgr_server_ftp_kbytes_out

Amount of traffic written to FTP servers, including control channel traffic
Server Ftp Kbytes Outkibibytes / second
squid_cachemgr_server_other_requests

Number of "other" server-side requests. Currently, the other protocols are Gopher, WAIS, and SSL
Server Other RequestsRequests / second
squid_cachemgr_server_other_errors

Number of Gopher, WAIS, and SSL requests that resulted in an error
Server Other ErrorsErrors / second
squid_cachemgr_server_other_kbytes_in

Amount of traffic read from Gopher, WAIS, and SSL servers
Server Other Kbytes Inkibibytes / second
squid_cachemgr_server_other_kbytes_out

Amount of traffic written to Gopher, WAIS, and SSL servers
Server Other Kbytes Outkibibytes / second
squid_cachemgr_icp_pkts_sent

Number of ICP messages sent to neighbors. This includes both queries and replies but doesn't include HTCP messages
Icp Pkts SentMessages / second
squid_cachemgr_icp_pkts_recv

Number of ICP messages received from neighbors, including both queries and replies
Icp Pkts RecvMessages / second
squid_cachemgr_icp_queries_sent

Number of ICP queries sent to neighbors
Icp Queries SentQueries / second
squid_cachemgr_icp_replies_sent

Number of ICP replies sent to neighbors
Icp Replies SentResponse / second
squid_cachemgr_icp_queries_recv

Number of ICP queries received from neighbors
Icp Queries RecvQueries / second
squid_cachemgr_icp_replies_recv

Number of ICP replies received from neighbors
Icp Replies RecvResponse / second
squid_cachemgr_icp_query_timeouts

Number of times that Squid timed out waiting for ICP replies to arrive
Icp Query TimeoutsErrors / second
squid_cachemgr_icp_replies_queued

Number of times Squid queued an ICP message after the initial attempt to send failed
Icp Replies QueuedMessages / second
squid_cachemgr_icp_kbytes_sent

Amount of traffic sent in all ICP messages, including both queries and replies
Icp Kbytes Sentkibibytes / second
squid_cachemgr_icp_kbytes_recv

Amount of traffic received in all ICP messages, including both queries and replies
Icp Kbytes Recvkibibytes / second
squid_cachemgr_icp_q_kbytes_sent

Amount of traffic sent to neighbors in ICP queries
Icp Q Kbytes Sentkibibytes / second
squid_cachemgr_icp_r_kbytes_sent

Amount of traffic sent to neighbors in ICP replies
Icp R Kbytes Sentkibibytes / second
squid_cachemgr_icp_q_kbytes_recv

Amount of traffic received from neighbors in ICP queries
Icp Q Kbytes Recvkibibytes / second
squid_cachemgr_icp_r_kbytes_recv

Amount of traffic received from neighbors in ICP replies
Icp R Kbytes Recvkibibytes / second
squid_cachemgr_icp_times_used

Number of times ICP resulted in the selection of a neighbor as the next-hop for a cache miss
Icp Times Usedper second
squid_cachemgr_cd_times_used

Number of times Cache Digests resulted in the selection of a neighbor as the next-hop for a cache miss
Cd Times Usedper second
squid_cachemgr_cd_msgs_sent

Number of Cache Digest messages sent to neighbors
Cd Msgs SentMessages / second
squid_cachemgr_cd_msgs_recv

Number of Cache Digest messages received from neighbors
Cd Msgs RecvMessages / second
squid_cachemgr_cd_memory

Amount of memory used by enabling the Cache Digests' feature
Cd Memorykibibytes / second
squid_cachemgr_cd_local_memory

Amount of memory used to store Squid's own Cache Digest
Cd Local Memorykibibytes / second
squid_cachemgr_cd_kbytes_sent

Amount of traffic sent to neighbors in Cache Digest messages
Cd Kbytes Sentkibibytes / second
squid_cachemgr_cd_kbytes_recv

Amount of traffic received from neighbors in Cache Digest messages
Cd Kbytes Recvkibibytes / second
squid_cachemgr_unlink_requests

Number of unlink requests given to the (optional) unlinkd process
Unlink RequestsRequests / second
squid_cachemgr_page_faults

Number of (major) page faults as reported by getrusage( )
Page FaultsFaults / second
squid_cachemgr_select_loops

Number of times Squid called select( ) or poll( ) in the main I/O loop
Select LoopsItems / second
squid_cachemgr_cpu_time

Amount of CPU used by squid, as reported by getrusage( )
Cpu Timepercent
squid_cachemgr_swap_outs

Number of objects (swap files) saved to disk
Swap OutsFiles / second
squid_cachemgr_swap_ins

Number of objects (swap files) read from disk
Swap InsFiles / second
squid_cachemgr_swap_files_cleaned

Number of orphaned cache files removed by the periodic cleanup procedure
Swap Files CleanedFiles / second
squid_cachemgr_aborted_requests

Number of server-side HTTP requests aborted due to client-side aborts
Aborted RequestsRequests / second
squid_cachemgr_icp_messages_received

Total number of ICP messages received since Squid was started.
Icp Messages ReceivedMessages / seconds
squid_cachemgr_icp_messages_sent

Total number of ICP messages sent since Squid was started.
Icp Messages SentMessages / seconds
squid_fqdn_cache_entries

Number of FQDN cache entries
Fqdn Cache EntriesEntries
squid_clients

Number of clients accessing cache, client actually means IP address. Squid assumes that each client has a unique IP address
ClientsClients
squid_requests_disk_hit_ratio

These values represent the percentage of plain cache hits served from disk
Requests Disk Hit Ratiopercent
squid_cache_hit_ratio

Percentage of HTTP requests that result in a cache hit
Cache Hit Ratiopercent
squid_request_failure_ratio

Average ratio between the number of failed and successful requests
Request Failure Ratiopercent
squid_cache_byte_hit_ratio

Squid calculates byte hit ratio by comparing the number of bytes received from origin servers (or neighbors) to the number of bytes sent to clients
Cache Byte Hit Ratiopercent
squid_ip_cache_entries

Number of IP cache entries
Ip Cache EntriesEntries
squid_request_memory_hit_ratio

These values represent the percentage of all cache hits that were served from memory
Request Memory Hit Ratiopercent
squid_ip_cache_statistics

The IP cache contains cached results of hostname-to-address lookups
Ip Cache Statisticsper second
squid_fqdn_cache_statistics

The FQDN cache is similar to the IP cache, except that it stores address-to-hostname lookups
Fqdn Cache Statisticsper second
squid_service_times

Median of various service time (or response time) distributions
Service Timesseconds