Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generator User-Agent #1133

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ MIBDIR := mibs
MIB_PATH := 'mibs'

CURL_OPTS ?= -L -sS --retry 3 --retry-delay 3 --fail
CURL_USER_AGENT ?= -H "User-Agent: snmp_exporter generator"

REPO_TAG ?= $(shell git rev-parse --abbrev-ref HEAD)

Expand Down Expand Up @@ -180,7 +181,7 @@ $(MIBDIR)/AIRESPACE-WIRELESS-MIB:
$(MIBDIR)/.dell:
$(eval TMP := $(shell mktemp))
@echo ">> Downloading dell to $(TMP)"
@curl $(CURL_OPTS) -H "User-Agent: snmp_exporter" -o $(TMP) $(DELL_URL)
@curl $(CURL_OPTS) $(CURL_USER_AGENT) -o $(TMP) $(DELL_URL)
@unzip -j -d $(MIBDIR) $(TMP) support/station/mibs/iDRAC-*.mib
@rm -v $(TMP)
@touch $(MIBDIR)/.dell
Expand Down Expand Up @@ -263,15 +264,15 @@ $(MIBDIR)/.net-snmp:

$(MIBDIR)/PICO-IPSEC-FLOW-MONITOR-MIB.txt:
@echo ">> Downloading PICO-IPSEC-FLOW-MONITOR-MIB.txt"
@curl $(CURL_OPTS) -o $(MIBDIR)/PICO-IPSEC-FLOW-MONITOR-MIB.txt "$(NEC_URL)/PICO-IPSEC-FLOW-MONITOR-MIB.txt"
@curl $(CURL_OPTS) $(CURL_USER_AGENT) -o $(MIBDIR)/PICO-IPSEC-FLOW-MONITOR-MIB.txt "$(NEC_URL)/PICO-IPSEC-FLOW-MONITOR-MIB.txt"

$(MIBDIR)/PICO-SMI-MIB.txt:
@echo ">> Downloading PICO-SMI-MIB.txt"
@curl $(CURL_OPTS) -o $(MIBDIR)/PICO-SMI-MIB.txt "$(NEC_URL)/PICO-SMI-MIB.txt"
@curl $(CURL_OPTS) $(CURL_USER_AGENT) -o $(MIBDIR)/PICO-SMI-MIB.txt "$(NEC_URL)/PICO-SMI-MIB.txt"

$(MIBDIR)/PICO-SMI-ID-MIB.txt:
@echo ">> Downloading PICO-SMI-ID-MIB.txt"
@curl $(CURL_OPTS) -o $(MIBDIR)/PICO-SMI-ID-MIB.txt "$(NEC_URL)/PICO-SMI-ID-MIB.txt"
@curl $(CURL_OPTS) $(CURL_USER_AGENT) -o $(MIBDIR)/PICO-SMI-ID-MIB.txt "$(NEC_URL)/PICO-SMI-ID-MIB.txt"

$(MIBDIR)/.paloalto_panos:
$(eval TMP := $(shell mktemp))
Expand Down