SlideShare a Scribd company logo
1 of 22
Download to read offline
Monitoring VoIP Systems 
Sebastian Damm 
damm@sipgate.de
Who we are, what we do 
• Düsseldorf based VoIP provider (since 2004) 
• active in Germany and UK 
• Private and Business customers 
• VoIP and Mobile products 
• some 100k users 
• almost 100 million minutes each month
VoIP systems monitored 
• Asterisk (~100 servers) 
• Kamailio (12 servers) 
• Yate (12 servers) 
• RTP Proxy (12 servers) 
• ASR (http://en.wikipedia.org/wiki/Answer-seizure_ratio)
Our Monitoring systems 
• 2 Icinga servers 
• almost 1k hosts 
• more than 5k services 
• Cacti 
• Observium for network monitoring
Monitoring SIP 
• simple Perl script 
• UDP capable (TCP and TLS coming soon) 
• resolves SRV DNS records, checks all targets 
• Watch the response code! 
• different systems answer differently
Monitoring Asterisk 
• Base monitoring (disk, memory, load) 
• SIP 
• Remote Manager 
• Asterisk Version, Config version, G729 status, 
Channels, Uptime 
• Open Files (SNMP extension) 
• IPtables status (SNMP extension)
Monitoring Asterisk
check_manager.pl 
• first we called it separately for each service 
• high load on the monitoring system 
• now: one script fills all services 
• only the MANAGER service is active, all others are 
passive (with fallback command) 
• can be called as active check for each service
check_manager.pl 
sub push_passive { 
my ($service,$state,$msg) = @_; 
my $timestamp = time; 
eval { 
open CMD, ">>", $cmdfile or die $!; 
}; 
if ($@) { 
print "Could not open Command file!n" if (defined($opts_verbose)); 
return; 
} 
my $cmdmsg = sprintf("[%s] PROCESS_SERVICE_CHECK_RESULT;%s;%s;%s;%sn", 
$timestamp,$opts_host,$service,$ERRORS{$state},$msg); 
print $cmdmsg if (defined($opts_verbose)); 
print CMD $cmdmsg; 
close CMD; 
}
Integrating into Icinga 
• Service Definition 
Active Check Passive Check 
define service { 
service_description MANAGER 
hostgroup_name sipgw 
use local-service 
check_command check_manager 
} 
define service { 
service_description AST_UPTIME 
hostgroup_name sipgw 
use local-service 
check_command check_manager_active!uptime 
is_volatile 1 
active_checks_enabled 0 
passive_checks_enabled 1 
check_freshness 1 
max_check_attempts 1 
freshness_threshold 600 
}
Integrating into Icinga 
• Command Definition 
Active Check Passive Check (Fallback) 
define command{ 
command_name check_manager 
command_line $USER32$/check_manager  
-H $HOSTNAME$ -I $HOSTADDRESS$  
-u $USER7$ -p $USER8$  
-m 127.0.0.1:11211  
-s SIPCHAN --g729 
} 
define command{ 
command_name check_manager_active 
command_line $USER32$/check_manager  
-H $HOSTNAME$ -I $HOSTADDRESS$  
-u $USER7$ -p $USER8$  
-m 127.0.0.1:11211  
-a $ARG1$ 
}
Check Open Files 
• consists of two scripts on the monitored system 
• one script run by cron every minute 
• other script triggered by SNMPd to read those files
Monitoring Kamailio 
• SIP 
• some variables through XMLRPC calls 
• Memory 
• TCP Connections 
• Version
Monitoring Kamailio
XMLRPC in Kamailio 
1. Load the module 
loadmodule "xmlrpc.so" 
modparam("xmlrpc", "route", "XMLRPC") 
2. Handle XMLRPC calls 
route["XMLRPC"] { 
if(src_ip == 1.2.3.4) { # only answer to Monitoring 
set_reply_no_connect(); # optional 
dispatch_rpc(); 
} else { 
xmlrpc_reply("403", "Forbidden"); 
} 
}
Querying Kamailio 
sub call_rpc { 
my ($method,@rpc_params) = @_; 
my (%r,$k); 
my($rpc_call) = XMLRPC::Lite 
-> proxy("http://$opts_host:$opts_port") -> call($method, @rpc_params); 
my $res= $rpc_call->result; 
if (!defined $res){ 
print "Error querying Kamailion"; 
$res=$rpc_call->fault; 
%r=%{$res}; 
foreach $k (sort keys %r) { 
print("t$k: $r{$k}n"); 
} 
exit $ERRORS{'UNKNOWN'}; 
} else { 
return($res); 
} 
}
Monitoring Yate 
• SIP 
• everything else through SNMP 
• SIGTRAN links (beware: element order can change!) 
• Uptime 
• Version 
• Channels 
• …
Monitoring Yate
Monitoring ASR 
• percentage of answered calls / total calls 
• additionally: length of answered calls 
• per Gateway, Carrier, Destination, Product 
• in Yate: configurable and readable via SNMP
Monitoring the rest 
• SIP connectivity to partners 
• Function tests (emergency calls, features) 
• ENUM 
• User Location 
• RTP Proxies 
• STUN 
• iptables Connection Tracking
That’s it 
Downloads available at: http://sipg.at/osmc2014 
And: We hire, too! 
http://www.sipgate.de/jobs/
Thank you!

More Related Content

What's hot

MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010
Sadayuki Furuhashi
 
Study2study#4 nginx conf_1_24
Study2study#4 nginx conf_1_24Study2study#4 nginx conf_1_24
Study2study#4 nginx conf_1_24
Naoya Nakazawa
 
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Tom Croucher
 

What's hot (20)

Node.js streaming csv downloads proxy
Node.js streaming csv downloads proxyNode.js streaming csv downloads proxy
Node.js streaming csv downloads proxy
 
Lua tech talk
Lua tech talkLua tech talk
Lua tech talk
 
MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010
 
Roll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and LuaRoll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and Lua
 
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
 
Securing Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultSecuring Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp Vault
 
Study2study#4 nginx conf_1_24
Study2study#4 nginx conf_1_24Study2study#4 nginx conf_1_24
Study2study#4 nginx conf_1_24
 
Umleitung: a tiny mochiweb/CouchDB app
Umleitung: a tiny mochiweb/CouchDB appUmleitung: a tiny mochiweb/CouchDB app
Umleitung: a tiny mochiweb/CouchDB app
 
Using Grails to power your electric car
Using Grails to power your electric carUsing Grails to power your electric car
Using Grails to power your electric car
 
Cql – cassandra query language
Cql – cassandra query languageCql – cassandra query language
Cql – cassandra query language
 
Devel::NYTProf 2009-07 (OUTDATED, see 201008)
Devel::NYTProf 2009-07 (OUTDATED, see 201008)Devel::NYTProf 2009-07 (OUTDATED, see 201008)
Devel::NYTProf 2009-07 (OUTDATED, see 201008)
 
CQL: SQL In Cassandra
CQL: SQL In CassandraCQL: SQL In Cassandra
CQL: SQL In Cassandra
 
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
Using Node.js to  Build Great  Streaming Services - HTML5 Dev ConfUsing Node.js to  Build Great  Streaming Services - HTML5 Dev Conf
Using Node.js to Build Great Streaming Services - HTML5 Dev Conf
 
Information security programming in ruby
Information security programming in rubyInformation security programming in ruby
Information security programming in ruby
 
Service discovery like a pro (presented at reversimX)
Service discovery like a pro (presented at reversimX)Service discovery like a pro (presented at reversimX)
Service discovery like a pro (presented at reversimX)
 
Observability with Consul Connect
Observability with Consul ConnectObservability with Consul Connect
Observability with Consul Connect
 
Time tested php with libtimemachine
Time tested php with libtimemachineTime tested php with libtimemachine
Time tested php with libtimemachine
 
Job Queue in Golang
Job Queue in GolangJob Queue in Golang
Job Queue in Golang
 
Bootstrapping multidc observability stack
Bootstrapping multidc observability stackBootstrapping multidc observability stack
Bootstrapping multidc observability stack
 
Nmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumerationNmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumeration
 

Viewers also liked

Internet of things - Frantic
Internet of things - FranticInternet of things - Frantic
Internet of things - Frantic
Miika Puputti
 
Test your idea questionnaire
Test your idea questionnaireTest your idea questionnaire
Test your idea questionnaire
startupJamaica
 
Неделя науки 2013 СПбГПУ
Неделя науки 2013 СПбГПУНеделя науки 2013 СПбГПУ
Неделя науки 2013 СПбГПУ
Boris Kizko
 
Идентификация с помощью смартфона и iBeacon
Идентификация с помощью смартфона и iBeaconИдентификация с помощью смартфона и iBeacon
Идентификация с помощью смартфона и iBeacon
alex_doloz
 
Автономные сети – взгляд в будущее. Новые технологии построения сетей
Автономные сети – взгляд в будущее. Новые технологии построения сетейАвтономные сети – взгляд в будущее. Новые технологии построения сетей
Автономные сети – взгляд в будущее. Новые технологии построения сетей
Cisco Russia
 
Devolo Goes OSGi – When Hardware Needs Software - G Hermann
Devolo Goes OSGi – When Hardware Needs Software  - G HermannDevolo Goes OSGi – When Hardware Needs Software  - G Hermann
Devolo Goes OSGi – When Hardware Needs Software - G Hermann
mfrancis
 

Viewers also liked (20)

A Product Manager's Job
A Product Manager's JobA Product Manager's Job
A Product Manager's Job
 
Tema 4: La identidad digital
Tema 4: La identidad digitalTema 4: La identidad digital
Tema 4: La identidad digital
 
Web analytics is becoming universal
Web analytics is becoming universalWeb analytics is becoming universal
Web analytics is becoming universal
 
Internet of things - Frantic
Internet of things - FranticInternet of things - Frantic
Internet of things - Frantic
 
SDN: Что это? Что оно нам дает и как его использовать
SDN: Что это? Что оно нам дает и как его использоватьSDN: Что это? Что оно нам дает и как его использовать
SDN: Что это? Что оно нам дает и как его использовать
 
Test your idea questionnaire
Test your idea questionnaireTest your idea questionnaire
Test your idea questionnaire
 
Webinario OM Latam "Tendencias Digitales SXSW 2031"
Webinario OM Latam "Tendencias Digitales SXSW 2031"Webinario OM Latam "Tendencias Digitales SXSW 2031"
Webinario OM Latam "Tendencias Digitales SXSW 2031"
 
Go+ product
Go+ productGo+ product
Go+ product
 
Zaklady rizeni znacky
Zaklady rizeni znackyZaklady rizeni znacky
Zaklady rizeni znacky
 
Pair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical thingsPair Programming, TDD and other impractical things
Pair Programming, TDD and other impractical things
 
Bo0oM - Deanonymization and total espionage (ZeroNights, 2014)
Bo0oM - Deanonymization and total espionage (ZeroNights, 2014)Bo0oM - Deanonymization and total espionage (ZeroNights, 2014)
Bo0oM - Deanonymization and total espionage (ZeroNights, 2014)
 
Plaquette Kontest - FR 2015
Plaquette Kontest - FR 2015Plaquette Kontest - FR 2015
Plaquette Kontest - FR 2015
 
Неделя науки 2013 СПбГПУ
Неделя науки 2013 СПбГПУНеделя науки 2013 СПбГПУ
Неделя науки 2013 СПбГПУ
 
Идентификация с помощью смартфона и iBeacon
Идентификация с помощью смартфона и iBeaconИдентификация с помощью смартфона и iBeacon
Идентификация с помощью смартфона и iBeacon
 
How To Create PowerPoints That Are Out Of This World
How To Create PowerPoints That Are Out Of This WorldHow To Create PowerPoints That Are Out Of This World
How To Create PowerPoints That Are Out Of This World
 
Виртуализация клиентских устройств Juniper cCPE
Виртуализация клиентских устройств Juniper cCPEВиртуализация клиентских устройств Juniper cCPE
Виртуализация клиентских устройств Juniper cCPE
 
Автономные сети – взгляд в будущее. Новые технологии построения сетей
Автономные сети – взгляд в будущее. Новые технологии построения сетейАвтономные сети – взгляд в будущее. Новые технологии построения сетей
Автономные сети – взгляд в будущее. Новые технологии построения сетей
 
Devolo Goes OSGi – When Hardware Needs Software - G Hermann
Devolo Goes OSGi – When Hardware Needs Software  - G HermannDevolo Goes OSGi – When Hardware Needs Software  - G Hermann
Devolo Goes OSGi – When Hardware Needs Software - G Hermann
 
Антон Тюрин "Распределённая система near-realtime агрегации больших объёмов д...
Антон Тюрин "Распределённая система near-realtime агрегации больших объёмов д...Антон Тюрин "Распределённая система near-realtime агрегации больших объёмов д...
Антон Тюрин "Распределённая система near-realtime агрегации больших объёмов д...
 
Y Combinator Startup Class #12 : Building for the Enterprise
Y Combinator Startup Class #12 : Building for the EnterpriseY Combinator Startup Class #12 : Building for the Enterprise
Y Combinator Startup Class #12 : Building for the Enterprise
 

Similar to OSMC 2014: Monitoring VoIP Systems | Sebastian Damm

Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
yiditushe
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
guoqing75
 
Use perl creating web services with xml rpc
Use perl creating web services with xml rpcUse perl creating web services with xml rpc
Use perl creating web services with xml rpc
Johnny Pork
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
Wesley Beary
 

Similar to OSMC 2014: Monitoring VoIP Systems | Sebastian Damm (20)

Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
 
Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108
 
PHP And Web Services: Perfect Partners
PHP And Web Services: Perfect PartnersPHP And Web Services: Perfect Partners
PHP And Web Services: Perfect Partners
 
Camel one v3-6
Camel one v3-6Camel one v3-6
Camel one v3-6
 
Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015
 
FOSDEM 2017 - RTC Services With Lua and Kamailio
FOSDEM 2017 - RTC Services With Lua and KamailioFOSDEM 2017 - RTC Services With Lua and Kamailio
FOSDEM 2017 - RTC Services With Lua and Kamailio
 
OSMC 2014 | Monitoring VoIP Systems by Sebastian Damm
OSMC 2014 | Monitoring VoIP Systems by Sebastian DammOSMC 2014 | Monitoring VoIP Systems by Sebastian Damm
OSMC 2014 | Monitoring VoIP Systems by Sebastian Damm
 
Test driven infrastructure
Test driven infrastructureTest driven infrastructure
Test driven infrastructure
 
Aynchronous Processing in Kamailio Configuration File
Aynchronous Processing in Kamailio Configuration FileAynchronous Processing in Kamailio Configuration File
Aynchronous Processing in Kamailio Configuration File
 
Use perl creating web services with xml rpc
Use perl creating web services with xml rpcUse perl creating web services with xml rpc
Use perl creating web services with xml rpc
 
Kafka Streams: the easiest way to start with stream processing
Kafka Streams: the easiest way to start with stream processingKafka Streams: the easiest way to start with stream processing
Kafka Streams: the easiest way to start with stream processing
 
fog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloudfog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloud
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
 
Load Testing with PHP and RedLine13
Load Testing with PHP and RedLine13Load Testing with PHP and RedLine13
Load Testing with PHP and RedLine13
 
Solr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene EuroconSolr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene Eurocon
 
Frontend Servers and NGINX: What, Where and How
Frontend Servers and NGINX: What, Where and HowFrontend Servers and NGINX: What, Where and How
Frontend Servers and NGINX: What, Where and How
 
How lagom helps to build real world microservice systems
How lagom helps to build real world microservice systemsHow lagom helps to build real world microservice systems
How lagom helps to build real world microservice systems
 
Microservices Manchester: How Lagom Helps to Build Real World Microservice Sy...
Microservices Manchester: How Lagom Helps to Build Real World Microservice Sy...Microservices Manchester: How Lagom Helps to Build Real World Microservice Sy...
Microservices Manchester: How Lagom Helps to Build Real World Microservice Sy...
 
Distributed Applications with Perl & Gearman
Distributed Applications with Perl & GearmanDistributed Applications with Perl & Gearman
Distributed Applications with Perl & Gearman
 

Recently uploaded

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 

OSMC 2014: Monitoring VoIP Systems | Sebastian Damm

  • 1. Monitoring VoIP Systems Sebastian Damm damm@sipgate.de
  • 2. Who we are, what we do • Düsseldorf based VoIP provider (since 2004) • active in Germany and UK • Private and Business customers • VoIP and Mobile products • some 100k users • almost 100 million minutes each month
  • 3. VoIP systems monitored • Asterisk (~100 servers) • Kamailio (12 servers) • Yate (12 servers) • RTP Proxy (12 servers) • ASR (http://en.wikipedia.org/wiki/Answer-seizure_ratio)
  • 4. Our Monitoring systems • 2 Icinga servers • almost 1k hosts • more than 5k services • Cacti • Observium for network monitoring
  • 5. Monitoring SIP • simple Perl script • UDP capable (TCP and TLS coming soon) • resolves SRV DNS records, checks all targets • Watch the response code! • different systems answer differently
  • 6. Monitoring Asterisk • Base monitoring (disk, memory, load) • SIP • Remote Manager • Asterisk Version, Config version, G729 status, Channels, Uptime • Open Files (SNMP extension) • IPtables status (SNMP extension)
  • 8. check_manager.pl • first we called it separately for each service • high load on the monitoring system • now: one script fills all services • only the MANAGER service is active, all others are passive (with fallback command) • can be called as active check for each service
  • 9. check_manager.pl sub push_passive { my ($service,$state,$msg) = @_; my $timestamp = time; eval { open CMD, ">>", $cmdfile or die $!; }; if ($@) { print "Could not open Command file!n" if (defined($opts_verbose)); return; } my $cmdmsg = sprintf("[%s] PROCESS_SERVICE_CHECK_RESULT;%s;%s;%s;%sn", $timestamp,$opts_host,$service,$ERRORS{$state},$msg); print $cmdmsg if (defined($opts_verbose)); print CMD $cmdmsg; close CMD; }
  • 10. Integrating into Icinga • Service Definition Active Check Passive Check define service { service_description MANAGER hostgroup_name sipgw use local-service check_command check_manager } define service { service_description AST_UPTIME hostgroup_name sipgw use local-service check_command check_manager_active!uptime is_volatile 1 active_checks_enabled 0 passive_checks_enabled 1 check_freshness 1 max_check_attempts 1 freshness_threshold 600 }
  • 11. Integrating into Icinga • Command Definition Active Check Passive Check (Fallback) define command{ command_name check_manager command_line $USER32$/check_manager -H $HOSTNAME$ -I $HOSTADDRESS$ -u $USER7$ -p $USER8$ -m 127.0.0.1:11211 -s SIPCHAN --g729 } define command{ command_name check_manager_active command_line $USER32$/check_manager -H $HOSTNAME$ -I $HOSTADDRESS$ -u $USER7$ -p $USER8$ -m 127.0.0.1:11211 -a $ARG1$ }
  • 12. Check Open Files • consists of two scripts on the monitored system • one script run by cron every minute • other script triggered by SNMPd to read those files
  • 13. Monitoring Kamailio • SIP • some variables through XMLRPC calls • Memory • TCP Connections • Version
  • 15. XMLRPC in Kamailio 1. Load the module loadmodule "xmlrpc.so" modparam("xmlrpc", "route", "XMLRPC") 2. Handle XMLRPC calls route["XMLRPC"] { if(src_ip == 1.2.3.4) { # only answer to Monitoring set_reply_no_connect(); # optional dispatch_rpc(); } else { xmlrpc_reply("403", "Forbidden"); } }
  • 16. Querying Kamailio sub call_rpc { my ($method,@rpc_params) = @_; my (%r,$k); my($rpc_call) = XMLRPC::Lite -> proxy("http://$opts_host:$opts_port") -> call($method, @rpc_params); my $res= $rpc_call->result; if (!defined $res){ print "Error querying Kamailion"; $res=$rpc_call->fault; %r=%{$res}; foreach $k (sort keys %r) { print("t$k: $r{$k}n"); } exit $ERRORS{'UNKNOWN'}; } else { return($res); } }
  • 17. Monitoring Yate • SIP • everything else through SNMP • SIGTRAN links (beware: element order can change!) • Uptime • Version • Channels • …
  • 19. Monitoring ASR • percentage of answered calls / total calls • additionally: length of answered calls • per Gateway, Carrier, Destination, Product • in Yate: configurable and readable via SNMP
  • 20. Monitoring the rest • SIP connectivity to partners • Function tests (emergency calls, features) • ENUM • User Location • RTP Proxies • STUN • iptables Connection Tracking
  • 21. That’s it Downloads available at: http://sipg.at/osmc2014 And: We hire, too! http://www.sipgate.de/jobs/