ClusterLabs / ha_cluster_exporter

Prometheus exporter for Pacemaker based Linux HA clusters
Apache License 2.0
79 stars 35 forks source link

wrong default web-config file #239

Closed sadon closed 6 months ago

sadon commented 10 months ago

I got wrong responce trying to use default config file

caller=ha_cluster_exporter.go:359 level=error msg="Error starting HTTP server" err="yaml: unmarshal errors:\n line 2: field web not found in type web.Config\n line 7: field log not found

default config

# cat /etc/ha_cluster_exporter.web.yaml
# sample config
web:
  listen-address: "0.0.0.0:9664"
  telemetry-path: "/metrics"
  config:
    file: "/etc/ha_cluster_exporter.web.yaml"
log:
  level: "info"
  format: "logfmt"
crm-mon-path: "/usr/sbin/crm_mon"
cibadmin-path: "/usr/sbin/cibadmin"
corosync-cfgtoolpath-path: "/usr/sbin/corosync-cfgtool"
corosync-quorumtool-path: "/usr/sbin/corosync-quorumtool"
sbd-path: "/usr/sbin/sbd"
sbd-config-path: "/etc/sysconfig/sbd"
drbdsetup-path: "/sbin/drbdsetup"
stefanotorresi commented 6 months ago

The "web" configuration is a different file altogether, it's separate from the exporter main configuration file, and it's completely optional. What you are showing should be /etc/ha_cluster_exporter.yaml, while /etc/ha_cluster_exporter.web.yaml (in case you need to customize the web options) should follow this example.