Augie Schwer | 2 Apr 2009 00:48
Picon
Gravatar

SIP / Asterisk monitoring

Anyone have some tips/tricks/tools for monitoring Asterisk with Mon?

--

-- 
Augie Schwer    -    Augie <at> Schwer.us    -    http://schwer.us
Key fingerprint = 9815 AE19 AFD1 1FE7 5DEE 2AC3 CB99 2784 27B0 C072
Alain | 2 Apr 2009 02:13

unidentified output from fping

Hello,

Firstly, many thanks for mon, it's really really great!

Have a small curiosity. I converted two OSS Xen machines to Citrix
XenServer for a client, they've been getting alerts from mon similar
to:

        Summary output        : unusual errors

        Group                 : ping-servers
        Service               : ping
        Time noticed          : Tue Mar 31 12:47:50 2009
        Secs until next alert : 
        Members               : sls-xen1 sls-xen2 sls-xen3 sls-xen4

        Detailed text (if any) follows:
        -------------------------------

        start time: Tue Mar 31 12:47:18 2009
        end time  : Tue Mar 31 12:47:19 2009
        duration  : 1 seconds

        ------------------------------------------------------------------------------
        unusual errors
        ------------------------------------------------------------------------------
        unidentified output from fping: [sls-xen4 : duplicate for [0],
        84 bytes, 0.67 ms]

        ------------------------------------------------------------------------------
(Continue reading)

Jim Trocki | 2 Apr 2009 15:55

Re: monitoring snmp traps

On Tue, 31 Mar 2009, Mike Ireton wrote:

> running on the same host. The snmp traps received by snmptrapd get
> written to syslog where I have a process (syslog-ng / swatch) running to
> do primitive decoding of the messages and sending alerts under some

> 	I am no snmp guru but it seems that it should be possible and
> desireable for there to be many snmp trap receivers on the same host,
> each handling one or more subsets of the mib tree.

> 	My question simply is how might anyone suggest to handle multiple traps
> from different devices or is there something obvious in the net-snmp
> package that I've missed or perhaps a mon feature I could use for this
> purpose?

snmptrapd can be told to decode traps matching particular OIDs and send
them to an external program's stdin, or it can forward traps matching
some OIDs to another destination, on the same machine or elsewhere.
check out the man page for snmptrapd.conf, the "traphandle" and "forward"
settings.

you may be able to run a separate snmptrapd on the same host but listening on
a different port with a different configuration which uses "traphandle" to
call your mon-related trap processor, and the main snmptrapd would use the
"forward" config to send the work to the appropriate handler. this
would free up the main snmptrapd to handle other logging and forwarding
while allowing you to use multiple processes to handle the specific work.
Jim Trocki | 2 Apr 2009 16:02

Re: unidentified output from fping

On Wed, 1 Apr 2009, Alain wrote:

> I looked at fping.monitor from the latest distribution (mon-1.2.0) and
> see there's been a number of changes since the version I was using
> (0.99.2-13). Sure enough using this latest version of fping.monitor
> resolved them problem. However, I'm still curious what exactly the old
> fping.monitor saw that the new one doesn't? Any ideas?

the adjustment was to handle some extra icmp messages from routers which
indicate that a host was unreachable, rather than relying on just the timeout.
Jim Trocki | 3 Apr 2009 15:51

Re: monitoring snmp traps

On Thu, 2 Apr 2009, Jim Trocki wrote:

> snmptrapd can be told to decode traps matching particular OIDs and send
> them to an external program's stdin, or it can forward traps matching
> some OIDs to another destination, on the same machine or elsewhere.

i did a bit more poking around and discovered NetSNMP::TrapReceiver

NAME
        NetSNMP::TrapReceiver - Embedded perl trap handling for Net-SNMP's
        snmptrapd

ABSTRACT
        The NetSNMP::TrapReceiver module is used to register perl subroutines
        into the Net-SNMP snmptrapd process.

...

http://cpansearch.perl.org/src/HARDAKER/NetSNMP-TrapReceiver-5.0401/

"man NetSNMP::TrapReceiver" has a detailed example. it looks as if you
could write a simple perl routine which would look at the oid and then
convert a snmp trap into a mon trap, all from within the snmptrapd
process. that sounds like the beauty way to go.
John Giordano | 7 Apr 2009 19:42

How to fire off custom scripts after failover?


Greetings list!

We are using Mon and HA together to monitor to CentOS boxes running MySQL.

Failover works if I stop MySQL on the primary.

My question to the list is we have cooked up a little custom perl script to do things to our slave DB servers, etc once the VIP goes over to the secondary.  How do we tell mon to fire off this perl script once MySQL service dies on master/primary?

Just wondering what the best practice is here.

Thanks,

John G.

_______________________________________________
mon mailing list
mon <at> linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon

Gmane