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 NameUnitDescription
squid_cachemgr_client_http_requestsClient Http RequestsRequests / secondNumber of HTTP requests received from clients
squid_cachemgr_client_http_hitsClient Http HitsHits / secondNumber of cache hits in response to client requests
squid_cachemgr_client_http_errorsClient Http ErrorsErrors / secondNumber of client transactions that resulted in an error
squid_cachemgr_client_http_kbytes_inClient Http Kbytes InKibibytes / secondAmount of traffic received from clients in their requests
squid_cachemgr_client_http_kbytes_outClient Http Kbytes Outkibibytes / secondAmount of traffic sent to clients in responses
squid_cachemgr_client_http_hit_kbytes_outClient Http Hit Kbytes Outkibibytes / secondAmount of traffic sent to clients in responses that are cache hits
squid_cachemgr_server_all_requestsServer All RequestsRequests / secondNumber of requests forwarded to origin servers (or neighbor caches) for all server-side protocols
squid_cachemgr_server_all_errorsServer All ErrorsErrors / secondNumber of server-side requests (all protocols) that resulted in some kind of error
squid_cachemgr_server_all_kbytes_inServer All Kbytes Inkibibytes / secondAmount of traffic read from the server-side for all protocols
squid_cachemgr_server_all_kbytes_outServer All Kbytes Outkibibytes / secondAmount of traffic written to origin servers and/or neighbor caches for server-side requests
squid_cachemgr_server_http_requestsServer Http RequestsRequests / secondNumber of server-side requests to HTTP servers, including neighbor caches
squid_cachemgr_server_http_errorsServer Http ErrorsErrors / secondNumber of server-side HTTP requests that resulted in an error
squid_cachemgr_server_http_kbytes_inServer Http Kbytes Inkibibytes / secondAmount of traffic read from HTTP origin servers and neighbor caches
squid_cachemgr_server_http_kbytes_outServer Http Kbytes Outkibibytes / secondAmount of traffic written to HTTP origin servers and neighbor caches
squid_cachemgr_server_ftp_requestsServer Ftp RequestsRequests / secondNumber of requests sent to FTP servers
squid_cachemgr_server_ftp_errorsServer Ftp ErrorsErrors / secondNumber of requests sent to FTP servers that resulted in an error
squid_cachemgr_server_ftp_kbytes_inServer Ftp Kbytes Inkibibytes / secondAmount of traffic read from FTP servers, including control channel traffic
squid_cachemgr_server_ftp_kbytes_outServer Ftp Kbytes Outkibibytes / secondAmount of traffic written to FTP servers, including control channel traffic
squid_cachemgr_server_other_requestsServer Other RequestsRequests / secondNumber of "other" server-side requests. Currently, the other protocols are Gopher, WAIS, and SSL
squid_cachemgr_server_other_errorsServer Other ErrorsErrors / secondNumber of Gopher, WAIS, and SSL requests that resulted in an error
squid_cachemgr_server_other_kbytes_inServer Other Kbytes Inkibibytes / secondAmount of traffic read from Gopher, WAIS, and SSL servers
squid_cachemgr_server_other_kbytes_outServer Other Kbytes Outkibibytes / secondAmount of traffic written to Gopher, WAIS, and SSL servers
squid_cachemgr_icp_pkts_sentIcp Pkts SentMessages / secondNumber of ICP messages sent to neighbors. This includes both queries and replies but doesn't include HTCP messages
squid_cachemgr_icp_pkts_recvIcp Pkts RecvMessages / secondNumber of ICP messages received from neighbors, including both queries and replies
squid_cachemgr_icp_queries_sentIcp Queries SentQueries / secondNumber of ICP queries sent to neighbors
squid_cachemgr_icp_replies_sentIcp Replies SentResponse / secondNumber of ICP replies sent to neighbors
squid_cachemgr_icp_queries_recvIcp Queries RecvQueries / secondNumber of ICP queries received from neighbors
squid_cachemgr_icp_replies_recvIcp Replies RecvResponse / secondNumber of ICP replies received from neighbors
squid_cachemgr_icp_query_timeoutsIcp Query TimeoutsErrors / secondNumber of times that Squid timed out waiting for ICP replies to arrive
squid_cachemgr_icp_replies_queuedIcp Replies QueuedMessages / secondNumber of times Squid queued an ICP message after the initial attempt to send failed
squid_cachemgr_icp_kbytes_sentIcp Kbytes Sentkibibytes / secondAmount of traffic sent in all ICP messages, including both queries and replies
squid_cachemgr_icp_kbytes_recvIcp Kbytes Recvkibibytes / secondAmount of traffic received in all ICP messages, including both queries and replies
squid_cachemgr_icp_q_kbytes_sentIcp Q Kbytes Sentkibibytes / secondAmount of traffic sent to neighbors in ICP queries
squid_cachemgr_icp_r_kbytes_sentIcp R Kbytes Sentkibibytes / secondAmount of traffic sent to neighbors in ICP replies
squid_cachemgr_icp_q_kbytes_recvIcp Q Kbytes Recvkibibytes / secondAmount of traffic received from neighbors in ICP queries
squid_cachemgr_icp_r_kbytes_recvIcp R Kbytes Recvkibibytes / secondAmount of traffic received from neighbors in ICP replies
squid_cachemgr_icp_times_usedIcp Times Usedper secondNumber of times ICP resulted in the selection of a neighbor as the next-hop for a cache miss
squid_cachemgr_cd_times_usedCd Times Usedper secondNumber of times Cache Digests resulted in the selection of a neighbor as the next-hop for a cache miss
squid_cachemgr_cd_msgs_sentCd Msgs SentMessages / secondNumber of Cache Digest messages sent to neighbors
squid_cachemgr_cd_msgs_recvCd Msgs RecvMessages / secondNumber of Cache Digest messages received from neighbors
squid_cachemgr_cd_memoryCd Memorykibibytes / secondAmount of memory used by enabling the Cache Digests' feature
squid_cachemgr_cd_local_memoryCd Local Memorykibibytes / secondAmount of memory used to store Squid's own Cache Digest
squid_cachemgr_cd_kbytes_sentCd Kbytes Sentkibibytes / secondAmount of traffic sent to neighbors in Cache Digest messages
squid_cachemgr_cd_kbytes_recvCd Kbytes Recvkibibytes / secondAmount of traffic received from neighbors in Cache Digest messages
squid_cachemgr_unlink_requestsUnlink RequestsRequests / secondNumber of unlink requests given to the (optional) unlinkd process
squid_cachemgr_page_faultsPage FaultsFaults / secondNumber of (major) page faults as reported by getrusage( )
squid_cachemgr_select_loopsSelect LoopsItems / secondNumber of times Squid called select( ) or poll( ) in the main I/O loop
squid_cachemgr_cpu_timeCpu TimepercentAmount of CPU used by squid, as reported by getrusage( )
squid_cachemgr_swap_outsSwap OutsFiles / secondNumber of objects (swap files) saved to disk
squid_cachemgr_swap_insSwap InsFiles / secondNumber of objects (swap files) read from disk
squid_cachemgr_swap_files_cleanedSwap Files CleanedFiles / secondNumber of orphaned cache files removed by the periodic cleanup procedure
squid_cachemgr_aborted_requestsAborted RequestsRequests / secondNumber of server-side HTTP requests aborted due to client-side aborts
squid_cachemgr_icp_messages_receivedIcp Messages ReceivedMessages / secondsTotal number of ICP messages received since Squid was started.
squid_cachemgr_icp_messages_sentIcp Messages SentMessages / secondsTotal number of ICP messages sent since Squid was started.
squid_fqdn_cache_entriesFqdn Cache EntriesEntriesNumber of FQDN cache entries
squid_clientsClientsClientsNumber of clients accessing cache, client actually means IP address. Squid assumes that each client has a unique IP address
squid_requests_disk_hit_ratioRequests Disk Hit RatiopercentThese values represent the percentage of plain cache hits served from disk
squid_cache_hit_ratioCache Hit RatiopercentPercentage of HTTP requests that result in a cache hit
squid_request_failure_ratioRequest Failure RatiopercentAverage ratio between the number of failed and successful requests
squid_cache_byte_hit_ratioCache Byte Hit RatiopercentSquid calculates byte hit ratio by comparing the number of bytes received from origin servers (or neighbors) to the number of bytes sent to clients
squid_ip_cache_entriesIp Cache EntriesEntriesNumber of IP cache entries
squid_request_memory_hit_ratioRequest Memory Hit RatiopercentThese values represent the percentage of all cache hits that were served from memory
squid_ip_cache_statisticsIp Cache Statisticsper secondThe IP cache contains cached results of hostname-to-address lookups
squid_fqdn_cache_statisticsFqdn Cache Statisticsper secondThe FQDN cache is similar to the IP cache, except that it stores address-to-hostname lookups
squid_service_timesService TimessecondsMedian of various service time (or response time) distributions