mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
commit
65c824bb9a
@ -65,6 +65,13 @@ LABELS = {
|
||||
:system_ports_limit => 'System limit hit: ports', # check with length(erlang:ports())., set in ejabberdctl config file
|
||||
:system_limit => 'Other system limit hit', # processes? check with erlang:system_info(process_count)., erlang:system_info(process_limit)., set in ejabberdctl cfg
|
||||
:generic_server_terminating => 'Generic server terminating',
|
||||
:mnesia_table_shrinked => 'Mnesia table shrinked',
|
||||
:admin_access_failed => 'Admin access failed',
|
||||
:mysql_sock_timedout => 'MySQL sock timedout',
|
||||
:config_error => 'Configuration error',
|
||||
:vcard_error => 'Strange vCard error (vhost)',
|
||||
:mnesia_overload => 'Mnesia is overloaded',
|
||||
:mysql_init_recv_failed => 'MySQL: init failed recv data',
|
||||
:UNKNOWN => 'Unknown error/warning'
|
||||
}
|
||||
def log_type(text)
|
||||
@ -104,6 +111,20 @@ def log_type(text)
|
||||
:system_limit
|
||||
elsif text.include?('Generic server') and text.include?('terminating')
|
||||
:generic_server_terminating
|
||||
elsif text.include?('shrinking table')
|
||||
:mnesia_table_shrinked
|
||||
elsif text.include?('Access of') and text.include?('failed with error')
|
||||
:admin_access_failed
|
||||
elsif text.include?('mysql_') and text.include?(': Socket') and text.include?('timedout')
|
||||
:mysql_sock_timedout
|
||||
elsif text.include?('{badrecord,config}')
|
||||
:config_error
|
||||
elsif text.include?('error found when trying to get the vCard')
|
||||
:vcard_error
|
||||
elsif text.include?('Mnesia is overloaded')
|
||||
:mnesia_overload
|
||||
elsif text.include?('mysql_conn: init failed receiving data')
|
||||
:mysql_init_recv_failed
|
||||
else
|
||||
warn "Cannot parse text: #{text}" if $debug_mode
|
||||
:UNKNOWN
|
||||
@ -128,7 +149,7 @@ File.open(CACHE_FILE, 'w') { |f| f.write log_info.to_yaml } unless $debug_mode
|
||||
if ARGV.first == 'config'
|
||||
puts <<CONFIG
|
||||
graph_title Ejabberd Log
|
||||
graph_vtitle per period
|
||||
graph_vtitle total
|
||||
graph_category ejabberd
|
||||
graph_args -l 0
|
||||
graph_order #{(LABELS.keys + log_info.keys.select { |k| k.is_a? String }.sort).join(' ')}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# netstat_bsd_s revision 1 (Mar 2012)
|
||||
# netstat_bsd_s revision 2 (Mar 2012)
|
||||
#
|
||||
# This plugin shows various statistics from 'netstat -s'
|
||||
#
|
||||
@ -62,7 +62,7 @@ class Graph
|
||||
"graph_order #{labels.map(&:escape).join(' ')}"
|
||||
]
|
||||
|
||||
config_options.push "graph_args --base 1024" if unit == 'bytes'
|
||||
config_options.push "graph_args --base 1024" if unit == :bytes
|
||||
|
||||
labels.each { |label|
|
||||
label_esc = label.escape
|
||||
|
@ -1,27 +1,36 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# tcp_retries revision 2 (Feb 2012)
|
||||
#
|
||||
# TCP retransmission rate. Useful for network debugging.
|
||||
#
|
||||
# Required privileges: none
|
||||
#
|
||||
# OS: Linux with procfs
|
||||
#
|
||||
# Author: Artem Sheremet <dot.doom@gmail.com>
|
||||
#
|
||||
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
TCPSTAT=/proc/net/tcp
|
||||
|
||||
case $1 in
|
||||
autoconf)
|
||||
[ -r $TCPSTAT -o -r ${TCPSTAT}6 ] && echo "yes" || echo "no"
|
||||
;;
|
||||
config)
|
||||
cat <<EOF
|
||||
cat <<CONFIG
|
||||
graph_title TCP retransmissions
|
||||
graph_vlabel Rate, retrs/sockets
|
||||
graph_category network
|
||||
graph_info dynamic TCP socket retransmission counters
|
||||
graph_info TCP sockets retransmission counters from $TCPSTAT
|
||||
rate.label Retransmission rate
|
||||
rate.draw LINE2
|
||||
EOF
|
||||
|
||||
exit 0
|
||||
rate.min 0
|
||||
CONFIG
|
||||
;;
|
||||
autoconf)
|
||||
if [ -f /proc/net/tcp -o -f /proc/net/tcp6 ]
|
||||
then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
esac
|
||||
|
||||
cat /proc/net/tcp* | awk '
|
||||
|
Loading…
Reference in New Issue
Block a user