plugin_name: go.d.plugin
modules:
  - meta:
      id: collector-go.d.plugin-squid
      plugin_name: go.d.plugin
      module_name: squid
      monitored_instance:
        name: Squid
        link: "https://www.squid-cache.org/"
        categories:
          - data-collection.web-servers-and-web-proxies
        icon_filename: "squid.png"
      related_resources:
        integrations:
          list: []
      info_provided_to_referring_integrations:
        description: ""
      keywords:
        - squid
        - web delivery
        - squid caching proxy
      most_popular: false
    overview:
      data_collection:
        metrics_description: |
          This collector monitors statistics about the Squid Clients and Servers, like bandwidth and requests.
        method_description: "It collects metrics from the `squid-internal-mgr/counters` endpoint."
      supported_platforms:
        include: []
        exclude: []
      multi_instance: true
      additional_permissions:
        description: ""
      default_behavior:
        auto_detection:
          description: |
            By default, it detects Squid instances running on localhost that are listening on port 3128.
            On startup, it tries to collect metrics from:

            - https://127.0.0.1:3128
        limits:
          description: ""
        performance_impact:
          description: ""
    setup:
      prerequisites:
        list: []
      configuration:
        file:
          name: "go.d/squid.conf"
        options:
          description: |
            The following options can be defined globally: update_every, autodetection_retry.
          folding:
            title: "Config options"
            enabled: true
          list:
            - name: update_every
              description: Data collection frequency.
              default_value: 1
              required: false
            - name: autodetection_retry
              description: Recheck interval in seconds. Zero means no recheck will be scheduled.
              default_value: 0
              required: false
            - name: url
              description: Server URL.
              default_value: http://127.0.0.1:3128
              required: true
            - name: timeout
              description: HTTP request timeout.
              default_value: 1
              required: false
            - name: username
              description: Username for basic HTTP authentication.
              default_value: ""
              required: false
            - name: password
              description: Password for basic HTTP authentication.
              default_value: ""
              required: false
            - name: proxy_url
              description: Proxy URL.
              default_value: ""
              required: false
            - name: proxy_username
              description: Username for proxy basic HTTP authentication.
              default_value: ""
              required: false
            - name: proxy_password
              description: Password for proxy basic HTTP authentication.
              default_value: ""
              required: false
            - name: method
              description: HTTP request method.
              default_value: POST
              required: false
            - name: body
              description: HTTP request body.
              default_value: ""
              required: false
            - name: headers
              description: HTTP request headers.
              default_value: ""
              required: false
            - name: not_follow_redirects
              description: Redirect handling policy. Controls whether the client follows redirects.
              default_value: false
              required: false
            - name: tls_skip_verify
              description: Server certificate chain and hostname validation policy. Controls whether the client performs this check.
              default_value: false
              required: false
            - name: tls_ca
              description: Certification authority that the client uses when verifying the server's certificates.
              default_value: ""
              required: false
            - name: tls_cert
              description: Client TLS certificate.
              default_value: ""
              required: false
            - name: tls_key
              description: Client TLS key.
              default_value: ""
              required: false
        examples:
          folding:
            enabled: true
            title: Config
          list:
            - name: Basic
              description: A basic example configuration.
              folding:
                enabled: false
              config: |
                jobs:
                  - name: local
                    url: http://127.0.0.1:3128
            - name: Multi-instance
              description: |
                > **Note**: When you define multiple jobs, their names must be unique.

                Collecting metrics from local and remote instances.
              config: |
                jobs:
                  - name: local
                    url: http://127.0.0.1:3128

                  - name: remote
                    url: http://192.0.2.1:3128
    troubleshooting:
      problems:
        list: []
    alerts: []
    metrics:
      folding:
        title: Metrics
        enabled: false
      description: ""
      availability: []
      scopes:
        - name: Squid instance
          description: "These metrics refer to each monitored Squid instance."
          labels: []
          metrics:
            - name: squid.clients_net
              description: Squid Client Bandwidth
              unit: "kilobits/s"
              chart_type: area
              dimensions:
                - name: in
                - name: out
                - name: hits
            - name: squid.clients_requests
              description: Squid Client Requests
              unit: "requests/s"
              chart_type: line
              dimensions:
                - name: requests
                - name: hits
                - name: errors
            - name: squid.servers_net
              description: Squid Server Bandwidth
              unit: "kilobits/s"
              chart_type: area
              dimensions:
                - name: in
                - name: out
            - name: squid.servers_requests
              description: Squid Server Requests
              unit: "requests/s"
              chart_type: line
              dimensions:
                - name: requests
                - name: errors
