blackbox_exporter
blackbox_exporter copied to clipboard
msg="Error loading config" err="error parsing config file: yaml: unmarshal errors:\n line 6: field vaild_http_versions not found in type config.plain\n line 7: field vaild_status_codes not found in type config.plain"
this is my deployment.yaml
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: blackbox-exporter
namespace: kube-system
labels:
app: blackbox-exporter
annotations:
deployment.kubernetes.io/revision: 1
spec:
replicas: 1
selector:
matchLabels:
app: blackbox-exporter
template:
metadata:
labels:
app: blackbox-exporter
spec:
volumes:
- name: config
configMap:
name: blackbox-exporter
defaultMode: 420
containers:
- name: blackbox-exporter
image: harbor.od.com/public/blackbox-exporter:v0.15.1
imagePullPolicy: IfNotPresent
args:
- --config.file=/etc/blackbox-exporter/blackbox.yml
- --log.level=info
- --web.listen-address=:9115
ports:
- name: blackbox-port
containerPort: 9115
protocol: TCP
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 100m
memory: 50Mi
volumeMounts:
- name: config
mountPath: /etc/blackbox_exporter
readinessProbe:
tcpSocket:
port: 9115
initialDelaySeconds: 5
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 3
this is status CrashLoopBackOff
[root@hdss7-21 ~]# kubectl get pod -n kube-system
NAME READY STATUS RESTARTS AGE
blackbox-exporter-79d6977f8d-q25cs 0/1 CrashLoopBackOff 1 10s
this is my log
[root@hdss7-21 ~]# kubectl logs -f blackbox-exporter-79d6977f8d-q25cs -n kube-system
level=info ts=2021-02-12T02:35:45.352Z caller=main.go:212 msg="Starting blackbox_exporter" version="(version=0.15.1, branch=HEAD, revision=7dd86a593b5a2270e738be1654d9c112509e46ce)"
level=info ts=2021-02-12T02:35:45.353Z caller=main.go:213 msg="Build context" (gogo1.13,userroot@626ba8fd110c,date20190917-12:31:25)=(MISSING)
level=error ts=2021-02-12T02:35:45.354Z caller=main.go:216 msg="Error loading config" err="error parsing config file: yaml: unmarshal errors:\n line 6: field vaild_http_versions not found in type config.plain\n line 7: field vaild_status_codes not found in type config.plain"
[root@hdss7-21 ~]#
What does the configuration file look like?
The blackbox_exporter binary can validate the config passing --config.file=path
and --config.check
on the command line.
please see https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md to learn more about available config options.
This error is occurring after cloning the repo and following the basic directions on running from docker. If other things are needed to run this correctly ( still not sure what this error is complaining about ), it should be added to the readme.
For questions/help/support please use our community channels. There are more people available to potentially respond to your request and the whole community can benefit from the answers provided.
@elliottb303 Where you able to resolve it? I'm facing the similar issue after cloning the repo and running make docker-generate
:
"Error generating config netsnmp" err="error parsing yml config: yaml: unmarshal errors:\n line 3: field version not found in type main.Config\n line 5: field auths not found in type main.Config"
@doing-cr7 I you have not provided the "valid_http_versions" value in your config, for reference can you check this: Note: do mind the indentations here, can't put it with proper ones here :)
http_200: prober: "http" timeout: 5s http: preferred_ip_protocol: "ip4" fail_if_ssl: true no_follow_redirects: true valid_status_codes: [200] valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
also @antonprokopovich can you check this configs, you might be missing something from here: https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md#:~:text=the%20configured%20credentials.-,authorization,-%3A%0A%20%20%20%20%23%20Sets