Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niasar/corosync-telegraf-input
Telegraf input plugin for monitoring Corosync cluster node status
https://github.com/niasar/corosync-telegraf-input
corosync influxdb proxmox telegraf
Last synced: 5 days ago
JSON representation
Telegraf input plugin for monitoring Corosync cluster node status
- Host: GitHub
- URL: https://github.com/niasar/corosync-telegraf-input
- Owner: niasar
- License: gpl-3.0
- Created: 2024-03-09T20:59:36.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-03-13T16:11:10.000Z (8 months ago)
- Last Synced: 2024-06-21T08:06:09.739Z (5 months ago)
- Topics: corosync, influxdb, proxmox, telegraf
- Language: Go
- Homepage:
- Size: 84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegraf corosync external plugin
This plugins monitors corosync cluster node status.
### Requirements
This plugin only works witch corosync versions >=3
### Building
Building require go version >=1.22
`go build -o corosync-plugin ./cmd/main.go`
### Usage
Create configuration file for plugin
```toml
[[inputs.corosync]]
## Set to false if you running telegraf as root
# use_sudo = true```
If you running telegraf as non-root, then you need to add sudoers rules for its user to allow execution of corosync-quorumtool and corosync-cfgtool:
```
Cmnd_Alias QUORUMTOOL = /usr/sbin/corosync-quorumtool
Cmnd_Alias CFGTOOL = /usr/sbin/corosync-cfgtooltelegraf ALL=(ALL) NOPASSWD: QUORUMTOOL, CFGTOOL
Defaults!CFGTOOL, QORUMTOOL !syslog, !pam_session, !logfile
```
Add execd input for telegraf
```toml
[[inputs.execd]]
command = ["/path/to/plugin/binary", "-config", "/path/to/plugin/config"]
signal = "none"
```### Collected data
corosync_quorum:
* Fields:
* Ring ID (string)
* Total nodes (uint)
* Total votes (uint)
* Expected votes (uint)
* Highest expected (uint)
* Quorum (uint)
* Quorate flag (bool)
* Tags:
* Node IDcorosync_rings:
* Fields:
* Active count (uint)
* Connected count (uint)
* Enabled count (uint)
* Unknown count (uint)
* Undefined count (any other status) (uint)
* Tags:
* Ring ID### Sample output
```
corosync_quorum,node_id=2 total_nodes=5i,ring_id="1.2a8",total_votes=5i,expected_votes=5i,highest_expected=5i,quorum=3i,is_quorate=true 1710019927989283282
corosync_rings,ring_id=0 active=4i,connected=0i,enabled=0i,unknown=0i,undefined=0i,total=4i 1710019927989294042
```