In this post, the third in the series of posts in that subject (see previous posts http://www.telestax.com/enterprise-monitoring-for-restcomm-part-2/ and http://www.telestax.com/enterprise-monitoring-for-restcomm-an-overview-of-the-apis-and-the-tools/, I will show how to get the best picture of your application.
The metrics available will provide you insights for your application’s performance and efficiency and help you plan for high availability and disaster recovery.
Currently you will be able to get metrics from the following:
Jain Sip Stack for low level metrics such as ServerTransactions, ClientTransactions, Dialogs etc
Sip Servlet container metrics for metrics such as number of SIP responses for each response class, number of SIP messages etc
Restcomm application for high level metrics such as number of live call sessions, sms sessions etc
Here is a screenshot of the dashboard you will get
You will see how to use these metrics to create useful dashboards using Graylog – www.graylog.org.
Graylog is an open source analytics platform that combines the best of the breed software and puts them together.
You have several options for how to install Graylog, for example OS packages for your Linux distribution of choice, chef and puppet scripts, virtual appliances as OVA images for virtualbox, vmware and docker. For more details you can check here https://www.graylog.org/download-graylog/.
I won’t cover the Graylog installation here, but as a piece of advice, the Docker or Virtualbox image is the easiest way to go as a beginner.
Additionally you will need to install the Http Monitor Input Graylog plugin from here: https://marketplace.graylog.org/addons/1f95ab1c-08d5-4742-99f6-2bf41005bb8b
The Graylog version that I used for this tutorial is 1.2.2. You can check here for the Graylog documentation http://docs.graylog.org/en/1.2/.
Bellow you will find the list of metrics that are available:
SIP Responses sent or received, for example 1xx-processed, 2xx-sent, 5xx-processed etc
SIP Methods sent or receieved, for example bye-processed, invite-sent, ack-sent etc
Active Sip Application Sessions and Sip Sessions
Expired Sip Application Sessions and Sip Sessions
Rejected Sip Application Sessions and Sip Sessions
Sip Application Sessions and Sip Sessions per second
Sip Application Session and Sip Session average alive time
Sip Application Session and Sip Session maximum alive time
Restcomm total calls since startup
Restcomm total incoming calls since startup
Restcomm total outgoing calls since startup
Restcomm number of registered users
Restcomm number of live calls
Restcomm number of incoming live calls
Restcomm number of outgoing live calls
Restcomm number of Completed calls
Restcomm number of NoAnswered calls
Restcomm number of Busy calls
Restcomm number of Failed calls
Restcomm number of NotFound calls
Restcomm number of Canceled calls
Restcomm number of incoming SMS routed to clients
Restcomm number of incoming SMS routed to applications
Restcomm number of outgoing SMS
JVM Metrics such as memory and threads in use
Jain sip stack and Sip Servlets provide JMX for the monitoring metrics but using the JBoss AS7 Http Management interface we can access these metrics over http in a nice json response.
There are two steps that needs to be done to enable the Jain sip stack and Sip Servlets metrics:
Add a JBoss management user. You can do this using the “add-user.sh” script which is located at $SIP_SERVLETS_HOME/bin (or $RESTCOMM_HOME/bin). For example you can create new user:
add-user.sh adminUser adminPassword123$
Username will be “adminUser” and password “adminPassword”
Edit the standalone-sip.xml file located at $SIP_SERVLETS_HOME/standalone/configuration/standalone-sip.xml ($RESTCOMM_HOME/standalone/configuration/standalone-sip.xml) and edit JBoss Management interface ip address:
This IP Address must be reachable from the Graylog server.
Now the Restcomm metrics are provided from the brand new Monitoring Service which is part of the REST API and you need no additional configuration. You will need a Restcomm management user that is able to read the monitoring service metrics. Here I will use the default administrator user, “firstname.lastname@example.org”.
[alert type=”notice”]Make sure you have successfully reset the administrators password the first time by login to the Restcomm Admin UI (http://RESTCOMM_IP_ADDRESS:8080) .[/alert]
For easier setup I have provided Graylog content packs for the Inputs and Dashboard, that you can import and have everything set out of the box. You will only need to edit each Input to change the SipServlets (Restcomm) IP Address and username/password.
You can find the Graylog content packs here:
Jain sip stack and Sip Servlet Content pack
Restcomm content pack
To import the content packs, login to Graylog and go to System -> Content packs -> Import Content pack, then upload the relevant file. After you upload both files, you will have the content packs ready to be applied, so click one content pack and press Apply
Next step is to edit the imported Graylog inputs in order to provide the proper IP Address of Sip Servlets server, or Restcomm, and username/password to be used. Go to System -> Inputs and edit one by one the three imported inputs. Additionally you can change the interval between requests for each of the inputs.
Now you can check the Dashboard that will be available after you imported the Restcomm Dashboard content pack.
Last, the imported input content packs will provide you a lot of other metrics that you can add to the existing dashboard or create a new one.
There are still more to come on the enterprise monitoring topic so stay tune. Subscribe to receive our newsletter, follow us on Twitter and Facebook.
You can use the Restcomm public forum – https://groups.google.com/forum/?fromgroups#!forum/restcomm – to send any suggestion, feature request or questions.
The post Enterprise Monitoring for Restcomm – Part 3 appeared first on Blog @ Telecom Application Developer Summit (TADS).