Discussion:
Monitoring SipX 4.6 services
Jan Fricke
2012-09-03 08:19:59 UTC
Permalink
Hi,

until 4.4 I checked the state of the SipX services using sipxproc. What is
the best way to do that on 4.6?





_____________________________
Jan Fricke (B.Sc.)

*IANT -
APPLIED NGN-TECHNOLOGIES

**Turn-Key VoIP/UC Solutions and More...


*Fon: +49 (5331) 6794 0
Fax: +49 (5331) 6794 499
Mail: ***@iant.de
Web: www.iant.de <http://www.iant.de/en/startseite>


IANT is eZuce <http://www.ezuce.com/> Elite Partner for EMEA

IANT is Member of GROUPLINK <http://www.grouplink.de/>
George Niculae
2012-09-03 08:23:28 UTC
Permalink
Post by Jan Fricke
Hi,
until 4.4 I checked the state of the SipX services using sipxproc. What is
the best way to do that on 4.6?
Now you could use the Linux style, e.g. service sipxconfig status

George
Jan Fricke
2012-09-03 08:39:57 UTC
Permalink
And how do I automatically know which services should be running?

E.g. using sipxproc I knew status running is ok. Also Disabled is ok
(maybe the service is configured on another system of a HA system or it's
not necessary at all). Something else like Failed is not good.
Is there a way to check which services are assigned to the server from
bash so I can create a list of service I have to check with "service
servicename status"?

Jan

-----Ursprüngliche Nachricht-----
Von: sipx-users-***@list.sipfoundry.org
[mailto:sipx-users-***@list.sipfoundry.org] Im Auftrag von George
Niculae
Gesendet: Montag, 3. September 2012 10:23
An: Discussion list for users of sipXecs software
Betreff: Re: [sipx-users] Monitoring SipX 4.6 services
Post by Jan Fricke
Hi,
until 4.4 I checked the state of the SipX services using sipxproc.
What is the best way to do that on 4.6?
Now you could use the Linux style, e.g. service sipxconfig status

George
George Niculae
2012-09-03 09:00:29 UTC
Permalink
Post by Jan Fricke
And how do I automatically know which services should be running?
E.g. using sipxproc I knew status running is ok. Also Disabled is ok
(maybe the service is configured on another system of a HA system or it's
not necessary at all). Something else like Failed is not good.
Is there a way to check which services are assigned to the server from
bash so I can create a list of service I have to check with "service
servicename status"?
Right, there is nothing like the old sipxproc in place (at least yet).
All the services started / required by sipxecs on a cluster should be
listed by

/usr/share/sipxecs/cfmodules/sipx 1 | grep +

however mind that this will list other attributes that are not really services
e.g.
+primary
+ofconsole
+homer_db_rotate_enable
+homer_db_stats_enable

George
Jan Fricke
2012-09-03 12:23:14 UTC
Permalink
Thanks! I wrote a script that receives all services starting with sipx and
checks the service status for each. Maybe I'll add mongo, postgres and a
few other.

Any ideas why sipxfreeswitch has no status parameter (just start/stop)? Is
it enough to check freeswitch (service freeswitch status)?

Jan


-----Ursprüngliche Nachricht-----
Von: sipx-users-***@list.sipfoundry.org
[mailto:sipx-users-***@list.sipfoundry.org] Im Auftrag von George
Niculae
Gesendet: Montag, 3. September 2012 11:00
An: Discussion list for users of sipXecs software
Betreff: Re: [sipx-users] Monitoring SipX 4.6 services
Post by Jan Fricke
And how do I automatically know which services should be running?
E.g. using sipxproc I knew status running is ok. Also Disabled is ok
(maybe the service is configured on another system of a HA system or
it's not necessary at all). Something else like Failed is not good.
Is there a way to check which services are assigned to the server from
bash so I can create a list of service I have to check with "service
servicename status"?
Right, there is nothing like the old sipxproc in place (at least yet).
All the services started / required by sipxecs on a cluster should be
listed by

/usr/share/sipxecs/cfmodules/sipx 1 | grep +

however mind that this will list other attributes that are not really
services e.g.
+primary
+ofconsole
+homer_db_rotate_enable
+homer_db_stats_enable

George
George Niculae
2012-09-03 12:30:37 UTC
Permalink
Post by Jan Fricke
Thanks! I wrote a script that receives all services starting with sipx and
checks the service status for each. Maybe I'll add mongo, postgres and a
few other.
Any ideas why sipxfreeswitch has no status parameter (just start/stop)? Is
it enough to check freeswitch (service freeswitch status)?
Yes, that's correct, just check freeswitch status. On a side note,
mind that if you have multiple nodes in cluster you should use:

/usr/share/sipxecs/cfmodules/sipx {node_number} | grep +

1 it is always primary

George
Jan Fricke
2012-09-03 12:50:05 UTC
Permalink
Ok that leads to another question. How can a script query the node_number
of the system it is running on?
The script will send nagios passive checks from each node. Each node
should check its own services.

Jan

-----Ursprüngliche Nachricht-----
Von: sipx-users-***@list.sipfoundry.org
[mailto:sipx-users-***@list.sipfoundry.org] Im Auftrag von George
Niculae
Gesendet: Montag, 3. September 2012 14:31
An: Discussion list for users of sipXecs software
Betreff: Re: [sipx-users] Monitoring SipX 4.6 services
Post by Jan Fricke
Thanks! I wrote a script that receives all services starting with sipx
and checks the service status for each. Maybe I'll add mongo, postgres
and a few other.
Any ideas why sipxfreeswitch has no status parameter (just
start/stop)? Is it enough to check freeswitch (service freeswitch
status)?
Yes, that's correct, just check freeswitch status. On a side note, mind
that if you have multiple nodes in cluster you should use:

/usr/share/sipxecs/cfmodules/sipx {node_number} | grep +

1 it is always primary

George
George Niculae
2012-09-03 12:57:45 UTC
Permalink
Post by Jan Fricke
Ok that leads to another question. How can a script query the node_number
of the system it is running on?
The script will send nagios passive checks from each node. Each node
should check its own services.
Good question, forgot to mention that you get this data from
/var/sipxdata/cfdata/servers

George
Douglas Hubler
2012-09-03 13:29:46 UTC
Permalink
Post by Jan Fricke
Ok that leads to another question. How can a script query the node_number
of the system it is running on?
cat /var/sipxdata/cfdata/defaults/location_id
Post by Jan Fricke
The script will send nagios passive checks from each node. Each node
should check its own services.
NOTE: All the services relevant to sipx and their statuses are
available via snmp using DisMan MIB. Add your nagios server to
firewall server group and you should be able to access snmp tree. I'm
not familiar w/nagios to know how to query snmp info but i'm sure it's
possible.
Jan Fricke
2012-09-04 12:14:02 UTC
Permalink
snmp would be another way but my script is almost finished now. It queries
the node number from the location_id file, receives all necessary services
using /usr/share/sipxecs/cfmodules/sipx and checks each service using
'service servicename status'. All these information will be combined and
an abstract will be sent to the nagios system using send_nsca.

Thanks for your help :-)


-----Ursprüngliche Nachricht-----
Von: sipx-users-***@list.sipfoundry.org
[mailto:sipx-users-***@list.sipfoundry.org] Im Auftrag von Douglas
Hubler
Gesendet: Montag, 3. September 2012 15:30
An: Discussion list for users of sipXecs software
Betreff: Re: [sipx-users] Monitoring SipX 4.6 services
Post by Jan Fricke
Ok that leads to another question. How can a script query the
node_number of the system it is running on?
cat /var/sipxdata/cfdata/defaults/location_id
Post by Jan Fricke
The script will send nagios passive checks from each node. Each node
should check its own services.
NOTE: All the services relevant to sipx and their statuses are available
via snmp using DisMan MIB. Add your nagios server to firewall server
group and you should be able to access snmp tree. I'm not familiar
w/nagios to know how to query snmp info but i'm sure it's possible.
Loading...