[asterisk-users] Monitoring
federico fetto
federico at egwn.net
Wed Nov 19 10:31:24 CST 2008
Hi Jon,
Imo is better if you "tag" all possible states
differently than "ok" with a warning/error msg.
Example: unknown $checkPRI output.
Bye
Federico
On Wed, 19 Nov 2008 10:10:30 -0500
"Jon Weisman" <jweisman at ibell.net> wrote:
> is this for php?
>
>
> ----- Original Message -----
> From: "federico fetto" <federico at egwn.net>
> To: <asterisk-users at lists.digium.com>
> Sent: Wednesday, November 19, 2008 8:41 AM
> Subject: Re: [asterisk-users] Monitoring
>
>
> > On Wed, 19 Nov 2008 15:17:50 +0200
> > "Hakan C" <ella4ever at gmail.com> wrote:
> >
> >> Hey Jon,
> >>
> >> You are asking something too specific.
> >> If you want to monitor your PRI, its not so difficult to script.
> >>
> >> <?
> >> $checkPRI = exec("asterisk -rx 'pri show spans'");
> >> if (ereg('/^Down/', $checkPRI, $match) {
> >> echo "OMG, someone call the ambulance\r\n";
> >> echo $match;
> >> } else {
> >> echo "working...";
> >> }
> >> ?>
> >
> > Or better (imo):
> > <?
> > $checkPRI = exec("asterisk -rx 'pri show spans'");
> > if (ereg('/^Up/', $checkPRI, $match) {
> > echo "working...";
> > } else {
> > echo "OMG, someone call the ambulance\r\n";
> > echo $match;
> > }
> > ?>
> >
> > Bye
> > Federico Fetto
> >
More information about the asterisk-users
mailing list