Hi,
I'm currently on my internship and need to work with prometheus + grafana. I've installed Prometheus on a Linux Ubuntu 22.04.5 LTS server.
After configuring prometheus and node exporter correctly, i unfortunately get a error when configuring snmp exporter.
Error: Error scraping target: server returned HTTP status 400 Bad Request
And when i click on the ip of the server i receive: Unknown auth "public_v1_''
I have two prometheus.yml files:
/home/rpbgintern2/prometheus.yml
/etc/prometheus/prometheus.yml
And two snmp.yml files:
/home/rpbgintern2/snmp_exporter-0.26.0.linux-amd64/snmp.yml
/home/rpbgintern2/snmp/snmp.yml
I don't know if multiple yml files are causing this error.
/etc/prometheus/prometheus.yml:
global:
scrape_interval: 15s
evaluation_interval: 15s
# scrape_timeout is set to the global default (10s).
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets: ['
172.27.136.2:9100']
- job_name: "prometheus"
static_configs:
- targets: ["
172.27.136.2:9090"]
labels:
app: "prometheus"
- job_name: 'snmp_exporter'
metrics_path: /snmp
params:
auth: [public_v1]
module: [if_mib]
static_configs:
- targets:
- 200.1.212.158 # SNMP device.
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement:
172.27.136.2:9116 # SNMP exporter's host:port
Please help! i've been troubleshooting this for the past 3 weeks