File: availability

package info (click to toggle)
remstats 1.00a4-8woody1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,576 kB
  • ctags: 1,020
  • sloc: perl: 11,706; ansic: 2,776; makefile: 944; sh: 869
file content (101 lines) | stat: -rw-r--r-- 3,708 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# availability - defining what it means for a variable to be "available"

# There are two types of availability definitions: for an RRD or for an 
# RRD on a particular host.  The RRD may also be a wildcard RRD, like
# "df-*" or an instance of an RRD, like "df-/home".  The definitions
# look like:
#
#	rrd RRDNAME VARNAME CF RELATION THRESHOLD
# and
#	host HOSTNAME RRDNAME VARNAME CF RELATION THRESHOLD
#
# The CF is one of LAST, MIN, MAX or AVERAGE, with rrdtool's usual
# meaning.  The RELATION can be any one of: <, <=, >, >=, or =.  
# The THRESHOLD is the number which the value of VARNAME must be 
# in the correct RELATION.  (Clear as mud.)  
#
# As an example, take the following definition:
#
#	rrd ping rcvd > 0
#
# This means that the variable 'ping' must be greater than zero for it
# to be considered "available".  All time intervals where it isn't, or
# for which no data is available, are considered "unavailable".
#
# There are also two other record types: colors and thresholds.  A colors
# record looks like:
#
#	colors COLOR1 ...
#
# A thresholds line looks like:
#
#	thresholds NUMBER ...
#
# and must have the same number of values as the colors line.  Only one of
# each.  Here's an example to make the use clear (I hope):
#
#	colors avail1 avail2 avail3 avail4
#	thresholds 99 98 95 90
#
# The colors line requires that the colors 'avail1', ... be defined in the
# colors config-file.  The thresholds line specifies that if an availability
# is 99% or above, it should be colored 'avail1' color, 98% or above, use
# 'avail2' color, etc.

colors	white green yellow red
thresholds	99 98 95 0

# Appletalk needs an afpd running
rrd afpdprocs afpdprocs AVERAGE > 0
# if there's no incoming voltage, we have no power
rrd apcups ivoltage AVERAGE > 90
# Appletalk needs an atalkd running
rrd atalkdprocs atalkdprocs AVERAGE > 0
# BGP peer is gone unless state = established
rrd bgppeer-* state AVERAGE = 6
# Are the collectors running?
rrd collector-cisco-access-server collected AVERAGE > 0
rrd collector-log collected AVERAGE > 0
rrd collector-nt-status collected AVERAGE > 0
rrd collector-ping collected AVERAGE > 0
rrd collector-port collected AVERAGE > 0
rrd collector-snmp collected AVERAGE > 0
rrd collector-snmp collected AVERAGE > 0
rrd collector-snmp-route collected AVERAGE > 0
rrd collector-unix-status collected AVERAGE > 0

# our Cisco 5300 at CRC only had 24 lines
rrd dsinuse inuse MAX < 24
# a frame-relay circuit must be up
rrd frif-* status MAX = 1
# a unix-status interface can be marked up
rrd if-* status MAX = 1
# memory available?  Try it. (in Kbytes)
rrd memory freemem MIN > 1000
# Samba must be running nmbd
rrd nmbdprocs nmbdprocs AVERAGE > 1
# a disk with less than a meg on it isn't available
rrd ntlogicaldisk-* diskfree MIN > 1
# less than a meg of memory free isn't available
rrd ntmemory memfree MIN > 1000000
# a host which doesn't respond to a ping isn't available
rrd ping rcvd AVERAGE > 1
rrd ping-* rcvd AVERAGE > 1
# less than a meg isn't available (in Kbytes)
rrd pixmem free AVERAGE > 1000
# a port which isn't in OK status isn't available
rrd port-* status AVERAGE = 1
# Probably you want to specify different ones for different ports on
# different machines, but this'll get things going
rrd port-* response AVERAGE < 5000
# FIXME if you've filled up the number of qmail-local or qmail-remote slots
# then qmail isn't available, but you'll have to set the levels yourself
rrd qmaillog localmax MAX < 10
rrd qmaillog remotemax MAX < 20
# Samba also needs an smbd running
rrd smbdprocs smbdprocs AVERAGE > 0
# SNMP-monitored interfaces must be UP
rrd snmpif-* status MAX = 1
# is the weathernetwork available
rrd weathernetwork status AVERAGE = 1