1319 |
|
|
1320 |
|
|
1321 |
|
|
1322 |
=head2 Using regular expressions to test the content of a file |
=head2 FILE CONTENT TESTING |
1323 |
|
|
1324 |
The match statement allows you to test the content of a text |
The match statement allows you to test the content of a text |
1325 |
file by using regular expressions. This is a great feature if |
file by using regular expressions. This is a great feature if |
1347 |
You can use the I<NOT> statement to invert a match. |
You can use the I<NOT> statement to invert a match. |
1348 |
|
|
1349 |
The content is only being checked every cycle. If content is |
The content is only being checked every cycle. If content is |
1350 |
being added and removed during between two checks they are |
being added and removed between two checks they are unnoticed. |
|
unnoticed. |
|
1351 |
|
|
1352 |
On startup the read position is set to the end of the file. |
On startup the read position is set to the end of the file |
1353 |
Upon file size decrease and inode change the read position |
and monit continue to scan to the end of file on each cycle. |
1354 |
is set to the start of the file. |
But if the file size should decrease or inode change the read |
1355 |
|
position is set to the start of the file. |
1356 |
|
|
1357 |
Only lines ending with a newline character are inspected. Thus, |
Only lines ending with a newline character are inspected. Thus, |
1358 |
lines are being ignored until they have been completed with this |
lines are being ignored until they have been completed with this |
1359 |
character. |
character. Also note that only the first 511 characters of a |
1360 |
|
line are inspected. |
|
Only the first 511 characters of a line are inspected. |
|
1361 |
|
|
1362 |
=over 4 |
=over 4 |
1363 |
|
|