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
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core