| 1 |
\chapter{Monitor Configuration} |
| 2 |
\label{blb:MonitorChapter} |
| 3 |
\index[general]{Monitor Configuration} |
| 4 |
\index[general]{Configuration!Monitor} |
| 5 |
|
| 6 |
The Monitor configuration file is a stripped down version of the Director |
| 7 |
configuration file, mixed with a Console configuration file. It simply |
| 8 |
contains the information necessary to contact Directors, Clients, and Storage |
| 9 |
daemons you want to monitor. |
| 10 |
|
| 11 |
For a general discussion of configuration file and resources including the |
| 12 |
data types recognized by \textbf{\bacula{}}, please see the |
| 13 |
\bilink{Configuration}{blb:ConfigureChapter} chapter of this manual. |
| 14 |
|
| 15 |
The following Monitor Resource definition must be defined: |
| 16 |
|
| 17 |
\begin{bitemize} |
| 18 |
\item |
| 19 |
\bilink{Monitor}{blb:MonitorResource} -- to define the Monitor's |
| 20 |
name used to connect to all the daemons and the password used to connect to |
| 21 |
the Directors. Note, you must not define more than one Monitor resource in |
| 22 |
the Monitor configuration file. |
| 23 |
\item At least one |
| 24 |
\bilink{Client}{blb:ClientResource1}, |
| 25 |
\bilink{Storage}{blb:StorageResource1} or |
| 26 |
\bilink{Director}{blb:DirectorResource2} resource, to define the |
| 27 |
daemons to monitor. |
| 28 |
\end{bitemize} |
| 29 |
|
| 30 |
\section{The Monitor Resource} |
| 31 |
\label{blb:MonitorResource} |
| 32 |
\index[general]{Monitor Resource} |
| 33 |
\index[general]{Resource!Monitor} |
| 34 |
|
| 35 |
The Monitor resource defines the attributes of the Monitor running on the |
| 36 |
network. The parameters you define here must be configured as a Director |
| 37 |
resource in Clients and Storages configuration files, and as a Console |
| 38 |
resource in Directors configuration files. |
| 39 |
|
| 40 |
\begin{bdescription} |
| 41 |
|
| 42 |
\item [Monitor] |
| 43 |
\index[fd]{Monitor} |
| 44 |
Start of the Monitor records. |
| 45 |
|
| 46 |
\item [Name = \bbracket{name}] |
| 47 |
\index[fd]{Name} |
| 48 |
Specify the Director name used to connect to Client and Storage, and the |
| 49 |
Console name used to connect to Director. This record is required. |
| 50 |
|
| 51 |
\item [DisplayAdvancedOptions = \bbracket{boolean}] |
| 52 |
Display advanced options in the tray monitor (for backup and restore operations) |
| 53 |
|
| 54 |
\item [CommandDirectory = \bbracket{directory}] |
| 55 |
Directory where the tray monitor will look at a regular interval to find |
| 56 |
commands to execute. |
| 57 |
|
| 58 |
\item [Refresh Interval = \bbracket{time}] |
| 59 |
\index[fd]{Refresh Interval} |
| 60 |
Specifies the time to wait between status requests to each daemon. It can't |
| 61 |
be set to less than 1 second, or more than 10 minutes, and the default value |
| 62 |
is \bdefaultvalue{5 seconds}. |
| 63 |
% TODO: what is format of the time? |
| 64 |
% TODO: should the digits in this definition be spelled out? should |
| 65 |
% TODO: this say "time-period-specification" above??) |
| 66 |
\end{bdescription} |
| 67 |
|
| 68 |
\section{The Director Resource} |
| 69 |
\label{blb:DirectorResource2} |
| 70 |
\index[general]{Director Resource} |
| 71 |
\index[general]{Resource!Director} |
| 72 |
|
| 73 |
The Director resource defines the attributes of the Directors that are |
| 74 |
monitored by this Monitor. |
| 75 |
|
| 76 |
As you are not permitted to define a Password in this resource, to avoid |
| 77 |
obtaining full Director privileges, you must create a Console resource in the |
| 78 |
\bilink{Director's configuration}{blb:DirectorChapter} file, using the |
| 79 |
Console Name and Password defined in the Monitor resource. To avoid security |
| 80 |
problems, you should configure this Console resource to allow access to no |
| 81 |
other daemons, and permit the use of only two commands: \bcommandname{status} and |
| 82 |
\bcommandname{.status} (see below for an example). |
| 83 |
|
| 84 |
You may have multiple Director resource specifications in a single Monitor |
| 85 |
configuration file. |
| 86 |
|
| 87 |
\begin{bdescription} |
| 88 |
|
| 89 |
\item [Director] |
| 90 |
\index[fd]{Director} |
| 91 |
Start of the Director records. |
| 92 |
|
| 93 |
\item [Name = \bbracket{name}] |
| 94 |
\index[fd]{Name} |
| 95 |
The Director name used to identify the Director in the list of monitored |
| 96 |
daemons. It is not required to be the same as the one defined in the Director's |
| 97 |
configuration file. This record is required. |
| 98 |
|
| 99 |
\item [Port = \bbracket{port-number}] |
| 100 |
\index[fd]{Port} |
| 101 |
Specify the port to use to connect to the Director. This value will most |
| 102 |
likely already be set to the value you specified on the \textbf{{-}{-}:with-baseport} |
| 103 |
option of the \btool{./configure} command. This port must be |
| 104 |
identical to the \textbf{DIRport} specified in the \textbf{Director} resource of |
| 105 |
the |
| 106 |
\bilink{Director's configuration}{blb:DirectorChapter} file. The |
| 107 |
default is \bdefaultvalue{9101} so this record is not normally specified. |
| 108 |
|
| 109 |
\item [Address = \bbracket{address}] |
| 110 |
\index[fd]{Address} |
| 111 |
Where the address is a host name, a fully qualified domain name, or a network |
| 112 |
address used to connect to the Director. This record is required. |
| 113 |
\end{bdescription} |
| 114 |
|
| 115 |
\section{The Client Resource} |
| 116 |
\label{blb:ClientResource1} |
| 117 |
\index[general]{Resource!Client} |
| 118 |
\index[general]{Client Resource} |
| 119 |
|
| 120 |
The Client resource defines the attributes of the Clients that are monitored |
| 121 |
by this Monitor. |
| 122 |
|
| 123 |
You must create a Director resource in the |
| 124 |
\bilink{Client's configuration}{blb:FiledConfChapter} file, using the |
| 125 |
Director Name defined in the Monitor resource. To avoid security problems, you |
| 126 |
should set the \textbf{Monitor} directive to \textbf{Yes} in this Director resource. |
| 127 |
|
| 128 |
|
| 129 |
You may have multiple Director resource specifications in a single Monitor |
| 130 |
configuration file. |
| 131 |
|
| 132 |
\begin{bdescription} |
| 133 |
|
| 134 |
\item [Client (or FileDaemon)] |
| 135 |
\index[fd]{Client (or FileDaemon)} |
| 136 |
Start of the Client records. |
| 137 |
|
| 138 |
\item [Name = \bbracket{name}] |
| 139 |
\index[fd]{Name} |
| 140 |
The Client name used to identify the Director in the list of monitored |
| 141 |
daemons. It is not required to be the same as the one defined in the Client's |
| 142 |
configuration file. This record is required. |
| 143 |
|
| 144 |
\item [Address = \bbracket{address}] |
| 145 |
\index[fd]{Address} |
| 146 |
Where the address is a host name, a fully qualified domain name, or a network |
| 147 |
address in dotted quad notation for a \bacula{} File daemon. This record is |
| 148 |
required. |
| 149 |
|
| 150 |
\item [Port = \bbracket{port-number}] |
| 151 |
\index[fd]{Port} |
| 152 |
Where the port is a port number at which the \bacula{} File daemon can be |
| 153 |
contacted. The default is \bdefaultvalue{9102}. |
| 154 |
|
| 155 |
\item [Password = \bbracket{password}] |
| 156 |
\index[fd]{Password} |
| 157 |
This is the password to be used when establishing a connection with the File |
| 158 |
services, so the Client configuration file on the machine to be backed up |
| 159 |
must have the same password defined for this Director. This record is |
| 160 |
required. |
| 161 |
\end{bdescription} |
| 162 |
|
| 163 |
\section{The Storage Resource} |
| 164 |
\label{blb:StorageResource1} |
| 165 |
\index[general]{Resource!Storage} |
| 166 |
\index[general]{Storage Resource} |
| 167 |
|
| 168 |
The Storage resource defines the attributes of the Storages that are monitored |
| 169 |
by this Monitor. |
| 170 |
|
| 171 |
You must create a Director resource in the |
| 172 |
\bilink{Storage's configuration}{blb:StoredConfChapter} file, using the |
| 173 |
Director Name defined in the Monitor resource. To avoid security problems, you |
| 174 |
should set the \textbf{Monitor} directive to \textbf{Yes} in this Director resource. |
| 175 |
|
| 176 |
|
| 177 |
You may have multiple Director resource specifications in a single Monitor |
| 178 |
configuration file. |
| 179 |
|
| 180 |
\begin{bdescription} |
| 181 |
|
| 182 |
\item [Storage] |
| 183 |
\index[fd]{Storage} |
| 184 |
Start of the Storage records. |
| 185 |
|
| 186 |
\item [Name = \bbracket{name}] |
| 187 |
\index[fd]{Name} |
| 188 |
The Storage name used to identify the Director in the list of monitored |
| 189 |
daemons. It is not required to be the same as the one defined in the Storage's |
| 190 |
configuration file. This record is required. |
| 191 |
|
| 192 |
\item [Address = \bbracket{address}] |
| 193 |
\index[fd]{Address} |
| 194 |
Where the address is a host name, a fully qualified domain name, or a network |
| 195 |
address in dotted quad notation for a \bacula{} Storage daemon. This record is |
| 196 |
required. |
| 197 |
|
| 198 |
\item [Port = \bbracket{port}] |
| 199 |
\index[fd]{Port} |
| 200 |
Where port is the port to use to contact the storage daemon for information |
| 201 |
and to start jobs. This same port number must appear in the Storage resource |
| 202 |
of the Storage daemon's configuration file. The default is \bdefaultvalue{9103}. |
| 203 |
|
| 204 |
\item [Password = \bbracket{password}] |
| 205 |
\index[sd]{Password} |
| 206 |
This is the password to be used when establishing a connection with the |
| 207 |
Storage services. This same password also must appear in the Director |
| 208 |
resource of the Storage daemon's configuration file. This record is required. |
| 209 |
|
| 210 |
\end{bdescription} |
| 211 |
|
| 212 |
\section{Tray Monitor Security} |
| 213 |
\index[general]{Tray Monitor Security} |
| 214 |
|
| 215 |
There is no security problem in relaxing the permissions on |
| 216 |
\bfilename{tray-monitor.conf} as long as FD, SD and DIR are configured properly, so |
| 217 |
the passwords contained in this file only gives access to the status of |
| 218 |
the daemons. It could be a security problem if you consider the status |
| 219 |
information as potentially dangerous (I don't think it is the case). |
| 220 |
|
| 221 |
Concerning Director's configuration: \\ |
| 222 |
In \bfilename{tray-monitor.conf}, the password in the Monitor resource must point to |
| 223 |
a restricted console in \bfilename{bacula-dir.conf} (see the documentation). So, if |
| 224 |
you use this password with bconsole, you'll only have access to the |
| 225 |
status of the director (commands \bcommandname{status} and \bcommandname{.status}). |
| 226 |
It could be a security problem if there is a bug in the \acs{ACL} code of the |
| 227 |
director. |
| 228 |
|
| 229 |
Concerning File and Storage Daemons' configuration:\\ |
| 230 |
In \bfilename{tray-monitor.conf}, the Name in the Monitor resource must point to a |
| 231 |
Director resource in \bfilename{bacula-fd}/\bfilename{sd.conf}, with the Monitor directive set |
| 232 |
to \bvalue{yes} (once again, see the documentation). |
| 233 |
It could be a security problem if there is a bug in the code which check |
| 234 |
if a command is valid for a Monitor (this is very unlikely as the code |
| 235 |
is pretty simple). |
| 236 |
|
| 237 |
|
| 238 |
\section{Sample Tray Monitor configuration} |
| 239 |
\label{blb:SampleConfiguration1} |
| 240 |
\index[general]{Sample Tray Monitor configuration} |
| 241 |
|
| 242 |
An example Tray Monitor configuration file might be the following: |
| 243 |
|
| 244 |
\begin{bVerbatim} |
| 245 |
# |
| 246 |
# Bacula Tray Monitor Configuration File |
| 247 |
# |
| 248 |
Monitor { |
| 249 |
Name = rufus-mon # password for Directors |
| 250 |
RefreshInterval = 10 seconds |
| 251 |
} |
| 252 |
|
| 253 |
Client { |
| 254 |
Name = rufus-fd |
| 255 |
Address = rufus |
| 256 |
Port = 9102 # password for FileDaemon |
| 257 |
Password = "FYpq4yyI1y562EMS35bA0J0QC0M2L3t5cZObxT3XQxgxppTn" |
| 258 |
} |
| 259 |
Storage { |
| 260 |
Name = rufus-sd |
| 261 |
Address = rufus |
| 262 |
Port = 9103 # password for StorageDaemon |
| 263 |
Password = "9usxgc307dMbe7jbD16v0PXlhD64UVasIDD0DH2WAujcDsc6" |
| 264 |
} |
| 265 |
Director { |
| 266 |
Name = rufus-dir |
| 267 |
port = 9101 |
| 268 |
address = rufus |
| 269 |
} |
| 270 |
\end{bVerbatim} |
| 271 |
|
| 272 |
\subsection{Sample File daemon's Director record.} |
| 273 |
\index[general]{Sample File daemon's Director record.} |
| 274 |
\index[general]{Record!Sample File daemon's Director} |
| 275 |
|
| 276 |
Click |
| 277 |
\bilink{here to see the full example.}{blb:SampleClientConfiguration} |
| 278 |
|
| 279 |
|
| 280 |
\begin{bVerbatim} |
| 281 |
# |
| 282 |
# Restricted Director, used by tray-monitor to get the |
| 283 |
# status of the file daemon |
| 284 |
# |
| 285 |
Director { |
| 286 |
Name = rufus-mon |
| 287 |
Password = "FYpq4yyI1y562EMS35bA0J0QC0M2L3t5cZObxT3XQxgxppTn" |
| 288 |
Monitor = yes |
| 289 |
} |
| 290 |
\end{bVerbatim} |
| 291 |
|
| 292 |
\subsection{Sample Storage daemon's Director record.} |
| 293 |
\index[general]{Record!Sample Storage daemon's Director} |
| 294 |
\index[general]{Sample Storage daemon's Director record.} |
| 295 |
|
| 296 |
Click |
| 297 |
\bilink{here to see the full example.}{blb:SampleConfiguration} |
| 298 |
|
| 299 |
\begin{bVerbatim} |
| 300 |
# |
| 301 |
# Restricted Director, used by tray-monitor to get the |
| 302 |
# status of the storage daemon |
| 303 |
# |
| 304 |
Director { |
| 305 |
Name = rufus-mon |
| 306 |
Password = "9usxgc307dMbe7jbD16v0PXlhD64UVasIDD0DH2WAujcDsc6" |
| 307 |
Monitor = yes |
| 308 |
} |
| 309 |
\end{bVerbatim} |
| 310 |
|
| 311 |
\subsection{Sample Director's Console record.} |
| 312 |
\index[general]{Record!Sample Director's Console} |
| 313 |
\index[general]{Sample Director's Console record.} |
| 314 |
|
| 315 |
Click |
| 316 |
\bilink{here to see the full example.}{blb:SampleDirectorConfiguration} |
| 317 |
|
| 318 |
\begin{bVerbatim} |
| 319 |
# |
| 320 |
# Restricted console used by tray-monitor to get the status of the director |
| 321 |
# |
| 322 |
Console { |
| 323 |
Name = Monitor |
| 324 |
Password = "GN0uRo7PTUmlMbqrJ2Gr1p0fk0HQJTxwnFyE4WSST3MWZseR" |
| 325 |
CommandACL = status, .status |
| 326 |
} |
| 327 |
\end{bVerbatim} |