Commit Graph

26 Commits

Author SHA1 Message Date
Stephane Bortzmeyer
014fe9fec5 Merge branch 'Seb35-issue-4' 2024-06-16 20:43:20 +02:00
Stephane Bortzmeyer
60a6410941 Merge branch 'issue-4' of https://forge.chapril.org/Seb35/check_expire into Seb35-issue-4 2024-06-16 20:40:29 +02:00
Stephane Bortzmeyer
4e17d48adb Merge branch 'Seb35-pull-request-6' 2024-06-16 20:37:52 +02:00
Stephane Bortzmeyer
f7e355702f Post-merge cleaning 2024-06-16 20:37:42 +02:00
Stephane Bortzmeyer
6d6f054a26 Iran RDAP server down 2024-06-16 20:36:55 +02:00
Stephane Bortzmeyer
30d4678e03 Merge branch 'pull-request-6' of https://forge.chapril.org/Seb35/check_expire into Seb35-pull-request-6 2024-06-16 20:36:43 +02:00
Stephane Bortzmeyer
9dc05e9c7b Error code outside of its visibility 2023-03-15 19:53:12 +00:00
3af8b31034 Fix two failing tests
By the way, converted the timeout parameter to a float.
2022-12-18 19:56:04 +01:00
0b10e8d563 Allow a specific cache directory or no cache
If the env var XDG_CACHE_HOME is set, the cache directory is
"$XDG_CACHE_HOME/ianardap", else if HOME is set, it is
"$HOME/.ianardapcaches", else no cache is used but a loud
warning is displayed at the end of the result to encourage
users to set a cache directory.

Adapted pytest tests, no change needed on test_exe_matrix. They are
obviously slower with no cache. NB: two tests now fail independently
of this change.

Issue: #4
2022-12-18 19:09:49 +01:00
Stephane Bortzmeyer
b3709c64e9 TODO task done 2022-11-09 15:17:35 +00:00
Stephane Bortzmeyer
46538fa620 * Tests updated
* Correct handling of forced refresh
2022-11-09 15:17:03 +00:00
Stephane Bortzmeyer
a117da20b1 New ianardap module, with support for several RDAP servers 2022-11-09 15:01:28 +00:00
Stephane Bortzmeyer
42f67a7e64 Domain names are case-insensitive 2022-10-24 18:11:32 +02:00
Stephane Bortzmeyer
7ddffa7fa5 Read and apply IANA's caching instructions. Closes #3 2022-10-08 16:59:11 +02:00
Stephane Bortzmeyer
04fb72e408 Pickle implemented (but not activated by default). Closes #1 2021-07-07 15:50:47 +02:00
Stephane Bortzmeyer
ae00a81f79 New code to retrieve the database, more robust 2021-07-07 15:23:26 +02:00
Stephane Bortzmeyer
09f5ccc3e4 Small cleanups 2021-07-07 12:08:37 +02:00
Stephane Bortzmeyer
65d8deb569 Documentation of timeout 2021-07-07 11:59:25 +02:00
Stephane Bortzmeyer
6b4f5b228e Timeouts in HTTP requests 2021-07-07 11:57:27 +02:00
Stephane Bortzmeyer
a3a1f8c0d4 Lock the cache file 2021-07-07 11:13:36 +02:00
Stephane Bortzmeyer
79032c1021 Fix usage and alphabetical order 2021-07-07 11:04:04 +02:00
86436ef1f0 Merge pull request 'Add unixtime option' (#2) from faust/check_expire:add-output into master
Reviewed-on: #2
2021-07-07 11:00:41 +02:00
342f89844b
Add unixtime option
Add an option to return the expiration date in unixtime (time since
epoch).

  ./check_expire -H domain -u

It's particularly useful for alerting or monitoring systems that do
their own calculation based on the metric they receive (and not based on
exit codes).

For instance you can use the following in zabbix 5.4:
- item: check_expire["-H","{HOST.CONN}","-u"]
- trigger: last(/check_expire["-H","{HOST.CONN}","-u"])-now()<2592000

Where 2592000 is 30 days in seconds.
2021-07-07 10:13:50 +02:00
Stephane Bortzmeyer
5c8a6af546 Icinga template 2021-07-05 21:04:34 +02:00
Stephane Bortzmeyer
ab3feeec4a First version 2021-07-05 20:49:49 +02:00
887e30d86a Initial commit 2021-07-05 19:56:43 +02:00