mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
This commit is contained in:
commit
616bbd931e
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,4 @@
|
||||
.*.swp
|
||||
*~
|
||||
|
||||
__pycache__/
|
||||
|
25
.travis.yml
25
.travis.yml
@ -1,17 +1,24 @@
|
||||
---
|
||||
language: perl
|
||||
dist: trusty
|
||||
install:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get --no-install-recommends install devscripts python python3 ruby php5-cli gawk ksh pylint
|
||||
- sudo apt-get --no-install-recommends install devscripts python python3 ruby php5-cli gawk ksh zsh pylint shellcheck
|
||||
- sudo apt-get --no-install-recommends install pkg-config libdb-dev libvirt-dev libexpat-dev
|
||||
# - Munin/Plugin.pm is in "munin-node" on precise
|
||||
- sudo apt-get --no-install-recommends install munin-node
|
||||
- sudo apt-get --no-install-recommends install libsys-virt-perl
|
||||
|
||||
# we use locally installed cpan modules instead of travis' builtin 'homebrew' perl support
|
||||
# The homebrew variation does not work for us, since:
|
||||
# * it is built without threading
|
||||
# * the 'libvirt' plugin requires Sys::Virt, which is not available via cpan anymore - thus we need to install the Debian package 'libsys-virt-perl', which was built with threading
|
||||
- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
|
||||
|
||||
# Modules used by test script
|
||||
- cpanm --notest Capture::Tiny
|
||||
- cpanm --notest File::Find
|
||||
- cpanm --notest Test::More
|
||||
#
|
||||
|
||||
# Modules used by plugins
|
||||
- cpanm --notest Asterisk::AMI
|
||||
- cpanm --notest BerkeleyDB
|
||||
@ -24,7 +31,6 @@ install:
|
||||
- cpanm --notest Device::SerialPort
|
||||
- cpanm --notest FCGI::Client
|
||||
- cpanm --notest File::ReadBackwards
|
||||
- cpanm --notest File::Tail::Multi
|
||||
- cpanm --notest Graphics::ColorObject
|
||||
- cpanm --notest IPC::Run3
|
||||
- cpanm --notest IPC::ShareLite
|
||||
@ -43,18 +49,21 @@ install:
|
||||
- cpanm --notest POE::Quickie
|
||||
- cpanm --notest Proc::ProcessTable
|
||||
- cpanm --notest Redis
|
||||
- cpanm --notest WWW::Mechanize::TreeBuilder
|
||||
- cpanm --notest Switch
|
||||
- cpanm --notest Text::Iconv
|
||||
- cpanm --notest WWW::Mechanize::TreeBuilder
|
||||
- cpanm --notest YAML
|
||||
- cpanm --notest XML::LibXML
|
||||
- cpanm --notest XML::Simple
|
||||
- cpanm --notest XML::Smart
|
||||
- cpanm --notest XML::Twig
|
||||
- cpanm --notest nvidia::ml
|
||||
# - Sys::Virt version matching the test system's libvirt-dev
|
||||
- cpanm --notest DANBERR/Sys-Virt-0.9.8.tar.gz
|
||||
- cpanm --notest experimental
|
||||
# Modules used by plugins, but missing on cpan
|
||||
# - File::Tail::Multi
|
||||
# - Sun::Solaris::Kstat
|
||||
# - VMware::VIRuntime
|
||||
# - MythTV
|
||||
script: "PERL5LIB=$PERL5LIB:/usr/share/perl5 prove"
|
||||
|
||||
script:
|
||||
- prove
|
||||
|
@ -4,10 +4,13 @@ This is the repository for all user contributed stuff
|
||||
|
||||
**This is usually where you want to begin your journey.**
|
||||
|
||||
Here you'll find all the plugins coming from http://exchange.munin-monitoring.org/.
|
||||
That web site is for the time being disabled, new updates are done here.
|
||||
Here you find a plethora of plugins for the most diverse topics. Please take a look and
|
||||
improve existing or propose new plugins.
|
||||
|
||||
Please read the [hints for plugin contributions](./plugins#contributed-munin-plugins).
|
||||
|
||||
See the [gallery](http://gallery.munin-monitoring.org/) for a browsable overview of these plugins.
|
||||
|
||||
If a dedicated website comes back alive, its plugin backend will be this git repo.
|
||||
|
||||
# contrib/templates/ - 3rd-party templates
|
||||
|
||||
|
@ -66,7 +66,7 @@ graph_args --base 1000 -l 0
|
||||
#graph_vlabel number of sessions in (-) / out (+)
|
||||
graph_vlabel number of sessions
|
||||
graph_scale no
|
||||
graph_category 2wire
|
||||
graph_category network
|
||||
graph_total Total
|
||||
graph_printf %.0lf
|
||||
|
||||
@ -84,7 +84,7 @@ graph_title 2wire NAT session type
|
||||
graph_args --base 1000 -l 0
|
||||
graph_vlabel number of sessions
|
||||
graph_scale no
|
||||
graph_category 2wire
|
||||
graph_category network
|
||||
graph_total Total
|
||||
graph_printf %.0lf
|
||||
|
||||
@ -99,7 +99,7 @@ graph_title 2wire session uptime
|
||||
graph_args --base 1000 -l 0
|
||||
graph_vlabel Uptime in days
|
||||
graph_scale no
|
||||
graph_category 2wire
|
||||
graph_category network
|
||||
|
||||
sessionUptime.label Uptime
|
||||
sessionUptime.draw AREA
|
||||
@ -112,7 +112,7 @@ graph_title 2wire DSL output power
|
||||
graph_args --base 1000
|
||||
graph_vlabel dBmV
|
||||
graph_scale no
|
||||
graph_category 2wire
|
||||
graph_category network
|
||||
|
||||
powerDown.label Down
|
||||
#powerDown.graph no
|
||||
@ -124,7 +124,7 @@ graph_title 2wire DSL details
|
||||
graph_args --base 1000
|
||||
graph_vlabel dB
|
||||
graph_scale no
|
||||
graph_category 2wire
|
||||
graph_category network
|
||||
|
||||
noiseM.label Noise margin
|
||||
attenuation.label Attenuation
|
||||
@ -136,7 +136,7 @@ graph_title 2wire Errors Time
|
||||
graph_args --base 1000
|
||||
graph_vlabel s
|
||||
graph_scale no
|
||||
graph_category 2wire
|
||||
graph_category network
|
||||
|
||||
cumSecErrors.label Cumulative Seconds w/Errors
|
||||
cumSecSevErrors.label Cumulative Seconds w/Severe Errors
|
||||
@ -147,7 +147,7 @@ graph_title 2wire Block Correction
|
||||
graph_args --base 1000
|
||||
graph_vlabel blocks/s
|
||||
graph_scale no
|
||||
graph_category 2wire
|
||||
graph_category network
|
||||
|
||||
correctedBlocks.label Corrected Blocks
|
||||
correctedBlocks.type DERIVE
|
||||
@ -160,7 +160,7 @@ multigraph 2wire_dsl_traffic
|
||||
graph_title 2wire DSL traffic
|
||||
graph_args --base 1024 -l 0
|
||||
graph_vlabel Bytes in (-) / out (+) per second
|
||||
graph_category 2wire
|
||||
graph_category network
|
||||
receive.label Bps
|
||||
receive.type DERIVE
|
||||
receive.min 0
|
||||
@ -176,7 +176,7 @@ multigraph 2wire_dsl_bandwidth_monthly
|
||||
graph_title 2wire DSL bandwidth usage (monthly)
|
||||
graph_args --base 1024 -l 0 -M
|
||||
graph_vlabel Bytes
|
||||
graph_category 2wire
|
||||
graph_category network
|
||||
|
||||
down.label Down
|
||||
up.label Up
|
||||
@ -192,7 +192,7 @@ multigraph 2wire_dsl_bandwidth_weekly
|
||||
graph_title 2wire DSL bandwidth usage (weekly)
|
||||
graph_args --base 1024 -l 0 -M
|
||||
graph_vlabel Bytes
|
||||
graph_category 2wire
|
||||
graph_category network
|
||||
|
||||
down.label Down
|
||||
up.label Up
|
||||
@ -208,7 +208,7 @@ multigraph 2wire_dsl_bandwidth_daily
|
||||
graph_title 2wire DSL bandwidth usage (daily)
|
||||
graph_args --base 1024 -l 0 -M
|
||||
graph_vlabel Bytes
|
||||
graph_category 2wire
|
||||
graph_category network
|
||||
|
||||
down.label Down
|
||||
up.label Up
|
54
plugins/README.md
Normal file
54
plugins/README.md
Normal file
@ -0,0 +1,54 @@
|
||||
# Contributed Munin Plugins
|
||||
|
||||
This plethora of plugins covering various topics was contributed by many different users of [munin](http://munin-monitoring.org).
|
||||
|
||||
See the [gallery](http://gallery.munin-monitoring.org/) for a browsable overview of these plugins.
|
||||
|
||||
|
||||
## Purpose of this repository
|
||||
|
||||
This repository of contributed plugin strives to achieve the following goals:
|
||||
|
||||
* allow users to find interesting plugins
|
||||
* allow contributors to publish their plugins
|
||||
* simplify cooperative maintenance of plugins
|
||||
|
||||
Contributed plugins are maintained primarily by their authors.
|
||||
You may file bug reports for plugin issue here in this repository (`munin-contrib`), but please do not forget to notify the author the plugin, as well.
|
||||
|
||||
Please note, that this repository is not supposed to be a dumping site for random plugins of low quality. The related infrastructure (e.g the [gallery](http://gallery.munin-monitoring.org/) or automated tests) require a certain level of quality. Please see below for details.
|
||||
|
||||
|
||||
## Submit a new plugin
|
||||
|
||||
1. check if a similar plugin exists and if it can be extended/changed instead of adding a new plugin
|
||||
* please avoid code copies - they are a maintenance burden
|
||||
2. add [documentation](http://guide.munin-monitoring.org/en/latest/develop/documenting.html#plugin-documentation) including configuration, author, license and [magic markers](http://guide.munin-monitoring.org/en/latest/architecture/syntax.html#magic-markers)
|
||||
3. pick a suitable [category](http://guide.munin-monitoring.org/en/latest/reference/graph-category.html)
|
||||
5. use style check tools for the language of the plugin (e.g. `shellcheck` for shell and `flake8` for Python)
|
||||
6. pick a suitable [name and location](#Plugin_name_and_location)
|
||||
7. bonus:
|
||||
* use the [multigraph approach](http://guide.munin-monitoring.org/en/latest/plugin/multigraphing.html#plugin-multigraphing) for non-trivial plugins
|
||||
* add [example graphs](http://munin-monitoring.org/wiki/PluginGallery#Rulesforplugincontributors) for the [gallery](http://gallery.munin-monitoring.org/)
|
||||
* support [dirtyconfig](http://guide.munin-monitoring.org/en/latest/plugin/protocol-dirtyconfig.html#plugin-protocol-dirtyconfig) if it is suitable
|
||||
8. open a [pull request](https://github.com/munin-monitoring/contrib/pull/) with your new plugin or send it attached to an email to the [mailing list](https://lists.sourceforge.net/lists/listinfo/munin-users)
|
||||
|
||||
See the [plugin development documentation](http://guide.munin-monitoring.org/en/latest/develop/plugins/index.html) for more details.
|
||||
|
||||
|
||||
## Modify an existing plugin
|
||||
|
||||
* *try* to keep the plugin backwards compatible (e.g. keep data fieldnames unchanged)
|
||||
* improvements of code quality and features can justify incompatible changes of existing plugins
|
||||
* bonus:
|
||||
* improve the existing plugins according to the [wishlist for new plugins](#Submit_a_new_plugin)
|
||||
* upgrades from simple plugins to a [multigraph plugin](http://guide.munin-monitoring.org/en/latest/plugin/multigraphing.html#plugin-multigraphing) are welcome
|
||||
|
||||
|
||||
## Plugin name and location
|
||||
|
||||
The following descriptions are *intentions* - they do not necessarily describe the current state for all plugins. Please open a [pull request](https://github.com/munin-monitoring/contrib/pull/) if you want to align the current structure along the goals outlined below:
|
||||
|
||||
* the top level directory should describe a related *software* or *vendor*
|
||||
* use *concepts* or *platforms* only if it is really necessary (e.g. *cpu*, *bsd*, *memory*)
|
||||
* subdirectories are usually not required
|
26
plugins/network/accounting_ → plugins/accounting/accounting_
Normal file → Executable file
26
plugins/network/accounting_ → plugins/accounting/accounting_
Normal file → Executable file
@ -115,7 +115,7 @@ fi
|
||||
|
||||
if [ "$1" == "autoconf" ]; then
|
||||
if [ -r /proc/net/dev ]; then
|
||||
$IPTABLES -L INPUT -v -n -x >/dev/null 2>/dev/null
|
||||
$IPTABLES -L INPUT -v -n -x -w >/dev/null 2>/dev/null
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "no (could not run iptables as user `whoami`)"
|
||||
exit 1
|
||||
@ -132,11 +132,11 @@ fi
|
||||
if [ "$1" = "suggest" ]; then
|
||||
|
||||
if [ $PROTO = "ipv4" ]; then
|
||||
$IPTABLES -L INPUT -v -x -n 2>/dev/null | sed -n 's/^.*\/\* ACCT\-\([a-zA-Z\-]*\) \*\/.*$/\ipv4_\1/p'
|
||||
$IPTABLES -L OUTPUT -v -x -n 2>/dev/null | sed -n 's/^.*\/\* ACCT\-\([a-zA-Z\-]*\) \*\/.*$/\ipv4_\1/p'
|
||||
$IPTABLES -L INPUT -v -x -n -w 2>/dev/null | sed -n 's/^.*\/\* ACCT\-\([a-zA-Z\-]*\) \*\/.*$/\ipv4_\1/p'
|
||||
$IPTABLES -L OUTPUT -v -x -n -w 2>/dev/null | sed -n 's/^.*\/\* ACCT\-\([a-zA-Z\-]*\) \*\/.*$/\ipv4_\1/p'
|
||||
elif [ $PROTO == "ipv6" ]; then
|
||||
$IPTABLES -L INPUT -v -x -n 2>/dev/null | sed -n 's/^.*\/\* ACCT\-\([a-zA-Z\-]*\) \*\/.*$/\ipv6_\1/p'
|
||||
$IPTABLES -L OUTPUT -v -x -n 2>/dev/null | sed -n 's/^.*\/\* ACCT\-\([a-zA-Z\-]*\) \*\/.*$/\ipv6_\1/p'
|
||||
$IPTABLES -L INPUT -v -x -n -w 2>/dev/null | sed -n 's/^.*\/\* ACCT\-\([a-zA-Z\-]*\) \*\/.*$/\ipv6_\1/p'
|
||||
$IPTABLES -L OUTPUT -v -x -n -w 2>/dev/null | sed -n 's/^.*\/\* ACCT\-\([a-zA-Z\-]*\) \*\/.*$/\ipv6_\1/p'
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@ -150,7 +150,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_args --base 1024 -l 0'
|
||||
echo 'graph_vlabel bytes per ${graph_period}'
|
||||
echo 'graph_order tcpIN udpIN icmpIN'
|
||||
echo 'graph_category accounting'
|
||||
echo 'graph_category network'
|
||||
echo 'tcpIN.label tcp received'
|
||||
echo 'tcpIN.cdef tcpIN,8,*'
|
||||
echo 'tcpIN.type DERIVE'
|
||||
@ -172,7 +172,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_args --base 1024 -l 0'
|
||||
echo 'graph_vlabel bytes per ${graph_period}'
|
||||
echo 'graph_order tcpOUT udpOUT icmpOUT'
|
||||
echo 'graph_category accounting'
|
||||
echo 'graph_category network'
|
||||
echo 'tcpOUT.label tcp sent'
|
||||
echo 'tcpOUT.cdef tcpOUT,8,*'
|
||||
echo 'tcpOUT.type DERIVE'
|
||||
@ -192,12 +192,12 @@ if [ "$1" = "config" ]; then
|
||||
fi;
|
||||
|
||||
echo 'multigraph '${0##*/}'_in'
|
||||
$IPTABLES -L INPUT -v -n -x | grep "\/\* ACCT\-"$SUBCHAIN"\-tcp\-in \*\/" | tr -s '*' '-' | awk "{ print \"tcpIN.value \" \$2 }"
|
||||
$IPTABLES -L INPUT -v -n -x | grep "\/\* ACCT\-"$SUBCHAIN"\-udp\-in \*\/" | tr -s '*' '-' | awk "{ print \"udpIN.value \" \$2 }"
|
||||
$IPTABLES -L INPUT -v -n -x | grep "\/\* ACCT\-"$SUBCHAIN"\-icmp\-in \*\/" | tr -s '*' '-' | awk "{ print \"icmpIN.value \" \$2 }"
|
||||
$IPTABLES -L INPUT -v -n -x -w | grep "\/\* ACCT\-"$SUBCHAIN"\-tcp\-in \*\/" | tr -s '*' '-' | awk "{ print \"tcpIN.value \" \$2 }"
|
||||
$IPTABLES -L INPUT -v -n -x -w | grep "\/\* ACCT\-"$SUBCHAIN"\-udp\-in \*\/" | tr -s '*' '-' | awk "{ print \"udpIN.value \" \$2 }"
|
||||
$IPTABLES -L INPUT -v -n -x -w | grep "\/\* ACCT\-"$SUBCHAIN"\-icmp\-in \*\/" | tr -s '*' '-' | awk "{ print \"icmpIN.value \" \$2 }"
|
||||
echo
|
||||
echo 'multigraph '${0##*/}'_out'
|
||||
$IPTABLES -L OUTPUT -v -n -x | grep "\/\* ACCT\-"$SUBCHAIN"\-tcp\-out \*\/" | tr -s '*' '-' | awk "{ print \"tcpOUT.value \" \$2 }"
|
||||
$IPTABLES -L OUTPUT -v -n -x | grep "\/\* ACCT\-"$SUBCHAIN"\-udp\-out \*\/" | tr -s '*' '-' | awk "{ print \"udpOUT.value \" \$2 }"
|
||||
$IPTABLES -L OUTPUT -v -n -x | grep "\/\* ACCT\-"$SUBCHAIN"\-icmp\-out \*\/" | tr -s '*' '-' | awk "{ print \"icmpOUT.value \" \$2 }"
|
||||
$IPTABLES -L OUTPUT -v -n -x -w | grep "\/\* ACCT\-"$SUBCHAIN"\-tcp\-out \*\/" | tr -s '*' '-' | awk "{ print \"tcpOUT.value \" \$2 }"
|
||||
$IPTABLES -L OUTPUT -v -n -x -w | grep "\/\* ACCT\-"$SUBCHAIN"\-udp\-out \*\/" | tr -s '*' '-' | awk "{ print \"udpOUT.value \" \$2 }"
|
||||
$IPTABLES -L OUTPUT -v -n -x -w | grep "\/\* ACCT\-"$SUBCHAIN"\-icmp\-out \*\/" | tr -s '*' '-' | awk "{ print \"icmpOUT.value \" \$2 }"
|
||||
|
@ -18,7 +18,6 @@
|
||||
#
|
||||
# Config variables:
|
||||
# AMAVIS_LOG - file where amavis logs are written
|
||||
# STATEFILE - file which is needed to keep track of AMAVIS_LOG
|
||||
# LOGTAIL - location of logtail
|
||||
# BC - location of bc
|
||||
#
|
||||
@ -27,7 +26,7 @@
|
||||
#
|
||||
|
||||
AMAVIS_LOG=${logfile:-/var/log/mail.log}
|
||||
STATEFILE=/var/lib/munin/plugin-state/amavis.offset
|
||||
STATEFILE=$MUNIN_PLUGSTATE/amavis.offset
|
||||
LOGTAIL=${logtail:-`which logtail`}
|
||||
BC=${bc:-`which bc`}
|
||||
|
||||
@ -47,7 +46,7 @@ fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title Amavis filter statistics'
|
||||
echo 'graph_category postfix'
|
||||
echo 'graph_category antivirus'
|
||||
echo 'graph_order total clean spam virus other'
|
||||
echo 'graph_vlabel Mails filtered'
|
||||
echo 'graph_scale no'
|
@ -69,7 +69,7 @@ if ($ARGV[0] and $ARGV[0] eq "config") {
|
||||
if ($stats_type eq "cache") {
|
||||
print "graph_title Amavis cache hit / miss ratio\n";
|
||||
print "graph_args --lower-limit 0 --upper-limit 100 --rigid\n";
|
||||
print "graph_category mail\n";
|
||||
print "graph_category antivirus\n";
|
||||
print "graph_info The ratio of cache hits and misses for AMaViSd-new.\n";
|
||||
print "graph_order hits misses\n";
|
||||
print "graph_scale no\n";
|
||||
@ -84,7 +84,7 @@ if ($ARGV[0] and $ARGV[0] eq "config") {
|
||||
print "misses.min 0\n";
|
||||
} elsif ($stats_type eq "content") {
|
||||
print "graph_title Amavis scanned mails\n";
|
||||
print "graph_category mail\n";
|
||||
print "graph_category antivirus\n";
|
||||
print "graph_period minute\n";
|
||||
print "graph_vlabel msgs / \${graph_period}\n";
|
||||
foreach my $type (qw(total clean spam spammy virus)) {
|
||||
@ -100,7 +100,7 @@ if ($ARGV[0] and $ARGV[0] eq "config") {
|
||||
} elsif ($stats_type eq "time") {
|
||||
print "graph_title Amavis average scan time\n";
|
||||
print "graph_info Average time spent in each phase of the mail scanning process, per mail.\n";
|
||||
print "graph_category mail\n";
|
||||
print "graph_category antivirus\n";
|
||||
print "graph_vlabel sec / mail\n";
|
||||
print "graph_scale no\n";
|
||||
|
@ -18,7 +18,7 @@
|
||||
LOGDIR=${logdir:-/var/log/amavis}
|
||||
MAIL_LOG=$LOGDIR/${logfile:-amavisd.log}
|
||||
LOGTAIL=${logtail:-`which logtail`}
|
||||
STATEFILE=/var/lib/munin/plugin-state/amavis.offset
|
||||
STATEFILE=$MUNIN_PLUGSTATE/amavis.offset
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if [ -f "${MAIL_LOG}" -a -n "${LOGTAIL}" -a -x "${LOGTAIL}" ] ; then
|
||||
@ -33,7 +33,7 @@ fi
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title Amavis message filtering'
|
||||
|
||||
echo 'graph_category mail'
|
||||
echo 'graph_category antivirus'
|
||||
echo 'graph_vlabel Mails per minute'
|
||||
echo 'graph_args --base 1000 -l 0'
|
||||
|
@ -71,7 +71,7 @@ sub config
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Watt\n";
|
||||
print "graph_total Total\n";
|
||||
print "graph_category AMR\n";
|
||||
print "graph_category sensors\n";
|
||||
|
||||
$count = 0;
|
||||
foreach my $station (sort keys %stations) {
|
||||
@ -92,7 +92,7 @@ sub config
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel kWh\n";
|
||||
print "graph_scale no\n";
|
||||
print "graph_category AMR\n";
|
||||
print "graph_category sensors\n";
|
||||
|
||||
$count = 0;
|
||||
foreach my $station (sort keys %stations) {
|
||||
@ -106,7 +106,7 @@ sub config
|
||||
print "graph_title Known AMR stations\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel stations\n";
|
||||
print "graph_category AMR\n";
|
||||
print "graph_category sensors\n";
|
||||
print "stations.label number of stations\n";
|
||||
|
||||
print "multigraph amr_signals\n";
|
||||
@ -114,7 +114,7 @@ sub config
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel signals / \${graph_period}\n";
|
||||
print "graph_period minute\n";
|
||||
print "graph_category AMR\n";
|
||||
print "graph_category sensors\n";
|
||||
$count = 0;
|
||||
foreach my $station (sort keys %stations) {
|
||||
my $name = clean_fieldname('station signals ' . $station);
|
||||
|
@ -47,7 +47,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_info Plugin available at <a href="http://linux.andreagozzi.com/content/munin_stuff.php">http://linux.andreagozzi.com/content/munin_stuff.php</a>'
|
||||
echo 'graph_args -l 0 --base 1000'
|
||||
echo 'graph_vlabel no of clients'
|
||||
echo 'graph_category amule'
|
||||
echo 'graph_category filetransfer'
|
||||
echo 'queue.label download clients'
|
||||
exit 0
|
||||
fi;
|
||||
|
@ -47,7 +47,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_info Plugin available at <a href="http://linux.andreagozzi.com/content/munin_stuff.php">http://linux.andreagozzi.com/content/munin_stuff.php</a>'
|
||||
echo 'graph_args -l 0 --base 1000'
|
||||
echo 'graph_vlabel no of shares'
|
||||
echo 'graph_category amule'
|
||||
echo 'graph_category filetransfer'
|
||||
echo 'shares.label shared files'
|
||||
echo 'shares.draw AREA'
|
||||
exit 0
|
||||
|
@ -53,7 +53,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'upload.max 50000'
|
||||
echo 'upload.min 0'
|
||||
echo 'graph_vlabel bytes per ${graph_period}'
|
||||
echo 'graph_category amule'
|
||||
echo 'graph_category filetransfer'
|
||||
echo 'upload.label upload speed'
|
||||
echo 'download.label download speed'
|
||||
exit 0
|
||||
|
@ -47,7 +47,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_info Plugin available at <a href="http://linux.andreagozzi.com/content/munin_stuff.php">http://linux.andreagozzi.com/content/munin_stuff.php</a>'
|
||||
echo 'graph_args -l 0 --base 1000'
|
||||
echo 'graph_vlabel uptime in hours'
|
||||
echo 'graph_category amule'
|
||||
echo 'graph_category filetransfer'
|
||||
echo 'uptime.label uptime'
|
||||
echo 'uptime.draw AREA'
|
||||
exit 0
|
||||
|
@ -65,7 +65,7 @@ if (exists $ARGV[0] and $ARGV[0] eq "autoconf") {
|
||||
if (exists $ARGV[0] and $ARGV[0] eq "config") {
|
||||
print "graph_title Apache activity\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_category apache\n";
|
||||
print "graph_category webserver\n";
|
||||
print "graph_vlabel processes\n";
|
||||
foreach my $port (@PORTS) {
|
||||
while (my ($char, $val) = each (%chars)) {
|
||||
|
2
plugins/apache/apache_average_time_last_n_requests
Normal file → Executable file
2
plugins/apache/apache_average_time_last_n_requests
Normal file → Executable file
@ -53,7 +53,7 @@ graph_title Apache average seconds last $LAST_N_REQUESTS requests
|
||||
graph_args --base 1000
|
||||
graph_scale no
|
||||
graph_vlabel Average request time
|
||||
graph_category Apache
|
||||
graph_category webserver
|
||||
graph_info This graph shows average request times for the last $LAST_N_REQUESTS requests
|
||||
CONFIG
|
||||
;
|
||||
|
@ -6,7 +6,7 @@
|
||||
# http://www.ziritione.org
|
||||
#
|
||||
# Installing: configure apache blackbox and set the logfile to /var/log/blackbox.log
|
||||
# or change the BLACKBOXLOG setting bellow.
|
||||
# or change the BLACKBOXLOG setting below.
|
||||
#
|
||||
# Dependencies: apache mod_logio, apache blackbox
|
||||
# http://www.devco.net/archives/2008/03/05/detailed_apache_stats.php
|
||||
@ -64,7 +64,7 @@ sub print_config {
|
||||
print("graph_title HTTP requests status
|
||||
graph_args --base 1000
|
||||
graph_vlabel requests / second
|
||||
graph_category Network
|
||||
graph_category webserver
|
||||
graph_total total\n");
|
||||
|
||||
for my $key (sort { $WANTED{$a} cmp $WANTED{$b} } (keys %WANTED)) {
|
||||
|
@ -16,9 +16,8 @@ Counts the in/out bandwidth used by each projects/vhost. [Logtail] (https://www.
|
||||
## Installation
|
||||
The setup is pretty straight forward. First you need to configure the plugin:
|
||||
|
||||
Define the file which will be used by logtail to identify it's position in the log and the path to logtail:
|
||||
Define the path to logtail:
|
||||
|
||||
$statepath = '/usr/local/var/munin/plugin-state'; # directory where logtail will save the state
|
||||
$logtail = '/usr/local/bin/logtail';
|
||||
|
||||
Multiple logs can be used for the same project/vhost and a regular expression (regex) can be used as a filter:
|
||||
|
4
plugins/apache/apache_byprojects/byprojects_access
Normal file → Executable file
4
plugins/apache/apache_byprojects/byprojects_access
Normal file → Executable file
@ -26,7 +26,7 @@ use strict;
|
||||
|
||||
my $server = 'Apache';
|
||||
|
||||
my $statepath = '/usr/local/var/munin/plugin-state';
|
||||
my $statepath = $ENV{MUNIN_PLUGSTATE};
|
||||
my $logtail = '/usr/local/bin/logtail';
|
||||
|
||||
my %logs = (
|
||||
@ -56,7 +56,7 @@ if(defined($ARGV[0])) {
|
||||
print "graph_title $server access byprojects\n";
|
||||
print "graph_total Total\n";
|
||||
print "graph_vlabel Access by \${graph_period}\n";
|
||||
print "graph_category $server\n";
|
||||
print "graph_category webserver\n";
|
||||
print "graph_info This graph show $server access by various projects.\n";
|
||||
while ((my $project, my @files) = each(%logs)) {
|
||||
print $project.".label $project\n";
|
||||
|
4
plugins/apache/apache_byprojects/byprojects_bandwidth
Normal file → Executable file
4
plugins/apache/apache_byprojects/byprojects_bandwidth
Normal file → Executable file
@ -31,7 +31,7 @@ use strict;
|
||||
|
||||
my $server = 'Apache';
|
||||
|
||||
my $statepath = '/usr/local/var/munin/plugin-state';
|
||||
my $statepath = $ENV{MUNIN_PLUGSTATE};
|
||||
my $logtail = '/usr/local/bin/logtail';
|
||||
|
||||
my %logs = (
|
||||
@ -62,7 +62,7 @@ if(defined($ARGV[0])) {
|
||||
print "graph_title $server total bandwidth byprojects\n";
|
||||
print "graph_total Total\n";
|
||||
print "graph_vlabel Bits\n";
|
||||
print "graph_category $server\n";
|
||||
print "graph_category webserver\n";
|
||||
print "graph_info This graph show $server total bandwidth used by various " .
|
||||
"projects.\n";
|
||||
while ((my $project, my @files) = each(%logs)) {
|
||||
|
4
plugins/apache/apache_byprojects/byprojects_inout_bandwidth
Normal file → Executable file
4
plugins/apache/apache_byprojects/byprojects_inout_bandwidth
Normal file → Executable file
@ -31,7 +31,7 @@ use strict;
|
||||
|
||||
my $server = 'Apache';
|
||||
|
||||
my $statepath = '/usr/local/var/munin/plugin-state';
|
||||
my $statepath = $ENV{MUNIN_PLUGSTATE};
|
||||
my $logtail = '/usr/local/bin/logtail';
|
||||
|
||||
my %logs = (
|
||||
@ -59,7 +59,7 @@ if(defined($ARGV[0])) {
|
||||
print "graph_title $server in/out bandwidth byprojects\n";
|
||||
print "graph_args --base 1000\n";
|
||||
print "graph_vlabel bits per \${graph_period} in (-) / out (+)\n";
|
||||
print "graph_category $server\n";
|
||||
print "graph_category webserver\n";
|
||||
print "graph_info This graph show $server in/out bandwidth used by various" .
|
||||
" projects.\n";
|
||||
while ((my $project, my @files) = each(%logs)) {
|
||||
|
@ -88,7 +88,7 @@ graph_title Apache mod_cache_disk usage
|
||||
graph_title Number of entries in mod_cache_disk Apache cache
|
||||
graph_args --base 1000 -l 0
|
||||
graph_vlabel Y
|
||||
graph_category Apache
|
||||
graph_category webserver
|
||||
graph_order ${fieldnames[*]} total
|
||||
total.draw LINE1
|
||||
total.label all
|
||||
|
@ -46,7 +46,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_args --base 1000 -l 0 '
|
||||
echo 'graph_vlabel Kb'
|
||||
echo 'graph_scale no'
|
||||
echo 'graph_category apache'
|
||||
echo 'graph_category webserver'
|
||||
echo 'graph_info Indicate the memdium size of all the apache child process.'
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_args --base 1000 -l 0 '
|
||||
echo 'graph_vlabel servers'
|
||||
echo 'graph_scale no'
|
||||
echo 'graph_category apache'
|
||||
echo 'graph_category webserver'
|
||||
echo 'graph_info Indicate the number of apache servers running (child process).'
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ if (defined(@ARGV) && ($ARGV[0] eq 'config')) {
|
||||
print "graph_title Apache Smaps\n";
|
||||
print "graph_args --base 1024 -l 0\n";
|
||||
print "graph_vlabel Bytes\n";
|
||||
print "graph_category apache\n";
|
||||
print "graph_category webserver\n";
|
||||
print "graph_info This graph shows memory usage for each given process.\n";
|
||||
|
||||
print "shr_max.label Shared memory max\n";
|
||||
|
@ -171,7 +171,7 @@ multigraph apache_accesses
|
||||
graph_title Apache accesses
|
||||
graph_args --base 1000 -l 0
|
||||
graph_vlabel accesses / \${graph_period}
|
||||
graph_category apache
|
||||
graph_category webserver
|
||||
END
|
||||
|
||||
foreach my $port (@PORTS) {
|
||||
@ -191,7 +191,7 @@ graph_title Apache processes
|
||||
graph_args --base 1000 -l 0
|
||||
graph_vlabel processes
|
||||
graph_total total
|
||||
graph_category apache
|
||||
graph_category webserver
|
||||
END
|
||||
|
||||
print "graph_order ";
|
||||
@ -224,7 +224,7 @@ multigraph apache_volume
|
||||
graph_title Apache volume
|
||||
graph_args --base 1024 -l 0
|
||||
graph_vlabel KiB per \${graph_period}
|
||||
graph_category apache
|
||||
graph_category webserver
|
||||
END
|
||||
|
||||
foreach my $port (@PORTS) {
|
||||
|
@ -42,7 +42,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_args --base 1000 -l 0 '
|
||||
echo 'graph_vlabel Threads'
|
||||
echo 'graph_scale no'
|
||||
echo 'graph_category apache'
|
||||
echo 'graph_category webserver'
|
||||
echo 'graph_info Indicate the memdium number of threads for all child process.'
|
||||
|
||||
|
||||
|
@ -45,7 +45,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_args --base 1000 -l 0 '
|
||||
echo 'graph_vlabel Mb'
|
||||
echo 'graph_scale no'
|
||||
echo 'graph_category apache'
|
||||
echo 'graph_category webserver'
|
||||
echo 'graph_info Indicate the total memory used by apache.'
|
||||
|
||||
echo "servers.label servers"
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
# ####################################################################################### CONFIG
|
||||
|
||||
DIRECTORY=${MUNIN_PLUGINSTATE:-/var/lib/munin/plugin-state/apache_users}
|
||||
DIRECTORY=$MUNIN_PLUGSTATE/apache_users
|
||||
TIMESTAMP=$DIRECTORY/.apache_users
|
||||
ACCESSLOG=/var/log/apache2/access_log
|
||||
|
||||
@ -45,7 +45,7 @@ REGEX=$(LC_ALL=en_US date -d "5 minutes ago" "+\[%d\/%b\/%Y:%H: %M :[0-5][0-9] %
|
||||
# Analyse logfile
|
||||
while read REQUEST_ADDR REQUEST_USERNAME REQUEST_BYTES
|
||||
do
|
||||
# Name resolution for known adresses
|
||||
# Name resolution for known addresses
|
||||
REQUEST_DOMAIN=$( awk '/^'"$REQUEST_ADDR"'/ { print $2 }' /etc/hosts )
|
||||
REQUEST_ADDR=${REQUEST_DOMAIN:-$REQUEST_ADDR}
|
||||
|
||||
@ -133,7 +133,7 @@ then
|
||||
echo "graph_title Apache users"
|
||||
echo "graph_vlabel bytes per five minute period"
|
||||
echo "graph_args --lower-limit 1 --base 1024 --logarithmic"
|
||||
echo "graph_category Apache"
|
||||
echo "graph_category webserver"
|
||||
echo "graph_total total"
|
||||
echo "graph_info Webserver traffic by user."
|
||||
|
||||
|
10
plugins/apache/apache_vhosts/apache_logparser
Normal file → Executable file
10
plugins/apache/apache_vhosts/apache_logparser
Normal file → Executable file
@ -27,9 +27,6 @@ $statefile file to save last log position for tail
|
||||
$nsec tail and write to shared mem every n seconds
|
||||
$debug dump tallied data every n seconds, print every log line parsed
|
||||
$scan_interval rescan for new log files every n minutes
|
||||
$type log file type:
|
||||
common: CLF + vhost + time + (other fields)
|
||||
combined: combined + time + (other fields)
|
||||
=cut
|
||||
|
||||
# config
|
||||
@ -38,14 +35,15 @@ my $files = "*access_log";
|
||||
my $site = "(.*)-access_log";
|
||||
my $statefile = "/tmp/logstate";
|
||||
`touch $statefile` unless (-f $statefile);
|
||||
local $type="combined";
|
||||
local $nsec=7;
|
||||
local $debug=0;
|
||||
|
||||
my $scan_interval=5; # minutes
|
||||
|
||||
# perl modules
|
||||
use File::Tail::Multi;
|
||||
# "File:Tail:Multi" disappeared from CPAN (somewhen in 2016) - thus it needs
|
||||
# to be imported carefully (for travis checks).
|
||||
eval 'use File::Tail::Multi; 1;' or die 'Please install File::Tail::Multi';
|
||||
use Storable qw(freeze thaw);
|
||||
use List::Util qw(min max);
|
||||
use IPC::ShareLite ':lock';
|
||||
@ -167,7 +165,7 @@ while (1) {
|
||||
$old{$vpm}{'max_bytes'}=max($old{$vpm}{'max_bytes'},$temp{$vpm}{'max_bytes'}) || 0;
|
||||
|
||||
# reset local counters
|
||||
foreach my $check qw(requests bytes time max_bytes avg_bytes max_time avg_time) {
|
||||
foreach my $check (qw(requests bytes time max_bytes avg_bytes max_time avg_time)) {
|
||||
$temp{$vpm}{$check}=0;
|
||||
}
|
||||
|
||||
|
2
plugins/apache/apache_vhosts/apache_pipelogger
Normal file → Executable file
2
plugins/apache/apache_vhosts/apache_pipelogger
Normal file → Executable file
@ -95,7 +95,7 @@ sub periodic_write {
|
||||
$old{$vpm}{'avg_bytes'}=sprintf("%d",($old{$vpm}{'avg_bytes'}+$temp{$vpm}{'avg_bytes'})/2);
|
||||
|
||||
# reset local counters
|
||||
foreach my $check qw(requests bytes time cml_time max_bytes avg_bytes max_time avg_time) {
|
||||
foreach my $check (qw(requests bytes time cml_time max_bytes avg_bytes max_time avg_time)) {
|
||||
$temp{$vpm}{$check}=0;
|
||||
}
|
||||
|
||||
|
8
plugins/apache/apache_vhosts/apache_vhosts
Normal file → Executable file
8
plugins/apache/apache_vhosts/apache_vhosts
Normal file → Executable file
@ -117,7 +117,7 @@ multigraph apache_vhosts_$check
|
||||
graph_title average $check on all active vhosts
|
||||
graph_args --base 1000
|
||||
graph_vlabel average $check per response
|
||||
graph_category apache
|
||||
graph_category webserver
|
||||
graph_period minute
|
||||
graph_order $order
|
||||
END
|
||||
@ -139,7 +139,7 @@ multigraph apache_vhosts_$check.$site
|
||||
graph_title average $check on $data{$site}{'label'}
|
||||
graph_args --base 1000
|
||||
graph_vlabel average response in $check
|
||||
graph_category apache
|
||||
graph_category webserver
|
||||
graph_period minute
|
||||
END
|
||||
|
||||
@ -168,7 +168,7 @@ multigraph apache_vhosts_requests
|
||||
graph_title requests by vhost
|
||||
graph_args --base 1000
|
||||
graph_vlabel requests / \${graph_period}
|
||||
graph_category apache
|
||||
graph_category webserver
|
||||
graph_period minute
|
||||
graph_order $order
|
||||
END
|
||||
@ -193,7 +193,7 @@ multigraph apache_vhosts_requests.$site
|
||||
graph_title status codes on $data{$site}{'label'}
|
||||
graph_args --base 1000
|
||||
graph_vlabel status codes / \${graph_period}
|
||||
graph_category apache
|
||||
graph_category webserver
|
||||
graph_period minute
|
||||
END
|
||||
my $draw='AREA';
|
||||
|
@ -91,7 +91,7 @@ my $action = $1;
|
||||
if (exists $ARGV[0] and $ARGV[0] eq "config") {
|
||||
print "graph_title Apache $plugs{$action}\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_category apache\n";
|
||||
print "graph_category webserver\n";
|
||||
print "graph_vlabel activity\n";
|
||||
my $i = 0;
|
||||
foreach my $server (sort (@servers)) {
|
||||
|
4
plugins/apache/page_load
Normal file → Executable file
4
plugins/apache/page_load
Normal file → Executable file
@ -43,7 +43,7 @@ do_ () {
|
||||
do_config () {
|
||||
echo "graph_title Average page execution time"
|
||||
echo "graph_vlabel Seconds"
|
||||
echo "graph_category apache"
|
||||
echo "graph_category webserver"
|
||||
echo "graph_args --base 1000 -l 0"
|
||||
echo "graph_info Average page execution time"
|
||||
|
||||
@ -56,4 +56,4 @@ case $1 in
|
||||
eval do_$1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
exit $?
|
||||
|
@ -31,7 +31,7 @@ for q in queues:
|
||||
output_queue.append(re.sub('[^a-zA-Z0-9_]', '_', q.name))
|
||||
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "config":
|
||||
print "graph_category Qpid";
|
||||
print "graph_category webserver";
|
||||
print "graph_title Queue byte depth";
|
||||
print "graph_vlabel bytes"
|
||||
for queue in output_queue:
|
@ -31,7 +31,7 @@ for q in queues:
|
||||
output_queue.append(re.sub('[^a-zA-Z0-9_]', '_', q.name))
|
||||
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "config":
|
||||
print "graph_category Qpid";
|
||||
print "graph_category webserver";
|
||||
print "graph_title Ring queue discard rate";
|
||||
print "graph_vlabel messages/second";
|
||||
for queue in output_queue:
|
@ -31,7 +31,7 @@ for q in queues:
|
||||
output_queue.append(re.sub('[^a-zA-Z0-9_]', '_', q.name))
|
||||
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "config":
|
||||
print "graph_category Qpid";
|
||||
print "graph_category webserver";
|
||||
print "graph_title Enqueue data rate";
|
||||
print "graph_vlabel bytes/second"
|
||||
for queue in output_queue:
|
@ -31,7 +31,7 @@ for q in queues:
|
||||
output_queue.append(re.sub('[^a-zA-Z0-9_]', '_', q.name))
|
||||
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "config":
|
||||
print "graph_category Qpid";
|
||||
print "graph_category webserver";
|
||||
print "graph_title Enqueue message rate";
|
||||
print "graph_vlabel messages/second"
|
||||
for queue in output_queue:
|
@ -31,7 +31,7 @@ for q in queues:
|
||||
output_queue.append(re.sub('[^a-zA-Z0-9_]', '_', q.name))
|
||||
|
||||
if len(sys.argv) > 1 and sys.argv[1] == "config":
|
||||
print "graph_category Qpid";
|
||||
print "graph_category webserver";
|
||||
print "graph_title Queue message depth";
|
||||
print "graph_vlabel messages"
|
||||
for queue in output_queue:
|
64
plugins/apt/approx
Executable file
64
plugins/apt/approx
Executable file
@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# vim:syntax=python
|
||||
#
|
||||
# Plugin to monitor the amount of packages in an approx cache.
|
||||
#
|
||||
# Usage: place in /etc/munin/plugins/ (or link it there using ln -s)
|
||||
#
|
||||
# Parameters understood:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - used by munin-config)
|
||||
#
|
||||
# Magic markers - optional - used by installation scripts and
|
||||
# munin-config:
|
||||
#
|
||||
# #%# family=manual
|
||||
# #%# capabilities=autoconf
|
||||
#
|
||||
# Now for the real work...
|
||||
|
||||
from os.path import walk, exists, isfile, join
|
||||
from sys import argv, exit
|
||||
|
||||
|
||||
def get_file_types():
|
||||
"""Returns an array of filetype => count."""
|
||||
out = {}
|
||||
|
||||
def visitor(arg, dirname, names):
|
||||
for filename in names:
|
||||
if not isfile(join(dirname, filename)):
|
||||
continue
|
||||
ext = filename.split(".")[-1].lower()
|
||||
out[ext] = out.get(ext, 0) + 1
|
||||
|
||||
walk('/var/cache/approx/', visitor, None)
|
||||
return out
|
||||
|
||||
|
||||
if len(argv) > 1:
|
||||
|
||||
# Autoconfiguration
|
||||
if argv[1] == "autoconf":
|
||||
# Test if we can find a approx cache
|
||||
if exists('/var/cache/approx'):
|
||||
print("yes")
|
||||
else:
|
||||
print("no ('/var/cache/approx' not found)")
|
||||
exit()
|
||||
|
||||
elif argv[1] == "config":
|
||||
print("graph_title Approx cache")
|
||||
print("graph yes")
|
||||
print("graph_category loadbalancer")
|
||||
print("graph_info Statistics from the Approx cache.")
|
||||
for filetype in get_file_types().keys():
|
||||
print("%s.label %s" % (filetype.lower(), filetype))
|
||||
exit()
|
||||
|
||||
for filetype, count in get_file_types().iteritems():
|
||||
print("%s.value %d" % (filetype.lower(), count))
|
||||
|
||||
exit()
|
@ -36,7 +36,7 @@ if ($ARGV[0] and $ARGV[0] eq "config")
|
||||
{
|
||||
print "graph_title Files in apt-proxy cache\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_category apt-proxy\n";
|
||||
print "graph_category security\n";
|
||||
print "graph_vlabel files\n";
|
||||
print "main.label main\n";
|
||||
print "main.info Packages in main\n";
|
||||
|
27
plugins/apt/deb_packages/.gitignore
vendored
27
plugins/apt/deb_packages/.gitignore
vendored
@ -1,27 +0,0 @@
|
||||
*.py[co]
|
||||
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
dist
|
||||
build
|
||||
eggs
|
||||
parts
|
||||
bin
|
||||
var
|
||||
sdist
|
||||
develop-eggs
|
||||
.installed.cfg
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.tox
|
||||
|
||||
#Translations
|
||||
*.mo
|
||||
|
||||
#Mr Developer
|
||||
.mr.developer.cfg
|
@ -22,7 +22,7 @@ version.
|
||||
|
||||
This plugin has checked on Debian - Wheezy and squeeze. If you want to use it
|
||||
on older installations, tell me whether it works or which errors you had. It
|
||||
shoud run past python-apt 0.7 and python 2.5.
|
||||
should run past python-apt 0.7 and python 2.5.
|
||||
|
||||
check out this git repository from
|
||||
|
||||
@ -30,14 +30,14 @@ check out this git repository from
|
||||
git clone git://github.com/munin-monitoring/contrib.git
|
||||
cd contrib/plugins/apt/deb_packages
|
||||
sudo cp deb_packages.py /etc/munin/plugins/deb_packages
|
||||
sudo cp deb_packages.munin-conf /etc/munin/plugin-conf.d/deb_packages
|
||||
sudo cp deb_packages.munin.conf /etc/munin/plugin-conf.d/deb_packages
|
||||
|
||||
Verify the installation by
|
||||
|
||||
sudo munin-run deb_packages
|
||||
|
||||
### Configuration
|
||||
If you copied deb_packages.munin-conf to plugin-conf.d you have a starting point.
|
||||
If you copied deb_packages.munin.conf to plugin-conf.d you have a starting point.
|
||||
A typical configuration looks like this
|
||||
|
||||
[deb_packages]
|
||||
|
@ -24,7 +24,7 @@ TODO: update only if system was updated (aptitutde update has been run)
|
||||
TODO: shorten ext_info with getShortestConfigOfOptions
|
||||
TODO: check whether cachefile matches the config
|
||||
• i have no clever idea to do this without 100 lines of code
|
||||
BUG: If a package will be upgraded, and brings in new dependancies,
|
||||
BUG: If a package will be upgraded, and brings in new dependencies,
|
||||
these new deps will not be counted. WONTFIX
|
||||
"""
|
||||
import sys
|
||||
@ -257,7 +257,7 @@ def getShortestConfigOfOptions(optionList = ['label', 'archive', 'site']):
|
||||
'architecture'
|
||||
Architecture values are usually the same and can be ignored.
|
||||
|
||||
tells you wich representation of a tree as line is shortest.
|
||||
tells you which representation of a tree as line is shortest.
|
||||
Is needed to say which ext.info line would be the shortest
|
||||
to write the shortest readable output.
|
||||
"""
|
||||
@ -500,7 +500,7 @@ class PackageStat(defaultdict):
|
||||
"multigraph {graphName}_{type}\n"\
|
||||
"graph_title {type} Debian packages sorted by {option}\n"\
|
||||
"graph_info {type} Debian packages sorted by {option} of its repository\n"\
|
||||
"graph_category debian\n"\
|
||||
"graph_category security\n"\
|
||||
"graph_vlabel packages".format(**d)
|
||||
|
||||
def printConfig(self):
|
||||
@ -855,3 +855,111 @@ if __name__=='__main__':
|
||||
muninPlugin = Munin()
|
||||
muninPlugin.execute()
|
||||
# import IPython; IPython.embed()
|
||||
|
||||
|
||||
### The following is the smart_ plugin documentation, intended to be used with munindoc
|
||||
|
||||
"""
|
||||
=head1 NAME
|
||||
|
||||
deb_packages - plugin to monitor update resources and pending packages on Debian
|
||||
|
||||
=head1 APPLICABLE SYSTEMS
|
||||
|
||||
This plugin has checked on Debian - Wheezy and squeeze. If you want to use it
|
||||
on older installations, tell me whether it works or which errors you had. It
|
||||
shoud run past python-apt 0.7 and python 2.5.
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
With this plugin munin can give you a nice graph and some details where your
|
||||
packages come from, how old or new your installation is. Furtermore it tells
|
||||
you how many updates you should have been installed, how many packages are
|
||||
outdated and where they come from.
|
||||
|
||||
You can sort installed or upgradable Packages by 'archive', 'origin', 'site',
|
||||
'label' and 'component' and even some of them at once.
|
||||
|
||||
The script uses caching cause it is quite expensive. It saves the output to a
|
||||
cachefile and checks on each run, if dpkg-status or downloaded Packagefile have
|
||||
changed. If one of them has changed, it runs, if not it gives you the cached
|
||||
version
|
||||
|
||||
=head1 INSTALLATION
|
||||
|
||||
check out this git repository from
|
||||
|
||||
=over 2
|
||||
|
||||
aptitude install python-apt
|
||||
git clone git://github.com/munin-monitoring/contrib.git
|
||||
cd contrib/plugins/apt/deb_packages
|
||||
sudo cp deb_packages.py /etc/munin/plugins/deb_packages
|
||||
sudo cp deb_packages.munin.conf /etc/munin/plugin-conf.d/deb_packages
|
||||
|
||||
=back
|
||||
|
||||
Verify the installation by
|
||||
|
||||
=over 2
|
||||
|
||||
sudo munin-run deb_packages
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 CONFIGURATION
|
||||
|
||||
If you copied deb_packages.munin.conf to plugin-conf.d you have a starting point.
|
||||
|
||||
A typical configuration looks like this
|
||||
|
||||
=over 2
|
||||
|
||||
[deb_packages]
|
||||
# plugin is quite expensive and has to write statistics to cache output
|
||||
# so it has to write to plugins.cache
|
||||
user munin
|
||||
|
||||
# Packagelists to this size are printed as extra information to munin.extinfo
|
||||
env.MAX_LIST_SIZE_EXT_INFO 50
|
||||
|
||||
# Age in seconds an $CACHE_FILE can be. If it is older, the script updates
|
||||
# default if not set is 3540 (one hour)
|
||||
# at the moment this is not used, the plugin always runs (if munin calls it)
|
||||
#
|
||||
env.CACHE_FILE_MAX_AGE 3540
|
||||
|
||||
# All these numbers are only for sorting, so you can use env.graph01_sort_by_0
|
||||
# and env.graph01_sort_by_2 without using env.graph01_sort_by_1.
|
||||
# sort_by values ...
|
||||
# possible values are 'label', 'archive', 'origin', 'site', 'component'
|
||||
env.graph00_type installed
|
||||
env.graph00_sort_by_0 label
|
||||
env.graph00_sort_by_1 archive
|
||||
env.graph00_show_ext_0 origin
|
||||
env.graph00_show_ext_1 site
|
||||
|
||||
env.graph01_type upgradable
|
||||
env.graph01_sort_by_0 label
|
||||
env.graph01_sort_by_1 archive
|
||||
env.graph01_show_ext_0 origin
|
||||
env.graph01_show_ext_1 site
|
||||
|
||||
=back
|
||||
|
||||
You can sort_by one or some of these possible Values
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
unknown
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
Default for Munin contributions is GPLv2 (http://www.gnu.org/licenses/gpl-2.0.txt)
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
"""
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
BIN
plugins/apt/deb_packages/example-graphs/deb_packages.py-week.png
Normal file
BIN
plugins/apt/deb_packages/example-graphs/deb_packages.py-week.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@ -91,14 +91,14 @@ def doConfig(plugin_name):
|
||||
print "graph_title ArangoDB current connections"
|
||||
print "graph_args --base 1000 -l 0"
|
||||
print "graph_vlabel connections"
|
||||
print "graph_category ArangoDB"
|
||||
print "graph_category db"
|
||||
print "connections.label connections"
|
||||
|
||||
elif plugin_name == 'arangodb_time_total':
|
||||
print "graph_title ArangoDB total time"
|
||||
print "graph_args --base 1000 -l 0"
|
||||
print "graph_vlabel seconds"
|
||||
print "graph_category ArangoDB"
|
||||
print "graph_category db"
|
||||
print "total.label total"
|
||||
print "connection.label connection"
|
||||
print "request.label request"
|
||||
@ -108,7 +108,7 @@ def doConfig(plugin_name):
|
||||
print "graph_title ArangoDB total bytes"
|
||||
print "graph_args --base 1024"
|
||||
print "graph_vlabel total bytes received (-) / sent (+)"
|
||||
print "graph_category ArangoDB"
|
||||
print "graph_category db"
|
||||
print "graph_order received sent"
|
||||
print "received.graph no"
|
||||
print "received.draw LINE2"
|
||||
|
@ -31,13 +31,13 @@ $aris_db_pass='password';
|
||||
if ($argv[1]=='config'){
|
||||
print "graph_title ARIS active players\n";
|
||||
print "graph_vlabel Players Count\n";
|
||||
print "graph_category ARIS\n";
|
||||
print "graph_category games\n";
|
||||
print "players.label player count\n";
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
$sqlLink = mysql_connect($aris_db_host,$aris_db_user,$aris_db_pass) or die('MySQL authenticaiton error');
|
||||
$sqlLink = mysql_connect($aris_db_host,$aris_db_user,$aris_db_pass) or die('MySQL authentication error');
|
||||
mysql_select_db($aris_db_name) or die('MySQL Wrong Scheme Error');
|
||||
|
||||
$query = 'SELECT COUNT(DISTINCT player_id) AS count FROM player_log WHERE timestamp BETWEEN DATE_SUB(NOW(), INTERVAL 5 MINUTE) AND NOW()';
|
||||
|
0
plugins/network/arp_bsd_ → plugins/arp/arp_bsd_
Normal file → Executable file
0
plugins/network/arp_bsd_ → plugins/arp/arp_bsd_
Normal file → Executable file
@ -129,7 +129,7 @@ sub response_error{
|
||||
if( $ARGV[0] eq "config" ){
|
||||
print "graph_title ASSP - Envelope Recipient Statistics\n";
|
||||
print "graph_vlabel Counter in k,m\n";
|
||||
print "graph_category ASSP\n";
|
||||
print "graph_category spamfilter\n";
|
||||
|
||||
my $label;
|
||||
foreach my $key ( @muninlabel ){
|
@ -113,7 +113,7 @@ if( $ARGV[0] eq "config" ){
|
||||
if( $count == 0 ){ # General Runtime Information
|
||||
print "graph_title ASSP - General Runtime Information\n";
|
||||
print "graph_vlabel Counter in Percent\n";
|
||||
print "graph_category ASSP\n";
|
||||
print "graph_category spamfilter\n";
|
||||
}
|
||||
$label = $key;
|
||||
$label =~ s/\s/\_/g;
|
@ -141,7 +141,7 @@ sub response_error{
|
||||
if( $ARGV[0] eq "config" ){
|
||||
print "graph_title ASSP - Message Statistics\n";
|
||||
print "graph_vlabel Counter in k,m\n";
|
||||
print "graph_category ASSP\n";
|
||||
print "graph_category spamfilter\n";
|
||||
|
||||
my $label;
|
||||
foreach my $key ( @muninlabel ){
|
@ -119,7 +119,7 @@ sub response_error{
|
||||
if( $ARGV[0] eq "config" ){
|
||||
print "graph_title ASSP - SMTP Connection Statistics\n";
|
||||
print "graph_vlabel Counter in k,m\n";
|
||||
print "graph_category ASSP\n";
|
||||
print "graph_category spamfilter\n";
|
||||
|
||||
my $label;
|
||||
foreach my $key ( @muninlabel ){
|
@ -113,7 +113,7 @@ if( $ARGV[0] eq "config" ){
|
||||
if( $count == 0 ){ # General Runtime Information
|
||||
print "graph_title ASSP - General Runtime Information\n";
|
||||
print "graph_vlabel Counter in Percent\n";
|
||||
print "graph_category ASSP\n";
|
||||
print "graph_category spamfilter\n";
|
||||
}
|
||||
$label = $key;
|
||||
$label =~ s/\s/\_/g;
|
@ -85,8 +85,8 @@ sub asterisk_command {
|
||||
|
||||
# Response: (Error|Follows|???)
|
||||
$line = $socket->getline;
|
||||
if ($line ne "Response: Follows\r\n") {
|
||||
while ( $line = $socket->getline and $line ne "\r\n" ) {}
|
||||
if ($line !~ /^Response: Follows\r?\n$/) {
|
||||
while ( $line = $socket->getline and $line !~ /^\r?\n$/ ) {}
|
||||
return undef;
|
||||
}
|
||||
|
||||
@ -94,12 +94,12 @@ sub asterisk_command {
|
||||
$line = $socket->getline;
|
||||
|
||||
# Until we get the --END COMMAND-- marker, it's the command's output.
|
||||
while ( $line = $socket->getline and $line ne "--END COMMAND--\r\n" ) {
|
||||
while ( $line = $socket->getline and $line !~ /^--END COMMAND--\r?\n$/ ) {
|
||||
$reply .= $line;
|
||||
}
|
||||
|
||||
# And then wait for the empty line that says we're done
|
||||
while ( $line = $socket->getline and $line ne "\r\n" ) {}
|
||||
while ( $line = $socket->getline and $line !~ /^\r?\n$/ ) {}
|
||||
|
||||
return $reply;
|
||||
}
|
||||
@ -130,13 +130,13 @@ if ( $socket ) {
|
||||
$socket->print("Action: login\nUsername: $username\nSecret: $secret\nEvents: off\n\n");
|
||||
my $response_status = $socket->getline;
|
||||
|
||||
if ( $response_status ne "Response: Success\r\n" ) {
|
||||
if ( $response_status !~ /^Response: Success\r?\n$/ ) {
|
||||
my $response_message = $socket->getline;
|
||||
$response_message =~ s/Message: (.*)\r\n/$1/;
|
||||
$response_message =~ s/Message: (.*)\r?\n/$1/;
|
||||
$error = "Asterisk authentication error: " . $response_message;
|
||||
}
|
||||
|
||||
while ( $line = $socket->getline and $line ne "\r\n" ) {}
|
||||
while ( $line = $socket->getline and $line !~ /^\r?\n$/ ) {}
|
||||
}
|
||||
|
||||
if ( $ARGV[0] and $ARGV[0] eq 'autoconf' ) {
|
||||
@ -156,7 +156,7 @@ multigraph asterisk_channels
|
||||
graph_title Asterisk active channels
|
||||
graph_args --base 1000 -l 0
|
||||
graph_vlabel channels
|
||||
graph_category asterisk
|
||||
graph_category voip
|
||||
total.label channels
|
||||
END
|
||||
|
||||
@ -173,8 +173,8 @@ multigraph asterisk_voicemail
|
||||
graph_title Asterisk voicemail messages
|
||||
graph_args --base 1000 -l 0
|
||||
graph_vlabel messages
|
||||
graph_category asterisk
|
||||
messages.label Total messages
|
||||
graph_category voip
|
||||
total.label Total messages
|
||||
END
|
||||
|
||||
print <<END;
|
||||
@ -182,7 +182,7 @@ print <<END;
|
||||
multigraph asterisk_meetme
|
||||
graph_title Asterisk meetme statistics
|
||||
graph_args --base 1000 -l 0
|
||||
graph_category asterisk
|
||||
graph_category voip
|
||||
users.label Connected users
|
||||
conferences.label Active conferences
|
||||
END
|
||||
@ -193,7 +193,7 @@ multigraph asterisk_codecs
|
||||
graphs_title Asterisk channels per codec
|
||||
graph_args --base 1000 -l 0
|
||||
graph_vlabel channels
|
||||
graph_category asterisk
|
||||
graph_category voip
|
||||
END
|
||||
|
||||
foreach my $codec (@CODECS) {
|
||||
@ -251,7 +251,7 @@ my $iaxchannels_response = asterisk_command($socket, "iax2 show channels");
|
||||
$socket->close();
|
||||
|
||||
my $active_channels = 'U';
|
||||
$active_channels = $1 if $channels_response =~ /\n([0-9]+) active channels/;
|
||||
$active_channels = $1 if $channels_response =~ /\n([0-9]+) active channels?/;
|
||||
|
||||
print <<END;
|
||||
|
||||
@ -259,7 +259,7 @@ multigraph asterisk_channels
|
||||
total.value $active_channels
|
||||
END
|
||||
|
||||
my @channels_list = split(/\r\n/, $channels_response) if $channels_response;
|
||||
my @channels_list = split(/\r?\n/, $channels_response) if $channels_response;
|
||||
foreach my $channel (@CHANNELS) {
|
||||
print "$channel.value ";
|
||||
print $channels_response ? scalar(grep(/^$channel\//, @channels_list)) : "U";
|
||||
@ -271,7 +271,7 @@ if ( !$voicemail_response or $voicemail_response =~ /no voicemail users/ ) {
|
||||
print "total.value U\n";
|
||||
} else {
|
||||
my $messages = 0;
|
||||
foreach my $line (split(/\r\n/, $voicemail_response)) {
|
||||
foreach my $line (split(/\r?\n/, $voicemail_response)) {
|
||||
next unless $line =~ / ([0-9]+)$/;
|
||||
$messages += $1;
|
||||
}
|
||||
@ -292,7 +292,7 @@ users.value 0
|
||||
conferences.value 0
|
||||
END
|
||||
} else {
|
||||
my @meetme_list = split(/\r\n/, $meetme_response);
|
||||
my @meetme_list = split(/\r?\n/, $meetme_response);
|
||||
|
||||
my $users = pop(@meetme_list);
|
||||
$users =~ s/^Total number of MeetMe users: ([0-9]+)$/$1/;
|
||||
@ -320,11 +320,12 @@ END
|
||||
}
|
||||
|
||||
# split the channels' listing and drop header and footnotes
|
||||
my @sipchannels = $sipchannels_response ? split(/\r\n/, $sipchannels_response) : ();
|
||||
my @sipchannels = $sipchannels_response ? split(/\r?\n/, $sipchannels_response) : ();
|
||||
pop(@sipchannels); shift(@sipchannels);
|
||||
my @iaxchannels = $iaxchannels_response ? split(/\r\n/, $iaxchannels_response) : ();
|
||||
my @iaxchannels = $iaxchannels_response ? split(/\r?\n/, $iaxchannels_response) : ();
|
||||
pop(@iaxchannels); shift(@iaxchannels);
|
||||
|
||||
$i = 0;
|
||||
foreach my $sipchan (@sipchannels) {
|
||||
my $found = 0;
|
||||
my @fields = split ' ', $sipchan;
|
||||
@ -346,6 +347,7 @@ END
|
||||
}
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
foreach my $iaxchan (@iaxchannels) {
|
||||
my $found = 0;
|
||||
my @fields = split ' ', $iaxchan;
|
||||
@ -354,7 +356,7 @@ END
|
||||
$unknown += 1;
|
||||
next;
|
||||
}
|
||||
foreach my $codec (@CODECSX) {
|
||||
foreach my $codec (@CODECS) {
|
||||
if ($fields[8] eq "$codec") {
|
||||
$results[$i] = $results[$i] + 1;
|
||||
$found = 1;
|
||||
|
@ -13,7 +13,7 @@
|
||||
print "graph_title Asterisk Fax - Cancelled Faxes (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Cancelled Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_cancelled.draw AREA\n";
|
||||
print "t38_cancelled.label Cancelled T.38 Faxes\n";
|
||||
print "g711_cancelled.draw AREA\n";
|
||||
@ -60,6 +60,3 @@
|
||||
print "g711_cancelled.value $faxstats{'Digium G.711'}{'Canceled'}\n";
|
||||
|
||||
exit( 0 );
|
||||
|
||||
|
||||
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Cancelled Faxes\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Cancelled Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "cancelled.draw AREA\n";
|
||||
print "cancelled.label Cancelled Faxes\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Current Sessions\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Current Sessions\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "sessions.draw AREA\n";
|
||||
print "sessions.label Current Sessions\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Failed and Completed Faxes\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Failed and Completed Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "failed.draw AREA\n";
|
||||
print "failed.label Failed faxes\n";
|
||||
print "completed.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - IO Fail\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of IO Failures\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "iofail.draw AREA\n";
|
||||
print "iofail.label IO Failures\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - IO Partial\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of IO Partials\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "iopartial.draw AREA\n";
|
||||
print "iopartial.label IO Partial\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Licensed Channels\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Licensed Channels\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "channels.draw AREA\n";
|
||||
print "channels.label Licensed Channels\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Max Concurrent Sessions\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Max Concurrent Sessions\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "maxsessions.draw AREA\n";
|
||||
print "maxsessions.label Sessions\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Negotiations Failed\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Negotiations Failed\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "failed.draw AREA\n";
|
||||
print "failed.label Negotiations Failed\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - No Fax\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of No Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "nofax.draw AREA\n";
|
||||
print "nofax.label Number of No Faxes\n";
|
||||
exit 0;
|
||||
|
@ -86,7 +86,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Partial Faxes\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Partial Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "partial.draw AREA\n";
|
||||
print "partial.label Partial Faxes\n";
|
||||
exit 0;
|
||||
|
@ -86,7 +86,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Protocol Error\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Protocol Errors\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "proterror.draw AREA\n";
|
||||
print "proterror.label Protocol Errors\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Successful Tx\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Successful Tx's\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "success.draw AREA\n";
|
||||
print "success.label successful tx\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Switched to T.38\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Switches to T.38\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "switched.draw AREA\n";
|
||||
print "switched.label Switches to T.38\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Train Failure\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Train Failures\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "failure.draw AREA\n";
|
||||
print "failure.label Train Failures\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Tx/Rx Attempts\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Tx and Rx Attempts\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "transmit.draw AREA\n";
|
||||
print "transmit.label Tx Attempts\n";
|
||||
print "receive.draw AREA\n";
|
||||
|
@ -14,7 +14,7 @@
|
||||
print "graph_title Asterisk active fax channels\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel channels\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "channels.draw AREA\n";
|
||||
print "channels.label channels\n";
|
||||
exit 0;
|
||||
@ -37,6 +37,3 @@
|
||||
print "channels.value $channels\n";
|
||||
|
||||
exit( 0 );
|
||||
|
||||
|
||||
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Cancelled Faxes (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Cancelled Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_cancelled.draw AREA\n";
|
||||
print "t38_cancelled.label Cancelled T.38 Faxes\n";
|
||||
print "g711_cancelled.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Licensed Channels\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel channels\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "channels.draw AREA\n";
|
||||
print "channels.label channels\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Current Sessions\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Current Sessions\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "sessions.draw AREA\n";
|
||||
print "sessions.label Current Sessions\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Failed and Completed Faxes\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Failed and Completed Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "failed.draw AREA\n";
|
||||
print "failed.label Failed faxes\n";
|
||||
print "completed.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - IO Failures (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of IO Failures\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_iofail.draw AREA\n";
|
||||
print "t38_iofail.label T.38 IO Failures\n";
|
||||
print "g711_iofail.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - IO Partial (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Number of IO Partials\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_iopartial.draw AREA\n";
|
||||
print "t38_iopartial.label Partial T.38 Faxes\n";
|
||||
print "g711_iopartial.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Licensed Channels (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Licensed Channels\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_channels.draw AREA\n";
|
||||
print "t38_channels.label T.38 Licensed Channels\n";
|
||||
print "g711_channels.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Max Concurrent Sessions (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Max Concurrent Sessions\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_maxsessions.draw AREA\n";
|
||||
print "t38_maxsessions.label Max Concurrent T.38 Sessions\n";
|
||||
print "g711_maxsessions.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Negotiations Failed (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Negotiations Failed\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_failed.draw AREA\n";
|
||||
print "t38_failed.label T.38 Negotiations Failed\n";
|
||||
print "g711_failed.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - No Faxes (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of No Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_nofax.draw AREA\n";
|
||||
print "t38_nofax.label No T.38 Faxes\n";
|
||||
print "g711_nofax.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Partial Faxes (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Partial Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_partial.draw AREA\n";
|
||||
print "t38_partial.label Partial T.38 Faxes\n";
|
||||
print "g711_partial.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Protocol Errors (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Protocol Errors\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_proterror.draw AREA\n";
|
||||
print "t38_proterror.label T.38 Protocol Errors\n";
|
||||
print "g711_proterror.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Successful Faxes (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Successful Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_success.draw AREA\n";
|
||||
print "t38_success.label Successful T.38 Faxes\n";
|
||||
print "g711_success.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Switched to T.38\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Switches to T.38\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "switched.draw AREA\n";
|
||||
print "switched.label Switched to T.38\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Train Failures (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Train Failures\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_failure.draw AREA\n";
|
||||
print "t38_failure.label T.38 Train Failures\n";
|
||||
print "g711_failure.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Tx/Rx Attempts\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Tx and Rx Attempts\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "transmit.draw AREA\n";
|
||||
print "transmit.label Tx Attempts\n";
|
||||
print "receive.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Dropped Calls (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Dropped Calls\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_dropped.draw AREA\n";
|
||||
print "t38_dropped.label T.38 Dropped Calls\n";
|
||||
print "g711_dropped.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Current Sessions\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Current Sessions\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "sessions.draw AREA\n";
|
||||
print "sessions.label Current Sessions\n";
|
||||
exit 0;
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Failed and Completed Faxes\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Failed and Completed Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "failed.draw AREA\n";
|
||||
print "failed.label Failed faxes\n";
|
||||
print "completed.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - File Errors (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of File Errors\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_file_error.draw AREA\n";
|
||||
print "t38_file_error.label T.38 File Errors\n";
|
||||
print "g711_file_error.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Memory Errors (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Memory Errors\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_errors.draw AREA\n";
|
||||
print "t38_errors.label T.38 Memory Errors\n";
|
||||
print "g711_errors.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Negotiations Failed (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Negotiations Failed\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_failed.draw AREA\n";
|
||||
print "t38_failed.label T.38 Negotiations Failed\n";
|
||||
print "g711_failed.draw AREA\n";
|
||||
@ -124,8 +124,8 @@ address with the copyright notice upgrade with your name.
|
||||
$astman->disconnect;
|
||||
|
||||
# Some idiot who wrote the SpanDSP code spelled "Negotiation" wrong.
|
||||
print "t38_failed.value $faxstats{'Spandsp T.38'}{'Negotation Failed'}\n";
|
||||
print "g711_failed.value $faxstats{'Spandsp G.711'}{'Negotation Failed'}\n";
|
||||
print "t38_failed.value $faxstats{'Spandsp T.38'}{'Negotiation Failed'}\n";
|
||||
print "g711_failed.value $faxstats{'Spandsp G.711'}{'Negotiation Failed'}\n";
|
||||
|
||||
exit( 0 );
|
||||
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - No Faxes (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of No Faxes\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_nofax.draw AREA\n";
|
||||
print "t38_nofax.label No T.38 Faxes\n";
|
||||
print "g711_nofax.draw AREA\n";
|
||||
|
@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
|
||||
print "graph_title Asterisk Fax - Protocol Errors (T.38 and G.711)\n";
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_vlabel Number of Protocol Errors\n";
|
||||
print "graph_category asterisk\n";
|
||||
print "graph_category voip\n";
|
||||
print "t38_proterror.draw AREA\n";
|
||||
print "t38_proterror.label T.38 Protocol Errors\n";
|
||||
print "g711_proterror.draw AREA\n";
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user