Module: sems
Branch: master
Commit: 6f503cd3a6eb0c54430c9fc4d07b7d8ef9b5d705
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=6f503cd3a6eb0c54430c9fc4d07b7d8ef9b5d705

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Tue May 22 19:00:47 2012 +0200

munin plugin for sems using the stats module

by T Searle
https://bugtracker.iptel.org/view.php?id=67

---

 doc/munin-sems-stats-monitoring.pl |   36 ++++++++++++++++++++++++++++++++++++
 doc/src/doxyref.h                  |   14 ++++++++++++++
 2 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/doc/munin-sems-stats-monitoring.pl 
b/doc/munin-sems-stats-monitoring.pl
new file mode 100644
index 0000000..414b97b
--- /dev/null
+++ b/doc/munin-sems-stats-monitoring.pl
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+
+if($ARGV[0] and $ARGV[0] eq 'config') {
+        print "graph_title SEMS calls\n";
+        print "graph_args --base 1000 -l 0\n";
+        print "graph_vlabel calls\n";
+        print "graph_category Porting\n";
+
+       print "calls.draw LINE2\n";
+       print "calls.label current\n";
+       print "peak.draw LINE2\n";
+       print "peak.label peak calls\n";
+        exit 0;
+}
+
+open(FILE, "sems-stats|");
+
+while(<FILE>)
+{
+       if($_ =~ /Active calls: (.*)\n/)
+       {
+               print "calls.value $1\n";
+       }
+}
+close FILE;
+
+open(FILE, "sems-stats -c get_callsmax|");
+
+while(<FILE>)
+{
+       if($_ =~ /Maximum active calls: (.*)\n/)
+       {
+               print "peak.value $1\n";
+       }
+}
+close FILE;
diff --git a/doc/src/doxyref.h b/doc/src/doxyref.h
index 44ab8b4..1c39be8 100644
--- a/doc/src/doxyref.h
+++ b/doc/src/doxyref.h
@@ -24,6 +24,7 @@
  *  \arg \ref ZRTP
  *  \arg \ref signalsdoc
  *  \arg \ref Tuning
+ *  \arg \ref Monitoring
  *
  *  \section developerdoc Developer's documentation
  *   \arg <a href="http://www.iptel.org/files/semsng-designoverview.pdf";>
@@ -125,7 +126,20 @@ On top of that, you save lots of memory (mostly the stack 
memory), also, because
  */
 
 
+/*! \page Monitoring Monitoring SEMS
+  
+  <p>The number of active calls can be fetched from SEMS if a suitable RPC 
module is loaded, either the stats module, the xmlrpc2di module
+  (\ref ModuleDoc_xmlrpc2di), or the json-rpc (\ref ModuleDoc_jsonrpc) module.
+  </p>
 
+  <p>More detailed call monitoring can be perfomed using the monitoring module 
(\ref ModuleDoc_monitoring) and an RPC module
+  </p>
+  
+  <p>A perl script to monitor active calls using munin:
+  </p>
+
+   \verbinclude munin-sems-stats-monitoring.pl
+ */
 
 
 

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to