munin wg peers
							parent
							
								
									98b46e45eb
								
							
						
					
					
						commit
						4f2e1d7b8d
					
				@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					[wg_peers_*]
 | 
				
			||||||
 | 
					user root
 | 
				
			||||||
 | 
					group root
 | 
				
			||||||
@ -0,0 +1,54 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					# -*- sh -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					: << =cut
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					=head1 NAME
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wg_peers_ - Plugin to monitor wg peers
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					=head1 CONFIGURATION
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Set user and group to have access
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    [wg_peers_*]
 | 
				
			||||||
 | 
					    user root
 | 
				
			||||||
 | 
					    group root
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					=head1 USAGE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Link this plugin to /etc/munin/plugins/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					After creating the links, restart munin-node. Don't forget to configure the plugin!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					=head1 AUTHORS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Niklas Yann Wettengel <niyawe@niyawe.de>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					=head1 LICENSE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GPLv2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					=head1 MAGIC MARKERS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 #%# family=manual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					=cut
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. "$MUNIN_LIBDIR/plugins/plugin.sh"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					myname=$(basename "$0" | sed 's/^wg_peers_//g')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "$1" = "config" ]; then
 | 
				
			||||||
 | 
						echo "graph_title wg${myname} peers"
 | 
				
			||||||
 | 
						echo "graph_info This graph shows the wg peers on this supernode"
 | 
				
			||||||
 | 
						echo "graph_args -l 0"
 | 
				
			||||||
 | 
						echo "graph_scale no"
 | 
				
			||||||
 | 
						echo "graph_vlabel peers count"
 | 
				
			||||||
 | 
						echo "graph_category wireguard"
 | 
				
			||||||
 | 
						echo "peers.label peers"
 | 
				
			||||||
 | 
						echo "peers.draw AREA"
 | 
				
			||||||
 | 
						exit 0
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "peers.value $(wg show wg${myname} peers | wc -l)"
 | 
				
			||||||
					Loading…
					
					
				
		Reference in New Issue