Replies: 6 comments 3 replies
-
More details: Feb 7 12:15:10 nfs-server-2 systemd: Started Prometheus exporter for Pacemaker HA clusters metrics. Feb 7 12:15:10 nfs-server-2 ha_cluster_exporter: time="2021-02-07T12:15:10Z" level=warning msg="Config File "ha_cluster_exporter" Not Foun Feb 7 12:15:10 nfs-server-2 ha_cluster_exporter: time="2021-02-07T12:15:10Z" level=info msg="Default config values will be used" Feb 7 12:15:10 nfs-server-2 ha_cluster_exporter: time="2021-02-07T12:15:10Z" level=warning msg="Registration failure: could not initialize ' Feb 7 12:15:10 nfs-server-2 ha_cluster_exporter: time="2021-02-07T12:15:10Z" level=info msg="'pacemaker' collector registered." Feb 7 12:15:10 nfs-server-2 ha_cluster_exporter: time="2021-02-07T12:15:10Z" level=info msg="'corosync' collector registered." Feb 7 12:15:10 nfs-server-2 ha_cluster_exporter: time="2021-02-07T12:15:10Z" level=info msg="'sbd' collector registered." Feb 7 12:15:10 nfs-server-2 ha_cluster_exporter: time="2021-02-07T12:15:10Z" level=info msg="Serving metrics on 0.0.0.0:9664" |
Beta Was this translation helpful? Give feedback.
-
Hi @pvaldria, Systemd and other OS related metrics are provided by the Prometheus Node_exporter. Do you have it running on your system too? The ha_cluster_exporter is specialized to provide Clusterlabs components metrics. |
Beta Was this translation helpful? Give feedback.
-
yes, I have the node_exporter service running on all nodes and on the Grafana/Prometheus server, I have the following: The last job below ( - job_name: 'nfs-ha-cluster') I added for displaying HA details and I mentioned both port 9664 and port 9100. ` alerting:
rule_files: scrape_configs:
|
Beta Was this translation helpful? Give feedback.
-
@pvaldria another check: Did you enable systemd collector on your node_exporter configuration? It comes disabled by default. https://github.com/prometheus/node_exporter#disabled-by-default |
Beta Was this translation helpful? Give feedback.
-
Thanks Diego. That helps. I made the below change - /opt/node_exporter-1.0.1.linux-amd64/node_exporter --collector.systemd and it works. But I see duplicate lines in the output. (screenshot attached) - There are 2 pacemaker on nfs-server-1 and nfs-server-2. Similarly for other services. |
Beta Was this translation helpful? Give feedback.
-
Grafana is new for me, appreciate your patience while helping me. I have 2 dashboards -
job_name "nfs-ha-cluster"
So are you saying I should completely remove the below , if yes, will Dashboard #1 still work ?
|
Beta Was this translation helpful? Give feedback.
-
Node atttributes and Systemd units data not showing up in Grafana. Please see attached screenshot. Is it a known issue ?
I have a pacemaker/corosync NFS HA cluster (active/passive) with shared disk and using SBD fencing agent.
I had to add the below to /etc/prometheus/prometheus.yml
`
scrape_interval: 5s
static_configs:
- targets: ['nfs-server-1.storage.nfs.oraclevcn.com:9664', 'nfs-server-2.storage.nfs.oraclevcn.com:9664', 'qdevice.storage.nfs.oraclevcn.com:9664', 'nfs-server-1.storage.nfs.oraclevcn.com:9100', 'nfs-server-2.storage.nfs.oraclevcn.com:9100', 'qdevice.storage.nfs.oraclevcn.com:9100']
labels:
group: 'nfs-ha'
`
I installed ha_cluster_exporter using the steps below.
`
yum install -y -q git
curl -O https://objectstorage.us-ashburn-1.oraclecloud.com/xxxxxxxxxxxxxxx/go1.15.8.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.15.8.linux-amd64.tar.gz
echo '
export GOROOT="/usr/local/go"
export GOBIN="$HOME/go/bin"
mkdir -p $GOBIN
export PATH=$PATH:$GOROOT/bin:$GOBIN
' >> .bashrc
source ~/.bashrc
go version
go get github.com/golang/mock/mockgen
git clone https://github.com/ClusterLabs/ha_cluster_exporter
cd ha_cluster_exporter
make
make install
cat > /lib/systemd/system/ha_cluster_exporter.service << EOF
[Unit]
Description=Prometheus exporter for Pacemaker HA clusters metrics
After=network.target
[Service]
Type=simple
Restart=always
ExecStart=/root/go/bin/ha_cluster_exporter
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
EOF
systemctl start ha_cluster_exporter
`
Beta Was this translation helpful? Give feedback.
All reactions