--- id: squid-proxy-opentelemetry title: Squid Proxy - OpenTelemetry Collector sidebar_label: Squid Proxy - OTel Collector description: Learn about the Sumo Logic OpenTelemetry app for Squid Proxy. slug: /help/docs/integrations/web-servers/opentelemetry/squid-proxy-opentelemetry/ canonical: https://www.sumologic.com/help/docs/integrations/web-servers/opentelemetry/squid-proxy-opentelemetry/ --- import useBaseUrl from '@docusaurus/useBaseUrl'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; Squid Proxy icon OpenTelemetry color icon The [Squid](http://www.squid-cache.org/Intro/) Proxy app is a logs app that helps you monitor activity in Squid Proxy. The preconfigured dashboards provide insight into served and denied requests; HTTP response codes; URLs experiencing redirects, client errors, and server errors; and quality of service data that helps you understand your users' experience. Squid logs are sent to Sumo Logic through OpenTtelemetry [filelog receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver). Schematics ## Fields creation in Sumo Logic for Squid Following are the [Fields](/docs/manage/fields/) which will be created as part of Squid App install if not already present: - `webengine.cluster.name`. User configured. Enter a name to identify this Squid cluster. This cluster name will be shown in the Sumo Logic dashboards. - `webengine.system`. Has a fixed value of **squidproxy**. - `sumo.datasource`. Has a fixed value of **squidproxy**. ## Prerequisites By default, the squid proxy will write the access log to the log directory that was configured during installation. For example, on Linux, the default log directory is `/var/log/squid/access.log`. If the access log is disabled, you must enable the access log by following [these instructions](https://wiki.squid-cache.org/SquidFaq/SquidLogs). import LogsCollectionPrereqisites from '../../../reuse/apps/logs-collection-prereqisites.md'; For Windows systems, log files which are collected should be accessible by the SYSTEM group. Use the following set of PowerShell commands if the SYSTEM group does not have access. ``` $NewAcl = Get-Acl -Path "" # Set properties $identity = "NT AUTHORITY\SYSTEM" $fileSystemRights = "ReadAndExecute" $type = "Allow" # Create new rule $fileSystemAccessRuleArgumentList = $identity, $fileSystemRights, $type $fileSystemAccessRule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $fileSystemAccessRuleArgumentList # Apply new rule $NewAcl.SetAccessRule($fileSystemAccessRule) Set-Acl -Path "" -AclObject $NewAcl ``` ## Collection configuration and app installation import ConfigAppInstall from '../../../reuse/apps/opentelemetry/config-app-install.md'; ### Step 1: Set up Collector import SetupColl from '../../../reuse/apps/opentelemetry/set-up-collector.md'; Collector ## Step 2: Configure integration OpenTelemetry works with a [configuration](https://opentelemetry.io/docs/collector/configuration/) yaml file which has all the details with respect to the data which needs to be collected. For example, it specifies the location of a log file that is read and sent to the Sumo Logic platform.. In this step, you will configure the yaml required for Squid Collection. The path of the log file configured to capture Squid logs is needed to be given here. The files are typically located in `/var/log/squid/access.log`. Refer to the [Prerequisites](#prerequisites) section for more details. You can add any custom fields which you want to tag along with the data ingested in Sumo. Click on the **Download YAML File** button to get the yaml file. import CollectorVersionNote from '../../../reuse/apps/opentelemetry/collector-version-note.md'; YAML ## Step 3: Send logs to Sumo Logic import LogsIntro from '../../../reuse/apps/opentelemetry/send-logs-intro.md'; 1. Copy the yaml at `/etc/otelcol-sumo/conf.d/` folder in the Squid instance which needs to be monitored. 2. Restart the otelcol-sumo process using the below command: ```sh sudo systemctl restart otelcol-sumo ``` 1. Copy the yaml file to **`C:\ProgramData\Sumo Logic\OpenTelemetry Collector\config\conf.d`** folder in the machine which needs to be monitored. 2. Restart the collector using:  ```sh Restart-Service -Name OtelcolSumo ``` 1. Copy the yaml at `/etc/otelcol-sumo/conf.d/` folder in the Squid instance which needs to be monitored. 2. Restart the otelcol-sumo process using the below command: ```sh   otelcol-sumo --config /etc/otelcol-sumo/sumologic.yaml --conf "glob:/etc/otelcol-sumo/conf.d/*.yaml" ``` import ChefNoEnv from '../../../reuse/apps/opentelemetry/chef-without-env.md'; import AnsibleNoEnv from '../../../reuse/apps/opentelemetry/ansible-without-env.md'; import PuppetNoEnv from '../../../reuse/apps/opentelemetry/puppet-without-env.md'; import LogsOutro from '../../../reuse/apps/opentelemetry/send-logs-outro.md'; ### Sample log messages in Non-Kubernetes environments ```sql 1674483805.439 44 192.168.100.40 TCP_REFRESH_MODIFIED/301 514 GET http://openstack.org/ - HIER_DIRECT/192.168.100.40 text/html ``` ### Sample queries This sample Query is from the **Squid Proxy - HTTP Response Analysis** > **URLs Experiencing Redirections** panel. ```sumo title="Query String" %"sumo.datasource"=squidproxy %"webengine.cluster.name"=* host.name=* %"webengine.system"=squidproxy | json "log" as message nodrop  | if (isEMpty(message), _raw, message) as message | parse regex field = message "(?