1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-08-11 08:24:51 +00:00

Merge pull request #1 from munin-monitoring/master

Udpate Fork
This commit is contained in:
Kai 2020-09-10 13:49:08 -04:00 committed by GitHub
commit 2c98aeb063
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1122 changed files with 23836 additions and 11689 deletions

45
.codespell.exclude Normal file
View file

@ -0,0 +1,45 @@
echo "succes.label Login success"
echo "succes.draw AREA"
echo "succes.value $success"
Tim Small <tim@seoss.co.uk>
accesss => 'NFSPROC3_ACCESS (Check Access Permission)',
# Beginn des modifizierten Skriptes - Beginning of the modified script #
[ /(\d+) packets with ECN ECT\(0\) bit set$/, [ [ :packets, 'ECT(0) bit' ] ] ],
[ /(\d+) packets with ECN ECT\(1\) bit set$/, [ [ :packets, 'ECT(1) bit' ] ] ],
[ /(\d+) ARP entrys? timed out$/, [ [ :entries, 'timed out' ] ] ],
echo -en "recieved.value "
print "require dont.graph.anything [0-9]+\n"
# Informations générales :
# Marge de bruit 5.10 dB 5.60 dB
# Adresse MAC Freebox XX:XX:XX:XX:XX:XX
# Adresse IP 203.0.113.60
# Adresse IP privée 192.0.2.1
# Adresse IP DMZ 192.0.2.2
# Adresse IP Freeplayer 192.0.2.0
# Adresse MAC Adresse IP
# Linjen som grep'es ut kan se ut som dette:
# Linjen som grep'es ut kan se ut som dette:
VISITORS="$(echo '<doc><item>munin</item></doc>' | curl --silent -X POST -H 'Content-type: text/xml' -d @- http://api.trafic.ro/rest/0.01/sumar-site/$RID | xmlstarlet sel -t -m "/sumar-site/vizitatori_ultimele_24_ore" -v ".")"
# - Serien Timer werden nun separat gezaehlt (anzahl pro Woche)
# - Timer werden nur ignoriert wenn sie 0(inaktiv) als Status haben
primary muss ein iterable oder StringType sein
secondary muss iterable oder StringType sein
print ("d.label Design voltage\nd.type GAUGE\nd.draw AREA\n");
if ($str =~ /^(no?|0|f(alse)?)$/i) {
# (Based off the perl munin plugin by Joan Carles Soler)
<hist>
</hist>
Christian Loos <cloos@netsandbox.de>
# - kein div 0 Fehler mehr wenn der Host nicht zu erreichen ist
# - im Namen kann Munin-konform der Hostname mit angegeben werden: vdr_localhost vdr_192.168.0.2, ... (localhost ist default)
print "platte.info Angabe, wieviel der von VDR beschreibbaren Festplatten belegt ist.\n";
echo 'graph_title Samba Locked Files'
echo 'graph_vlabel number of locked files'
echo 'samba_locked.label Locked Files'
echo 'lock.label Locked files'
echo 'graph_info This graph shows the Memory used by process'
echo 'shares.label shared files'
# Based on Tim Wulkau's script. Thank you!
echo 'graph_title Memory usage by process'
echo 'VmSize.info The size of the virtual memory allocated to the process'
grep -v 'Preparing to download files' | \

5
.codespell.ignore-words Normal file
View file

@ -0,0 +1,5 @@
cas
conexant
ende
referer
wan

3
.flake8 Normal file
View file

@ -0,0 +1,3 @@
[flake8]
ignore = W503, E203
max-line-length = 99

2
.gitignore vendored
View file

@ -1,2 +1,4 @@
.*.swp
*~
__pycache__/

7
.rubocop.yml Normal file
View file

@ -0,0 +1,7 @@
# Allow "=begin"/"=end" multiline comments in order to protect munin's
# magic markers ("#%#").
Style/BlockComments:
Enabled: false
AllCops:
NewCops: enable

View file

@ -1,61 +1,90 @@
---
language: perl
install:
- sudo apt-get update
- sudo apt-get --no-install-recommends install devscripts python python3 ruby php5-cli gawk ksh zsh pylint
- 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
dist: bionic
addons:
apt:
packages:
- codespell
- devscripts
- python
- python-flake8
- python3
- python3-flake8
- ruby
- php-cli
- gawk
- ksh
- zsh
- pylint
- shellcheck
- rubocop
- pkg-config
- libdb-dev
- libvirt-dev
- libexpat-dev
# Modules used by test script
- cpanm --notest Capture::Tiny
# Munin/Plugin.pm is in "munin-node" on precise
- munin-node
# Modules used by test script
- libsys-virt-perl
- libcapture-tiny-perl
# Modules used by plugins
- libberkeleydb-perl
- libcache-memcached-perl
- libgraphics-colornames-www-perl
- libdbd-pg-perl
- libdata-dump-perl
- libdate-manip-perl
- libdatetime-format-iso8601-perl
- libdevice-serialport-perl
- libfile-readbackwards-perl
- libgraphics-colorobject-perl
- libipc-run3-perl
- libipc-sharelite-perl
- libjson-perl
- libjson-any-perl
- libmail-sendmail-perl
- libmodern-perl-perl
- libmoosex-poe-perl
- libnet-dns-perl
- libnet-openssh-perl
- libnet-snmp-perl
- libnet-telnet-perl
- libnet-telnet-cisco-perl
- libpoe-perl
- libpoe-component-irc-perl
- libproc-processtable-perl
- libredis-perl
- libswitch-perl
- libtext-iconv-perl
- libwww-mechanize-perl
- libwww-mechanize-treebuilder-perl
- libyaml-perl
- libxml-libxml-perl
- libxml-simple-perl
- libxml-smart-perl
- libxml-twig-perl
- libexperimental-perl
before_install:
- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
- cpanm --notest File::Find
- cpanm --notest Test::More
#
# Modules used by plugins
# more Modules used by plugins
- cpanm --notest Asterisk::AMI
- cpanm --notest BerkeleyDB
- cpanm --notest Cache::Memcached
- cpanm --notest DBD::Pg
- cpanm --notest Data::Dump
- cpanm --notest Date::Manip
- cpanm --notest Date::Parse
- cpanm --notest DateTime::Format::ISO8601
- cpanm --notest Device::SerialPort
- cpanm --notest FCGI::Client
- cpanm --notest File::ReadBackwards
- cpanm --notest Graphics::ColorObject
- cpanm --notest IPC::Run3
- cpanm --notest IPC::ShareLite
- cpanm --notest JSON
- cpanm --notest JSON::Any
- cpanm --notest Mail::Sendmail
- cpanm --notest Modern::Perl
- cpanm --notest MooseX::POE
- cpanm --notest Net::DNS
- cpanm --notest Net::OpenSSH
- cpanm --notest Net::SNMP
- cpanm --notest Net::Telnet
- cpanm --notest Net::Telnet::Cisco
- cpanm --notest POE
- cpanm --notest POE::Component::IRC
- cpanm --notest POE::Quickie
- cpanm --notest Proc::ProcessTable
- cpanm --notest Redis
- cpanm --notest WWW::Mechanize::TreeBuilder
- cpanm --notest Text::Iconv
- cpanm --notest YAML
- cpanm --notest XML::LibXML
- cpanm --notest XML::Simple
- cpanm --notest XML::Smart
- cpanm --notest XML::Twig
- cpanm --notest nvidia::ml
- cpanm --notest experimental
# - Sys::Virt version matching the test system's libvirt-dev
- cpanm --notest DANBERR/Sys-Virt-0.9.8.tar.gz
# Modules used bu plugins, but not compiling from CPAN
# - cpanm --notest nvidia::ml
# 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:
- make lint
- prove

7
Makefile Normal file
View file

@ -0,0 +1,7 @@
.PHONY: lint
lint:
# TODO: add "--ignore-words .codespell.ignore-words" as soon as travis supports a newer
# testing environment (containing codespell 0.11 or later).
find plugins/ -type f -not -name "*.png" -not -name "*.conf" -not -name "*.jar" -not -name "*.pyc" -print0 \
| xargs -0 codespell \
--exclude-file .codespell.exclude

View file

@ -1,13 +1,18 @@
This is the repository for all user contributed stuff
This is the repository for all user contributed stuff related to
[munin](http://munin-monitoring.org).
# contrib/plugins/ - 3rd-party plugins
**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
@ -15,23 +20,24 @@ Feel free to update templates here, or even to create new ones.
Bonus points for mobile-friendly ones :)
Note that the one named `official` is a loose-synced copy of the one in SVN trunk.
It should serves as a base for small editions that can be resynced in SVN trunk, so for that :
Note that the one named `official` is a loose-synced copy of the one distributed with munin.
It should serves as a base for small editions that can be merged into munin, so for that:
* don't copy the whole template
* directly edit files in this directory
# contrib/tools/ - 3rd-party tools
Here, you can put just any kind of tool. Please use this directory instead of a random place on the internet.
It makes things way more easy to search for others.
And, it serves as an incubator of SVN `trunk/contrib` :-)
# contrib/samples/ - 3rd-party examples of configs
This serves as a repository for examples of various configs. You know, the ''learn by example'' way of doing things.
## Notes to contributors
### Commits, Comments & Pull requests
@ -51,15 +57,17 @@ Just try to explain in the pull comment the ''why'' we should merge it (if it's
Tim Pope wrote a [very nice tuto](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) on making good commit comments.
### Licenses
All the code here is licensed with the same terms as munin itself (GPLv2), unless specified otherwise inside a file.
In all cases the code shall have an OSI-compatible license. Asking for a pull implies that you agree with that fact.
This change was made on Jun 1st 2012. If you wrote some code earlier and you do not agree to the new licensing default, you can :
This change was made on Jun 1st 2012. If you wrote some code earlier and you do not agree to the new licensing default, you can:
- submit a licensing change pull
- submit a removal pull
# Building status
master: [![Build Status](https://travis-ci.org/munin-monitoring/contrib.svg?branch=master)](https://travis-ci.org/munin-monitoring/contrib)

54
plugins/README.md Normal file
View 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 of the plugin (see the plugin's documentation), too.
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. perl: `perlcritic`, shell: `shellcheck`, python: `flake8`, ruby: `rubocop`)
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://guide.munin-monitoring.org/en/latest/develop/plugins/plugin-gallery.html#rules-for-plugin-contributors) 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

34
plugins/accounting/accounting_ Normal file → Executable file
View file

@ -115,28 +115,26 @@ fi
if [ "$1" == "autoconf" ]; then
if [ -r /proc/net/dev ]; then
$IPTABLES -L INPUT -v -n -x >/dev/null 2>/dev/null
if [ $? -gt 0 ]; then
echo "no (could not run iptables as user `whoami`)"
exit 1
else
echo yes
exit 0
$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`)"
else
echo yes
fi
else
echo "no (/proc/net/dev not found)"
exit 1
fi
exit 0
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
@ -192,12 +190,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 }"

View file

@ -37,11 +37,10 @@ mktempfile () {
if [ "$1" = "autoconf" ]; then
if [ -f "${AMAVIS_LOG}" -a -n "${LOGTAIL}" -a -x "${LOGTAIL}" -a -n "${BC}" -a -x "${BC}" ] ; then
echo yes
exit 0
else
echo no
exit 1
fi
exit 0
fi
if [ "$1" = "config" ]; then

View file

@ -45,11 +45,10 @@ my($db_home) = # DB databases directory
if ($ARGV[0] and $ARGV[0] eq "autoconf") {
if (-x "/usr/sbin/amavisd-agent") {
print "yes\n";
exit 0;
} else {
print "no (/usr/sbin/amavisd-agent not found or not executable)\n";
exit 1;
}
exit 0;
} elsif ($ARGV[0] and $ARGV[0] eq "suggest") {
print "time\n";
print "cache\n";

View file

@ -23,11 +23,10 @@ STATEFILE=$MUNIN_PLUGSTATE/amavis.offset
if [ "$1" = "autoconf" ]; then
if [ -f "${MAIL_LOG}" -a -n "${LOGTAIL}" -a -x "${LOGTAIL}" ] ; then
echo yes
exit 0
else
echo no
exit 1
fi
exit 0
fi
if [ "$1" = "config" ]; then
@ -70,15 +69,13 @@ fi
$LOGTAIL ${MAIL_LOG} $STATEFILE | \
awk 'BEGIN { na= 0; nb= 0; nc= 0; nd= 0; total= 0 }
awk 'BEGIN { clean_count=0; passed_spam_count=0; blocked_spam_count=0; infected_count=0; total=0 }
{
if (index($0, "Passed CLEAN")) { na++ ; total++ }
else if (index($0, "Passed SPAMMY")) { nb++ ; total++ }
else if (index($0, "Blocked SPAMMY")) { nc++ ; total++ }
else if (index($0, "INFECTED")) { nd++ ; total++ }
if (index($0, "Passed CLEAN")) { clean_count++ ; total++ }
else if (index($0, "Passed SPAMMY")) { passed_spam_count++ ; total++ }
else if (index($0, "Blocked SPAMMY")) { blocked_spam_count++ ; total++ }
else if (index($0, "INFECTED")) { infected_count++ ; total++ }
}
END { print "clean.value " na"\np_spam.value " nb"\nb_spam.value " nc"\nvirus.value " nd"\ntotal.value " total }'
END { print "clean.value " clean_count"\np_spam.value " passed_spam_count"\nb_spam.value " blocked_spam_count"\nvirus.value " infected_count"\ntotal.value " total }'

View file

@ -54,14 +54,13 @@ sub autoconf
if (-d $LOGDIR) {
if (-f $logfile) {
print "yes\n";
exit 0;
} else {
print "no (logfile not found)\n";
}
} else {
print "no (could not find logdir)\n";
}
exit 1;
exit 0;
}
sub config
@ -134,7 +133,7 @@ sub parse
while (<$log>) {
# \d protects us against HTML injection here, be careful when changing
if (m,SCM:{ID:(\d+) +.* +Consumption: +(\d+) +,) {
if (m,SCM:\{ID:(\d+) +.* +Consumption: +(\d+) +,) {
$stations{$1} = $2;
$signals{$1}++;
}

View file

@ -28,16 +28,15 @@
if [ "$1" = "autoconf" ]; then
if [ -z "$(which amule)" ]; then
echo "$0: error: amule not installed"
exit 1
echo "no (amule not installed)"
else
if [ ! -e /tmp/amulesig.dat ]; then
echo "$0: error: amulesig.dat not found"
echo "no (amulesig.dat not found)"
else
echo yes
exit 0
fi
fi
exit 0
fi
if [ "$1" = "config" ]; then

View file

@ -28,16 +28,15 @@
if [ "$1" = "autoconf" ]; then
if [ -z "$(which amule)" ]; then
echo "$0: error: amule not installed"
exit 1
echo "no (amule not installed)"
else
if [ ! -e /tmp/amulesig.dat ]; then
echo "$0: error: amulesig.dat not found"
echo "no (amulesig.dat not found)"
else
echo yes
exit 0
fi
fi
exit 0
fi
if [ "$1" = "config" ]; then

View file

@ -28,16 +28,15 @@
if [ "$1" = "autoconf" ]; then
if [ -z "$(which amule)" ]; then
echo "$0: error: amule not installed"
exit 1
echo "no (amule not installed)"
else
if [ ! -e /tmp/amulesig.dat ]; then
echo "$0: error: amulesig.dat not found"
echo "no (amulesig.dat not found)"
else
echo yes
exit 0
fi
fi
exit 0
fi
if [ "$1" = "config" ]; then

View file

@ -28,16 +28,15 @@
if [ "$1" = "autoconf" ]; then
if [ -z "$(which amule)" ]; then
echo "$0: error: amule not installed"
exit 1
echo "no (amule not installed)"
else
if [ ! -e /tmp/amulesig.dat ]; then
echo "$0: error: amulesig.dat not found"
echo "no (amulesig.dat not found)"
else
echo yes
exit 0
fi
fi
exit 0
fi
if [ "$1" = "config" ]; then

View file

@ -42,7 +42,7 @@ my %chars = (
if (exists $ARGV[0] and $ARGV[0] eq "autoconf") {
if ($ret) {
print "no ($ret)\n";
exit 1;
exit 0;
}
my $ua = LWP::UserAgent->new(timeout => 30);
my @badports;
@ -55,7 +55,7 @@ if (exists $ARGV[0] and $ARGV[0] eq "autoconf") {
if (@badports) {
print "no (no apache server-status on ports @badports)\n";
exit 1;
exit 0;
} else {
print "yes\n";
exit 0;

0
plugins/apache/apache_average_time_last_n_requests Normal file → Executable file
View file

0
plugins/apache/apache_byprojects/byprojects_access Normal file → Executable file
View file

0
plugins/apache/apache_byprojects/byprojects_bandwidth Normal file → Executable file
View file

View file

View file

@ -1,69 +0,0 @@
#!/bin/sh
# -*- sh -*-
: << =cut
=head1 NAME
apache_memmory -Indicate the medium size of all the apache child process
=head1 CONFIGURATION
[apache_*]
env.apuser user_running_apache
env.binname apache_binary_name
=head1 AUTHOR
Ricardo Fraile <rfrail3@yahoo.es>
=head1 LICENSE
GPLv2
=head1 MAGICK MARKERS
#%# family=auto
#%# capabilities=autoconf
=cut
. $MUNIN_LIBDIR/plugins/plugin.sh
USR=$apuser
PROCS=$binname
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo 'graph_title Medium size of apache child process.'
echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel Kb'
echo 'graph_scale no'
echo 'graph_category webserver'
echo 'graph_info Indicate the memdium size of all the apache child process.'
echo "servers.label servers"
echo "servers.type GAUGE"
echo "servers.min 0"
exit 0
fi
VAL1=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | wc -l`
VAL2=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | awk '{s+=$6} END {print s}'`
VAL3=`expr $VAL2 / $VAL1`
echo "servers.value $VAL3"

66
plugins/apache/apache_memory Executable file
View file

@ -0,0 +1,66 @@
#!/bin/sh
# -*- sh -*-
: << =cut
=head1 NAME
apache_memory - Indicate the medium size of all the apache child process
=head1 CONFIGURATION
[apache_*]
env.apuser user_running_apache (default: "www-data")
env.binname apache_binary_name (default: "apache2")
=head1 AUTHOR
Ricardo Fraile <rfrail3@yahoo.es>
=head1 LICENSE
GPLv2
=head1 MAGICK MARKERS
#%# family=auto
#%# capabilities=autoconf
=cut
. "$MUNIN_LIBDIR/plugins/plugin.sh"
USR=${apuser:-www-data}
PROCS=${binname:-apache2}
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo 'graph_title Average size of apache child processes'
echo 'graph_args --base 1024 -l 0 '
echo 'graph_vlabel Bytes'
echo 'graph_scale no'
echo 'graph_category webserver'
echo 'graph_info Indicate the memdium size of all the apache child process.'
echo "servers.label servers"
echo "servers.type GAUGE"
echo "servers.min 0"
exit 0
fi
matched_processes=$(ps auxf | grep -- "$PROCS" | grep "^$USR" | grep -v grep)
if [ -n "$matched_processes" ]; then
average_memory=$(printf '%s' "$matched_processes" | awk '{count+=1; sum+=$6} END {print sum / count * 1024}')
else
average_memory="U"
fi
echo "servers.value $average_memory"

View file

@ -5,13 +5,13 @@
=head1 NAME
apache_servers -Indicate the number of apache servers running (child process)
apache_servers - Indicate the number of apache servers running (child process)
=head1 CONFIGURATION
[apache_*]
env.apuser user_runnin_apache
env.binname apache_binary_name
env.apuser user_running_apache (default: "www-data")
env.binname apache_binary_name (default: "apache2")
=head1 AUTHOR
@ -28,10 +28,10 @@ GPLv2
=cut
. $MUNIN_LIBDIR/plugins/plugin.sh
. "$MUNIN_LIBDIR/plugins/plugin.sh"
USR=$apuser
PROCS=$binname
USR=${apuser:-www-data}
PROCS=${binname:-apache2}
if [ "$1" = "autoconf" ]; then
echo yes
@ -40,25 +40,20 @@ fi
if [ "$1" = "config" ]; then
echo 'graph_title Number of apache servers running.'
echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel servers'
echo 'graph_scale no'
echo 'graph_category webserver'
echo 'graph_info Indicate the number of apache servers running (child process).'
echo 'graph_title Number of apache servers running'
echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel servers'
echo 'graph_scale no'
echo 'graph_category webserver'
echo 'graph_info Indicate the number of apache servers running (child process).'
echo "servers.label servers"
echo "servers.type GAUGE"
echo "servers.min 0"
echo "servers.info Number of apache processes"
echo "servers.label servers"
echo "servers.type GAUGE"
echo "servers.min 0"
echo "servers.info I/O on nfs"
exit 0
exit 0
fi
VAL1=`ps auxf | grep ${PROCS} | grep ^${USR} | grep -v grep | wc -l`
echo "servers.value $VAL1"
process_count=$(ps auxf | grep -- "$PROCS" | grep "^$USR" | grep -v grep | wc -l)
echo "servers.value $process_count"

View file

@ -37,7 +37,7 @@ if (!eval "require Linux::Smaps;") {
my $PNAME = exists $ENV{'pname'} ? $ENV{'pname'} : "httpd";
my $PUSER = exists $ENV{'puser'} ? $ENV{'puser'} : "apache";
if (defined(@ARGV) && ($ARGV[0] eq 'config')) {
if (@ARGV && ($ARGV[0] eq 'config')) {
print "graph_title Apache Smaps\n";
print "graph_args --base 1024 -l 0\n";
print "graph_vlabel Bytes\n";

View file

@ -81,8 +81,3 @@ done
echo "threads.value `echo $((SUM / $COUNT))`"

View file

@ -5,12 +5,13 @@
=head1 NAME
apache_tmemmory -Indicate the total memory used by apache
apache_tmemmory - Indicate the total memory used by apache
=head1 CONFIGURATION
[apache_*]
env.binname apache_binary_name
env.apuser user_running_apache (default: "www-data")
env.binname apache_binary_name (default: "apache2")
=head1 AUTHOR
@ -27,38 +28,32 @@ GPLv2
=cut
. $MUNIN_LIBDIR/plugins/plugin.sh
. "$MUNIN_LIBDIR/plugins/plugin.sh"
USR=$apuser
PROCS=$binname
USR=${apuser:-www-data}
PROCS=${binname:-apache2}
if [ "$1" = "autoconf" ]; then
echo yes
exit 0
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo 'graph_title Total memory used by apache'
echo 'graph_args --base 1000 -l 0 '
echo 'graph_vlabel Mb'
echo 'graph_scale no'
echo 'graph_category webserver'
echo 'graph_info Indicate the total memory used by apache.'
echo 'graph_title Total memory used by apache'
echo 'graph_args --base 1024 -l 0 '
echo 'graph_vlabel bytes'
echo 'graph_scale no'
echo 'graph_category webserver'
echo 'graph_info Indicate the total memory used by apache.'
echo "servers.label servers"
echo "servers.type GAUGE"
echo "servers.min 0"
echo "servers.label servers"
echo "servers.type GAUGE"
echo "servers.min 0"
exit 0
exit 0
fi
VAL1=`ps auxf | grep ${PROCS} | grep -v grep | awk '{s+=$6} END {print s}'`
VAL2=`expr $VAL1 / 1024`
echo "servers.value $VAL2"
total_memory=$(ps auxf | grep -- "$PROCS" | grep "^$USR" | grep -v grep | awk '{s+=$6} END {print s * 1024}')
echo "servers.value $total_memory"

View file

@ -23,16 +23,13 @@ then
if ! ls $ACCESSLOG > /dev/null
then
echo "no (could not find apache access log \"$ACCESSLOG\")"
exit 1
elif ! ls $DIRECTORY > /dev/null
then
echo "no (could not find munin plugins directory \"$DIRECTORY\")"
exit 2
else
echo "yes"
exit 0
fi
exit 0
fi
# ######################################################################################### INIT

2
plugins/apache/apache_vhosts/apache_logparser Normal file → Executable file
View file

@ -124,7 +124,7 @@ sub count {
if ($time) {
# microsec to millisec
$time=sprintf("%d",$time/1000);
$time=sprintf("%d",$time/1000);
# min/max execution time
$temp{$vpm}{'max_time'}=max($temp{$vpm}{'max_time'},$time) || 0;

2
plugins/apache/apache_vhosts/apache_pipelogger Normal file → Executable file
View 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;
}

0
plugins/apache/apache_vhosts/apache_vhosts Normal file → Executable file
View file

View file

@ -12,7 +12,7 @@
# Must be symlinked to what the graph should monitor. Run with --suggest
# to see valid targets - or just run munin-node-configure --shell
#
# Written by Bjørn Ruberg 2006-2007
# Written by Bjørn Ruberg 2006-2007
#
# Magic markers:
#%# family=auto
@ -39,7 +39,7 @@ my $type = "throughput";
if (exists $ARGV[0] and $ARGV[0] eq "autoconf") {
if ($ret) {
print "no ($ret)\n";
exit 1;
exit 0;
}
my $ua = LWP::UserAgent->new (timeout => 30);
my @badports;
@ -52,7 +52,7 @@ if (exists $ARGV[0] and $ARGV[0] eq "autoconf") {
if (@badports) {
print "no (no mod_watch exists on ports @badports)\n";
exit 1;
exit 0;
} else {
print "yes\n";
exit 0;

0
plugins/apache/page_load Normal file → Executable file
View file

View file

@ -1,71 +0,0 @@
#!/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 sys import argv, exit
from os.path import walk, exists, isfile, join
def get_file_types():
"""Returns an array of filetype => count."""
out = {}
def visitor(arg, dirname, names):
for file in names:
if not isfile(join(dirname, file)):
continue
ext = file.split(".")[-1]
out[ext] = out.get(ext, 0) + 1
walk('/var/cache/approx/', visitor, None)
return out
# Autoconfiguration
if len(argv) > 1:
if argv[1] == "autoconf":
# Test if we can find a approx cache
if exists('/var/cache/approx'):
print "yes"
else:
print "no ('/var/cacne/approx' not found)"
exit(1)
exit()
elif argv[1] == "config":
print "graph_title Approx cache";
print "graph yes";
#print "graph_category Other";
#print "graph_total Total";
print "graph_info Statistics from the Approx cache.";
#print "debs.label DEBs";
#print "pending.warning 0:0";
#print "hold.label hold";
for type in get_file_types().keys():
print "%s.label %s" % (type.lower(), type)
exit()
for type, count in get_file_types().iteritems():
print "%s.value %d" % (type.lower(), count)
exit()

64
plugins/apt/approx Executable file
View 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()

View file

@ -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]

View file

@ -84,7 +84,7 @@ def Property(func):
class Apt(object):
"""
lazy helperclass i need in this statisticprogram, which have alle the apt_pkg stuff
lazy helperclass i need in this statisticprogram, which has all the apt_pkg stuff
"""
def __init__(self):
@ -575,7 +575,7 @@ class PacketHandler(object):
def adder(self, package, packageStat, *args, **kwords):
"""
take the package and add it tho the packageStat dictionary in defined way
take the package and add it to the packageStat dictionary in defined way
"""
pass
@ -868,7 +868,7 @@ deb_packages - plugin to monitor update resources and pending packages on Debian
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.
=head1 DESCRIPTION
@ -895,7 +895,7 @@ 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
=back
@ -910,7 +910,7 @@ Verify the installation by
=head1 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

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

View file

@ -1,41 +0,0 @@
#!/bin/sh
#
# Plugin to monitor total ARP entries
#
# Parameters understood:
#
# config (required)
# autoconf (optional)
#
# Made by Sven Hartge (sven AT svenhartge DOT de)
#
#%# family=contrib
#%# capabilities=autoconf
if [ "$1" = "autoconf" ]; then
# Search for arp
which arp >/dev/null 2>/dev/null || (echo "no (can't find arp binary)" && exit 1)
# ...or success
echo yes
exit 0
fi
if [ "$1" = "config" ]; then
echo 'graph_title ARP entries'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel Entries'
echo 'graph_category network'
echo 'graph_scale no'
echo 'graph_info This graph shows the number of ARP entries registered by the system.'
echo 'entries.label ARP entries'
echo 'entries.draw LINE2'
echo 'entries.type GAUGE'
echo 'entries.info Number of ARP entries'
exit 0
fi
arp -an | awk 'BEGIN { regex="<incomplete>";} { if (!match($4,regex)) { a[$4] }} END{for(i in a){n++};print "entries.value " n}'

View file

@ -19,13 +19,11 @@
case "$1" in
autoconf)
# Search for ip
which ip >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "no (can't find ip binary)"
exit 1
if which ip >/dev/null; then
echo 'yes'
else
echo "no (missing 'ip' executable)"
fi
# ...or success
echo 'yes'
exit 0
;;
suggest)

0
plugins/arp/arp_bsd_ Normal file → Executable file
View file

View file

@ -30,7 +30,7 @@ my $version = "1.0"; # UA Version
my $agentname = "$pluginname Munin Plugin V$version"; # UA String
my $url = "http://localhost:55553/"; # (defaults to localhost)
my $response = 0; # the server output
my @content = (); # the content we're retrive from $response
my @content = (); # the content we retrieve from $response
my %index = ( # for Version 2
'from' => 40, # <-- index frame from ( a tweak for other ASSP Versions )
'to' => 63 # <-- index frame to ( "" )
@ -66,7 +66,7 @@ my @muninlabel = (
);
# ============= SANITY CHECKS ================
unless( defined(@ARGV) ){
unless( @ARGV ){
$ARGV[0] = "";
}

View file

@ -30,7 +30,7 @@ my $version = "1.0"; # UA Version
my $agentname = "$pluginname Munin Plugin V$version"; # UA String
my $url = "http://localhost:55553/"; # (defaults to localhost)
my $response = 0; # the server output
my @content = (); # the content we're retrive from $response
my @content = (); # the content we retrieve from $response
my %index = ( # for Version 2
'from' => 2, # <-- index frame from ( a tweak for other ASSP Versions )
'to' => 4 # <-- index frame to ( "" )
@ -46,7 +46,7 @@ my @muninlabel = ( # General Runtime Information
);
# ============= SANITY CHECKS ================
unless( defined(@ARGV) ){
unless( @ARGV ){
$ARGV[0] = "";
}

View file

@ -17,23 +17,23 @@ use LWP;
use Mail::Sendmail;
# -------------------------- DEBUG VARS ---------------------------------
my $DEBUG = 0; # for debugging purpose
my $EMAILDEBUG = 0; # for email debugging
my $pluginname = &basename( "$0" ); # get the basename of the plugin
my @to = qw( webmaster@bguel.info ); # the list of admins receivced messages on an
my $from = "$pluginname-at-host\@guel.info"; # the host from where it comes
my $muninnodename = "mail.guel.info"; # the Node from where it comes
my $smtp = "mail.guel.info"; # the smtp relay to send the mail
my $DEBUG = 0; # for debugging purpose
my $EMAILDEBUG = 0; # for email debugging
my $pluginname = &basename( "$0" ); # get the basename of the plugin
my @to = qw( webmaster@bguel.info ); # the list of admins receivced messages on an
my $from = "$pluginname-at-host\@guel.info"; # the host from where it comes
my $muninnodename = "mail.guel.info"; # the Node from where it comes
my $smtp = "mail.guel.info"; # the smtp relay to send the mail
# ------------------------- GLOBAL VARS ---------------------------------
my $version = "1.0"; # UA Version
my $agentname = "$pluginname Munin Plugin V$version"; # UA String
my $url = "http://localhost:55553/"; # (defaults to localhost)
my $response = 0; # the server output
my @content = (); # the content we're retrive from $response
my $version = "1.0"; # UA Version
my $agentname = "$pluginname Munin Plugin V$version"; # UA String
my $url = "http://localhost:55553/"; # (defaults to localhost)
my $response = 0; # the server output
my @content = (); # the content we retrieve from $response
my %index = ( # for Version 2
'from' => 66, # <-- index frame from ( a tweak for other ASSP Versions )
'to' => 100 # <-- index frame to ( "" )
'from' => 66, # <-- index frame from ( a tweak for other ASSP Versions )
'to' => 100 # <-- index frame to ( "" )
);
@ -78,7 +78,7 @@ my @muninlabel = (
);
# ============= SANITY CHECKS ================
unless( defined(@ARGV) ){
unless( @ARGV ){
$ARGV[0] = "";
}

View file

@ -30,7 +30,7 @@ my $version = "1.0"; # UA Version
my $agentname = "$pluginname Munin Plugin V$version"; # UA String
my $url = "http://localhost:55553/"; # (defaults to localhost)
my $response = 0; # the server output
my @content = (); # the content we're retrive from $response
my @content = (); # the content we retrieve from $response
my %index = ( # for Version 2
'from' => 25, # <-- index frame from ( a tweak for other ASSP Versions )
'to' => 38 # <-- index frame to ( "" )
@ -56,7 +56,7 @@ my @muninlabel = (
);
# ============= SANITY CHECKS ================
unless( defined(@ARGV) ){
unless( @ARGV ){
$ARGV[0] = "";
}

View file

@ -30,7 +30,7 @@ my $version = "1.0"; # UA Version
my $agentname = "$pluginname Munin Plugin V$version"; # UA String
my $url = "http://localhost:55553/"; # (defaults to localhost)
my $response = 0; # the server output
my @content = (); # the content we're retrive from $response
my @content = (); # the content we retrieve from $response
my %index = ( # for Version 2
'from' => 4, # <-- index frame from ( a tweak for other ASSP Versions )
'to' => 5 # <-- index frame to ( "" )
@ -46,7 +46,7 @@ my @muninlabel = ( # General Runtime Information
);
# ============= SANITY CHECKS ================
unless( defined(@ARGV) ){
unless( @ARGV ){
$ARGV[0] = "";
}

View file

@ -16,8 +16,11 @@ This plugin will produce multiple graphs showing:
- the number of messages in all voicemail boxes (replaces
asterisk_voicemail);
- the number of active MeetMe conferences and users connected to them
(replace asterisk_meetme and asterisk_meetmeusers, respectively);
- DEPRECATED: the number of active MeetMe conferences and users connected to
them (replace asterisk_meetme and asterisk_meetmeusers, respectively);
- the number of active ConfBridge conferences (e.g. non-empty ones) and users
connected to them
- the number of active channels for a given codec, for both SIP and
IAX2 channels (replaces asterisk_sipchannels and asterisk_codecs).
@ -27,13 +30,15 @@ This plugin will produce multiple graphs showing:
The following configuration parameters are used by this plugin
[asterisk]
env.host - hostname to connect to
env.port - port number to connect to
env.username - username used for authentication
env.secret - secret used for authentication
env.channels - The channel types to look for
env.codecsx - List of codec IDs (hexadecimal values)
env.codecs - List of codecs names, matching codecsx order
env.host - hostname to connect to
env.port - port number to connect to
env.username - username used for authentication
env.secret - secret used for authentication
env.channels - The channel types to look for
env.codecsx - List of codec IDs (hexadecimal values)
env.codecs - List of codecs names, matching codecsx order
env.enable_meetme - Set to 1 to enable graphs for the MeetMe application
env.enable_confbridge - Set to 1 to enable graphs for the ConfBridge application
The "username" and "secret" parameters are mandatory, and have no
defaults.
@ -46,6 +51,8 @@ defaults.
env.channels Zap IAX2 SIP
env.codecsx 0x2 0x4 0x8
env.codecs gsm ulaw alaw
env.enable_meetme 0
env.enable_confbridge 1
=head2 WILDCARD CONFIGURATION
@ -77,30 +84,34 @@ use strict;
use Munin::Plugin;
use IO::Socket;
# See the following and its subpages for change history in the AMI protocol:
# https://wiki.asterisk.org/wiki/display/AST/Asterisk+Manager+Interface+%28AMI%29+Changes
sub asterisk_command {
my ($socket, $command) = @_;
my $line, my $reply;
$socket->print("Action: command\nCommand: $command\n\n");
# Response: (Error|Follows|???)
# Response: (Error|Follows|Success)
$line = $socket->getline;
if ($line !~ /^Response: Follows\r?\n$/) {
while ( $line = $socket->getline and $line !~ /^\r?\n$/ ) {}
if ($line !~ /^Response: Success\r?\n$/) {
while ( $line = $socket->getline and $line !~ /^\r?\n$/ ) {
print STDERR "COMMAND: Ignoring unwanted line: $line" if $Munin::Plugin::DEBUG;
}
return undef;
}
# Privilege: Command
# Message: Command output follows
$line = $socket->getline;
print STDERR "COMMAND got response: $line" if $Munin::Plugin::DEBUG;
# Until we get the --END COMMAND-- marker, it's the command's output.
while ( $line = $socket->getline and $line !~ /^--END COMMAND--\r?\n$/ ) {
while ( $line = $socket->getline and $line =~ /^Output:/ ) {
print STDERR "COMMAND: got response: $line" if $Munin::Plugin::DEBUG;
# Don't keep the "Output: " part of the response
substr($line, 0, 8, '');
$reply .= $line;
}
# And then wait for the empty line that says we're done
while ( $line = $socket->getline and $line !~ /^\r?\n$/ ) {}
return $reply;
}
@ -117,10 +128,13 @@ my @CHANNELS = exists $ENV{'channels'} ? split ' ',$ENV{'channels'} : qw(Zap IAX
my @CODECS = exists $ENV{'codecs'} ? split ' ',$ENV{'codecs'} : qw(gsm ulaw alaw);
my @CODECSX = exists $ENV{'codecsx'} ? split ' ',$ENV{'codecsx'} : qw(0x2 0x4 0x8);
my $meetme_enabled = $ENV{'enable_meetme'} || '0';
my $confbridge_enabled = $ENV{'enable_confbridge'} || '1';
my $line, my $error;
my $socket = new IO::Socket::INET(PeerAddr => $peeraddr,
PeerPort => $peerport,
Proto => 'tcp')
PeerPort => $peerport,
Proto => 'tcp')
or $error = "Could not create socket: $!";
if ( $socket ) {
@ -177,7 +191,8 @@ graph_category voip
total.label Total messages
END
print <<END;
if ($meetme_enabled == '1') {
print <<END;
multigraph asterisk_meetme
graph_title Asterisk meetme statistics
@ -186,11 +201,24 @@ graph_category voip
users.label Connected users
conferences.label Active conferences
END
}
if ($confbridge_enabled == '1') {
print <<END;
multigraph asterisk_confbridge
graph_title Asterisk ConfBridge statistics
graph_args --base 1000 -l 0
graph_category voip
users.label Connected users
conferences.label Active conferences
END
}
print <<END;
multigraph asterisk_codecs
graphs_title Asterisk channels per codec
graph_title Asterisk channels per codec
graph_args --base 1000 -l 0
graph_vlabel channels
graph_category voip
@ -206,7 +234,7 @@ END
print <<END;
other.draw AREASTACK
other.label Other known codecs
unknwon.draw AREASTACK
unknown.draw AREASTACK
unknown.label Unknown codec
END
@ -221,7 +249,7 @@ die $error if $error;
my $channels_response = asterisk_command($socket, "core show channels");
#Channel Location State Application(Data)
#Zap/pseudo-198641660 s@frompstn:1 Rsrvd (None)
#Zap/1-1 4@frompstn:1 Up MeetMe(5500)
#Zap/1-1 4@frompstn:1 Up ConfBridge(5500)
#2 active channels
#1 active call
@ -231,19 +259,30 @@ my $voicemail_response = asterisk_command($socket, "voicemail show users");
#other 1234 Company2 User 0
#2 voicemail users configured.
my $meetme_response = asterisk_command($socket, "meetme list");
#Conf Num Parties Marked Activity Creation
#5500 0001 N/A 00:00:03 Static
#* Total number of MeetMe users: 1
my $meetme_response;
if ($meetme_enabled eq '1') {
$meetme_response = asterisk_command($socket, "meetme list");
#Conf Num Parties Marked Activity Creation
#5500 0001 N/A 00:00:03 Static
#* Total number of MeetMe users: 1
}
my $confbridge_response;
if ($confbridge_enabled eq '1') {
$confbridge_response = asterisk_command($socket, "confbridge list");
#Conference Bridge Name Users Marked Locked Muted
#================================ ====== ====== ====== =====
#3 1 0 No No
}
my $sipchannels_response = asterisk_command($socket, "sip show channels");
#Peer User/ANR Call ID Seq (Tx/Rx) Format
#192.168.1.135 yann 6902112b3e0 00101/00002 g729
#Peer User/ANR Call ID Format Hold Last Message Expiry Peer
#192.168.1.135 yann 1341929961-161 00101/00002 No Rx: INVITE g729
#1 active SIP channel(s)
my $iaxchannels_response = asterisk_command($socket, "iax2 show channels");
#Channel Peer Username ID (Lo/Rem) Seq (Tx/Rx) Lag Jitter JitBuf Format
#IAX2/rodolphe@rodolp 10.8.53.6 rodolphe 00003/01287 00006/00004 00000ms 0148ms 0000ms gsm
#Channel Peer Username ID (Lo/Rem) Seq (Tx/Rx) Lag Jitter JitBuf Format FirstMsg LastMsg
#IAX2/rodolphe@rodolp 10.8.53.6 rodolphe 00003/01287 00006/00004 00000ms 0148ms 0000ms gsm Rx:NEW Tx:ACK
#1 active IAX channel(s)
# After all the data is fetched we can proceed to process it, the
@ -279,26 +318,57 @@ if ( !$voicemail_response or $voicemail_response =~ /no voicemail users/ ) {
print "total.value $messages\n";
}
print "\nmultigraph asterisk_meetme\n";
if ( !$meetme_response ) {
print <<END;
if ($meetme_enabled == '1') {
print "\nmultigraph asterisk_meetme\n";
if ( !$meetme_response ) {
print <<END;
users.value U
conferences.value U
END
} else {
if ( $meetme_response =~ /No active/ ) {
print <<END;
} else {
if ( $meetme_response =~ /No active/ ) {
print <<END;
users.value 0
conferences.value 0
END
} else {
my @meetme_list = split(/\r?\n/, $meetme_response);
} else {
my @meetme_list = split(/\r?\n/, $meetme_response);
my $users = pop(@meetme_list);
$users =~ s/^Total number of MeetMe users: ([0-9]+)$/$1/;
my $users = pop(@meetme_list);
$users =~ s/^Total number of MeetMe users: ([0-9]+)$/$1/;
print "users.value $users\n";
print "conferences.value " . (scalar(@meetme_list)-1) . "\n";
}
}
}
if ($confbridge_enabled == '1') {
print "\nmultigraph asterisk_confbridge\n";
if ( !$confbridge_response ) {
print <<END;
users.value U
conferences.value U
END
} else {
my @confbridge_list = split(/\r?\n/, $confbridge_response);
# Remove column headers, then line of =
shift(@confbridge_list);
shift(@confbridge_list);
my $users = 0;
foreach my $bridge (@confbridge_list) {
my @fields = split ' ', $bridge;
# yes we ARE parsing a command's output. if we end up getting some
# unexpected things, just break out to and avoid computing nonsense.
if (scalar(@fields) < 5 or $fields[1] !~ /^[0-9]+$/) {
last;
}
$users += $fields[1];
}
print "users.value $users\n";
print "conferences.value " . (scalar(@meetme_list)-1) . "\n";
print "conferences.value " . (scalar(@confbridge_list)) . "\n";
}
}
@ -309,7 +379,7 @@ if ( !$sipchannels_response and !$iaxchannels_response ) {
}
print <<END;
other.value U
unknown.valeu U
unknown.value U
END
} else {
my @results;
@ -335,9 +405,9 @@ END
}
foreach my $codec (@CODECSX) {
if ($fields[4] eq "$codec") {
$results[$i] = $results[$i] + 1;
$found = 1;
last;
$results[$i] = $results[$i] + 1;
$found = 1;
last;
}
$i++;
}
@ -358,9 +428,9 @@ END
}
foreach my $codec (@CODECS) {
if ($fields[8] eq "$codec") {
$results[$i] = $results[$i] + 1;
$found = 1;
last;
$results[$i] = $results[$i] + 1;
$found = 1;
last;
}
$i++;
}

View file

@ -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 other\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 );

View file

@ -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 other\n";
print "graph_category voip\n";
print "cancelled.draw AREA\n";
print "cancelled.label Cancelled Faxes\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "sessions.draw AREA\n";
print "sessions.label Current Sessions\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "failed.draw AREA\n";
print "failed.label Failed faxes\n";
print "completed.draw AREA\n";

View file

@ -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 other\n";
print "graph_category voip\n";
print "iofail.draw AREA\n";
print "iofail.label IO Failures\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "iopartial.draw AREA\n";
print "iopartial.label IO Partial\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "channels.draw AREA\n";
print "channels.label Licensed Channels\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "maxsessions.draw AREA\n";
print "maxsessions.label Sessions\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "failed.draw AREA\n";
print "failed.label Negotiations Failed\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "nofax.draw AREA\n";
print "nofax.label Number of No Faxes\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "partial.draw AREA\n";
print "partial.label Partial Faxes\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "proterror.draw AREA\n";
print "proterror.label Protocol Errors\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "success.draw AREA\n";
print "success.label successful tx\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "switched.draw AREA\n";
print "switched.label Switches to T.38\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "failure.draw AREA\n";
print "failure.label Train Failures\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "transmit.draw AREA\n";
print "transmit.label Tx Attempts\n";
print "receive.draw AREA\n";

View file

@ -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 other\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 );

View file

@ -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 other\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";

View file

@ -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 other\n";
print "graph_category voip\n";
print "channels.draw AREA\n";
print "channels.label channels\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "sessions.draw AREA\n";
print "sessions.label Current Sessions\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "failed.draw AREA\n";
print "failed.label Failed faxes\n";
print "completed.draw AREA\n";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -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 other\n";
print "graph_category voip\n";
print "switched.draw AREA\n";
print "switched.label Switched to T.38\n";
exit 0;

View file

@ -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 other\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";

View file

@ -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 other\n";
print "graph_category voip\n";
print "transmit.draw AREA\n";
print "transmit.label Tx Attempts\n";
print "receive.draw AREA\n";

View file

@ -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 other\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";

View file

@ -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 other\n";
print "graph_category voip\n";
print "sessions.draw AREA\n";
print "sessions.label Current Sessions\n";
exit 0;

View file

@ -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 other\n";
print "graph_category voip\n";
print "failed.draw AREA\n";
print "failed.label Failed faxes\n";
print "completed.draw AREA\n";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -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 other\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";

View file

@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
print "graph_title Asterisk Fax - Retries Exceeded (T.38 and G.711)\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel Retries Exceeded\n";
print "graph_category other\n";
print "graph_category voip\n";
print "t38_retries.draw AREA\n";
print "t38_retries.label T.38 Retries Exceeded\n";
print "g711_retries.draw AREA\n";

View file

@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
print "graph_title Asterisk Fax - Rx and Tx 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 other\n";
print "graph_category voip\n";
print "t38_rx_proterror.draw AREA\n";
print "t38_rx_proterror.label T.38 Rx Protocol Errors\n";
print "t38_tx_proterror.draw AREA\n";

View file

@ -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 other\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";

View file

@ -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 other\n";
print "graph_category voip\n";
print "switched.draw AREA\n";
print "switched.label Switched to T.38\n";
exit 0;

View file

@ -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 other\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";

View file

@ -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 other\n";
print "graph_category voip\n";
print "transmit.draw AREA\n";
print "transmit.label Tx Attempts\n";
print "receive.draw AREA\n";

View file

@ -85,7 +85,7 @@ address with the copyright notice upgrade with your name.
print "graph_title Asterisk Fax - Unknown Errors (T.38 and G.711)\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel Number of Unknown Errors\n";
print "graph_category other\n";
print "graph_category voip\n";
print "t38_errors.draw AREA\n";
print "t38_errors.label T.38 Unknown Errors\n";
print "g711_errors.draw AREA\n";

View file

@ -11,15 +11,13 @@ if [ "$1" = "autoconf" ]; then
asterisk -rx 'sip show inuse' > /dev/null
if [ $? = "0" ]; then
echo yes
exit 0
else
echo no
exit 1
fi
else
echo no
exit 1
fi
exit 0
fi
if [ "$1" = "config" ]; then

View file

@ -7,7 +7,7 @@
# config (required)
# autoconf (optional - used by munin-config)
#
# Magick markers (optional - used by munin-config and som installation
# Magick markers (optional - used by munin-config and some installation
# scripts):
#%# family=auto
#%# capabilities=autoconf

Some files were not shown because too many files have changed in this diff Show more