summaryrefslogtreecommitdiff
path: root/doc/bsnmp-jails.8
blob: ac3a4e1a835d988813f4d5ee4154f8bb63e1343e (plain)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
.\" 
.\" Copyright (c) 2008, Stefan Walter
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without 
.\" modification, are permitted provided that the following conditions 
.\" are met:
.\" 
.\"     * Redistributions of source code must retain the above 
.\"       copyright notice, this list of conditions and the 
.\"       following disclaimer.
.\"     * Redistributions in binary form must reproduce the 
.\"       above copyright notice, this list of conditions and 
.\"       the following disclaimer in the documentation and/or 
.\"       other materials provided with the distribution.
.\"     * The names of contributors to this software may not be 
.\"       used to endorse or promote products derived from this 
.\"       software without specific prior written permission.
.\" 
.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
.\" COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
.\" OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
.\" THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
.\" DAMAGE.
.\" 
.\"
.\" CONTRIBUTORS
.\"  Stef Walter <stef@memberwebs.com>
.\"
.Dd March, 2008
.Dt bsnmp-jails 8
.Os bsnmp-jails 
.Sh NAME
.Nm bsnmp-jails
.Nd an SNMP module provides statistics regarding FreeBSD jails running on the system.
.Sh DESCRIPTION
.Nm
is a module for 
.Xr bsnmpd 1
which monitors network and other statistics for FreeBSD jails running on the system. 
These statistics are gathered by the module. 
.Pp
.Sh MIBS
The counters will be available as a table under the following MIB:
.Bd -literal -offset indent
 .1.3.6.1.4.1.12325.1.1111
.Ed
.Pp 
Or if the appropriate MIB.txt files have been installed:
.Bd -literal -offset indent
 enterprises.fokus.begemot.jails
.Ed
.Pp
The following SNMP MIBs are available for use (where X is the counter index):
.Bl -tag -width Fl
.It Ar jails.jailCount
The number of jails running on the system.
.It Ar jails.jailTable.jailEntry.jailIndex.X
The index of the jail in the table.
.It Ar jails.jailTable.jailEntry.jailHost.X
The hostname of the jail.
.It Ar jails.jailTable.jailEntry.jailInOctets.X
The number of octets received by the jail over the network.
.It Ar jails.jailTable.jailEntry.jailInPackets.X
The number of packets received by the jail over the network.
.It Ar jails.jailTable.jailEntry.jailOutOctets.X
The number of octets sent by the jail over the network.
.It Ar jails.jailTable.jailEntry.jailOutPackets.X
The number of packets sent by the jail over the network.
.It Ar jails.jailTable.jailEntry.jailProcesses.X
The number of processes running in the jail.
.It Ar jails.jailTable.jailEntry.jailThreads.X
The number of threads running in the jail.
.It Ar jails.jailTable.jailEntry.jailCpuTime.X
The amount of CPU time (in SNMP time ticks) the jail has used.
.It Ar jails.jailTable.jailEntry.jailDiskSpace.X
Amount of disk space taken by this jail. Zero means unknown.
.It Ar jails.jailTable.jailEntry.jailDiskFiles.X
Number of files (inodes) in this jail. Zero means unknown.
.It Ar jails.jailTable.jailEntry.jailResidentSize.X
The sum of the resident set size (RSS) of all processes in jail. In bytes. An inaccurate representation of memory usage of the jail.
.It Ar jails.jailNetworkFilter
A tcpdump style filter for the network traffic. Only matched traffic
is counted in the jail statistics.
.It Ar jails.jailRefreshInterval
The interval (in SNMP time ticks) between refreshing the jail 
process statistics and checking which jails are running.
.It Ar jails.jailMeasureInterval
The interval (in SNMP time ticks) between measuring the amount of 
files and disk space used by the jail. 
.El
.Sh OPTIONS
To activate the 
.Nm
module you must load the module in 
.Pa /etc/snmpd.config
.Pp
You can use the jailNetworkFilter SNMP MIB to configure which traffic
to count in the jail network statistics.
.Sh EXAMPLES
This example configures the module, and excludes traffic to/from the
10.0.0.0/8 network from the network monitoring.
.Pp
The following would be added to 
.Pa /etc/snmpd.config:
.Bd -literal -offset indent
begemotSnmpdModulePath."jails" = "/usr/local/lib/snmp_jails.so"
%jails
jailNetworkFilter = "not net 10.0.0.0/8"
jailMeasureInterval = 360000
.Ed
.Sh SEE ALSO
.Xr bsnmpd 1,
.Xr tcpdump 1
.Sh AUTHOR
.An Stef Walter Aq stef@memberwebs.com