[
[
[email protected]2016-06-29 17:55:15
Asterisk
[email protected], 2016-06-29 17:55:15

Asterisk monitoring not working with monit!?

I set up monitoring of the asterisk service and the use of the file system on several hosts.
monit conf contains:
check process asterisk with pidfile /var/run/asterisk/asterisk.pid
start program = "/etc/init.d/asterisk start" with timeout 60 seconds
stop program = "/etc/init.d/asterisk stop "
if failed host 127.0.0.1 port 5060 type udp protocol sip
with target "localhost:5060"
then alert
check host openser_all with address 93.190.240.70
if failed
port 5060 type udp protocol sip
with target "localhost:5060"
then alert
on multiple servers it works. but on one I get an error
[MSK Jun 29 17:28:14] error : 'asterisk' failed protocol test [SIP] at [127.0.0.1]:5060 [UDP/IP] -- SIP error: Server returned status 404
[MSK Jun 29 17:28 :14] error : 'openser_all' failed protocol test [SIP] at [93.190.240.70]:5060 [UDP/IP] -- SIP error: Server returned status 404
and it should be 200 OK
tell me how to fix this
OS
Linux aster-70 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2016-06-29
@Rsa97

SIP/2.0 404 Not found - the called subscriber was not found, there is no such SIP number SIP/2.0 404
Undefined Reason - undefined direction
SIP/2.0
there is no gateway in this direction, check the routing configuration in this direction.
Which of the 404 errors occurs in your case?

[
[email protected], 2016-06-30
@sinister_mole

tcpdump -i lo -nv port 5060
tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
10:04:42.151423 IP (tos 0x0, ttl 64, id 52648, offset 0, flags [DF], proto UDP(17), length 365)
127.0.0.1.48219 > 127.0.0.1.sip: SIP, length: 337
OPTIONS sip:localhost:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:48219;branch= z9hG4bKh1728758634;rport
Max-Forwards: 70
To:
From: monit ;tag=264065394
Call-ID: 58469665 CSeq
: 63104 OPTIONS
Contact:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question