Was this page helpful?

Asterisk Monitoring (監控)

    其他小秘訣

    [perl] 顯示目前的 concurrent channels 數量

    show-channels.pl:

    #!/usr/bin/perl -w
    use strict;
    open(LINE, 'asterisk -rx "core show channels"|');
    my ($chans, $calls, $line)=(0,0,undef);
    while ($line = <LINE>)
    {
        $calls = $1 if ($line =~ /^(\d+) active call/);
    }
    close(LINE);
    printf $calls;
    [bash] 檢查 Trunk 註冊狀態,異常時發出 email

    附檔:trunkcheck.sh

    [Perl] 檢查 Trunk 狀態,異常時發出郵件

    附檔:trunkalert.pl

    Was this page helpful?
    標籤 (Edit tags)
    • No tags

    文件 3

    文件大小日期附件上傳者 
     trunkalert.pl
    Trunk Alert
    5.53 KB18:08, 16 Feb 2015alang動作
     trunkcheck.sh
    Trunk Check
    1622 位元14:14, 3 Mar 2014alang動作
     xymon_asterisk_dahdi.sh
    Monitor TDM
    4.29 KB10:43, 22 Aug 2015alang動作
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core