mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-08-02 22:28:24 +00:00
organize asterisk plugins
untar asterisk-fax and move asterisk-multigraph-munin-plugin
This commit is contained in:
parent
05ce4b8d87
commit
c33bbb90e5
53 changed files with 6292 additions and 0 deletions
42
plugins/asterisk/asterisk_14_fax_ffa/fax_test
Executable file
42
plugins/asterisk/asterisk_14_fax_ffa/fax_test
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use Carp;
|
||||
use strict;
|
||||
use Asterisk::AMI;
|
||||
do './get_fax_stats.pl';
|
||||
|
||||
my $ret = undef;
|
||||
if ( ! eval "require Asterisk::AMI;" ) {
|
||||
$ret = "Asterisk::AMI not found";
|
||||
};
|
||||
|
||||
if ( $ARGV[ 0 ] and $ARGV[ 0 ] eq "config" ) {
|
||||
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 "channels.draw AREA\n";
|
||||
print "channels.label channels\n";
|
||||
exit 0;
|
||||
};
|
||||
|
||||
#my $host = exists $ENV{ 'host' } ? $ENV{ 'host' } : "127.0.0.1";
|
||||
#my $port = exists $ENV{ 'port' } ? $ENV{ 'port' } : "5038";
|
||||
#my $username = $ENV{ 'username' };
|
||||
#my $secret = $ENV{ 'secret' };
|
||||
|
||||
our $username = 'manager';
|
||||
our $host = '127.0.0.1';
|
||||
our $port = '5038';
|
||||
our $secret = 'insecure';
|
||||
our $timeout = '5';
|
||||
|
||||
my %faxstats = get_fax_stats();
|
||||
|
||||
my $channels = $faxstats{'Digium G.711'}{'Licensed Channels'};
|
||||
print "channels.value $channels\n";
|
||||
|
||||
exit( 0 );
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue