Sha256: 3b6d6127de6b5ca8ba65ad051d467ea6d35f75c80871abf05c869f1180495503
Contents?: true
Size: 739 Bytes
Versions: 12
Compression:
Stored size: 739 Bytes
Contents
#!/usr/bin/env ruby require File.expand_path('../../lib/riemann/tools', __FILE__) class Riemann::Tools::FreeSWITCH include Riemann::Tools def tick #determine how many current calls I have according to FreeSWITCH fs_calls = %x[fs_cli -x "show calls count"| grep -Po '^\\d+'] #determine how many current channels I have according to FreeSWITCH fs_channels = %x[fs_cli -x "show channels count"| grep -Po '^\\d+'] #submit them to riemann report( :service => "FreeSWITCH current calls", :metric => fs_calls.to_i, :state => "info" ) report( :service => "FreeSWITCH current channels", :metric => fs_channels.to_i, :state => "info" ) end end Riemann::Tools::FreeSWITCH.run
Version data entries
12 entries across 12 versions & 2 rubygems