boynux / squid-exporter

Squid Prometheus Exporter

Home Page:https://www.boynux.com/squid-exporter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not fetch * metrics from squid instance: 403 error

gogomasaru opened this issue · comments

hello.
I am getting errors. Please help.

  1. error messeges
    Printed every 30 seconds after squid-exporter starts.
    In Prometheus is searched.
    Only two metric
  • squid_exporter_build_info
  • squid_up

2024/03/15 06:16:44 Could not fetch counter metrics from squid instance: error getting counters: Non success code 403 while fetching metrics
2024/03/15 06:16:44 Could not fetch service times metrics from squid instance: error getting service times: Non success code 403 while fetching metrics
2024/03/15 06:16:44 Could not fetch info metrics from squid instance: error getting info: Non success code 403 while fetching metrics

  1. env
  1. firewall
  • prometheus -> squid : port 9301
  1. config
  • acl prometheus src 'server IP'
  • http_access allow manager prometheus
  1. start script
    If I set it to the default or 127.0.0.1, I couldn't communicate with Prometheus, so I changed it to 0.0.0.0.
  • squid-exporter -squid-hostname localhost -squid-port 8080 -listen 0.0.0.0:9301 &
  1. squid version
    Squid Cache: Version 6.1

  2. os version
    centos 7.9

I only enabled port 8080 to listen, but I solved it by activating port 3128 as well.