-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# <a id="Datbase Housekeeping"></a>Database Housekeeping | ||
|
||
Your database may grow over time and contain some outdated information. Icinga Certificate Monitoring provides you | ||
the ability to clean up these outdated info in an easy way. | ||
|
||
## Certificates and Targets | ||
|
||
The default `cleanup` action removes targets whose last scan is older than a certain date/time and certificates that | ||
are no longer used. | ||
|
||
By default, any targets whose last scan is older than `1 month` are removed. The last scan information is always updated | ||
when scanning a target, regardless of whether a successful connection is made or not. Therefore, targets that have been | ||
decommissioned or are no longer part of a job configuration are removed after the specified period. Any certificates | ||
that are no longer used are also removed. This can either be because the associated target has been removed or because | ||
it is presenting a new certificate chain. | ||
|
||
### Usage | ||
|
||
This scan command can be used like any other Icinga Web cli operations like this: `icingacli x509 cleanup [OPTIONS]` | ||
|
||
**Options:** | ||
|
||
``` | ||
--since-last-scan=<datetime> Clean up targets whose last scan is older than the specified date/time, | ||
which can also be an English textual datetime description like "2 days". | ||
Defaults to "1 month". | ||
``` | ||
|
||
#### Example | ||
|
||
Remove any targets that have not been scanned for at least two months and any certificates that are no longer used. | ||
``` | ||
icingacli x509 cleanup --since-last-scan="2 months" | ||
``` | ||
|
||
## Job Activities | ||
|
||
The `cleanup` command provides also an additional option with which you can remove jobs activities older than a | ||
certain date/time. | ||
|
||
Jobs activities are usually just some stats about the job runs performed by the scheduler or/and manually | ||
executed using the [scan](04-Scanning.md#scan-command) and/or [jobs](04-Scanning.md#scheduling-jobs) command. | ||
By default, all jobs and schedules activities older than `1 month` are removed. | ||
|
||
### Usage | ||
|
||
This scan command can be used like any other Icinga Web cli operations like this: `icingacli x509 cleanup activities [OPTIONS]` | ||
|
||
**Options:** | ||
|
||
``` | ||
--job=<name> Remove all activities matching the given job name. | ||
--older-than=<datetime> Remove all jobs activities older than the specified date/time, which can also be | ||
an English textual datetime description like "2 days". Defaults to "1 month". | ||
``` | ||
|
||
#### Example | ||
|
||
Remove all activities older than two months that belongs to job `lan`. | ||
``` | ||
icingacli x509 cleanup activities --job lan --older-than="2 months" | ||
``` |