-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release_2.0' into master
- Loading branch information
Showing
8 changed files
with
64 additions
and
64 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
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
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,33 +1,23 @@ | ||
Cache and freshness | ||
=================== | ||
|
||
It can be harmful to the server to run all checks on each HTTP endpoint call, so a cronjob in background is writing results, and HTTP endpoint is reading. | ||
It can be harmful to the server to run all checks on each HTTP endpoint call, so the application is running them periodically every X seconds specified by **--refresh-time** switch or **REFRESH_TIME** environment variable (in docker) | ||
|
||
How often really the checks are performing depends on your configuration, how often you execute **infracheck --force** | ||
Refresh time | ||
------------ | ||
|
||
--force | ||
------- | ||
If you use an official docker image, then you can set an environment variable. | ||
|
||
The *--force* parameter means that the application will write checks results to a cache. | ||
Example: check once a day (good for domains whois check). | ||
|
||
When this flag is not specified, then application will read the data from the cache. | ||
.. code:: bash | ||
Docker | ||
------ | ||
REFRESH_TIME=86400 | ||
If you use an official docker image, then you can set CHECK_INTERVAL to a crontab-like syntax interval eg. **CHECK_INTERVAL=00 23 * * *** to check once a day (good for domains whois check). | ||
From CLI you can set **--refresh-time=86400** | ||
|
||
Limits | ||
------ | ||
Wait time | ||
--------- | ||
|
||
Some checks could call external APIs, those can have limits. A good example is a *domain-expiration* check which is using whois. | ||
It is recommended to run a separate infracheck instance with less frequent checking, eg. once a day - see CHECK_INTERVAL in docker, and crontab in standalone installation. | ||
|
||
You can also use `--wait` switch to set waiting in seconds between single checks (in docker it is `WAIT_TIME` variable) | ||
|
||
--lazy | ||
------ | ||
|
||
When running a ex. HTTP endpoint without `--force`, then application is only reading results of previously executed checks that are usually executed in background using cron. | ||
**Without lazy** the checks that were not executed yet will be showing "Not ready yet" and a **status equals to false**. | ||
If you really need to avoid such case, **then you can allow running a check on-demand by enabling** `--lazy` **flag** (LAZY=true in docker). | ||
Set **--wait=60** to for example wait 60 seconds before each check - where check is a single entry on the list of checks. |
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
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
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