Add unixtime option #2

Merged
bortzmeyer merged 1 commits from faust/check_expire:add-output into master 1 year ago
faust commented 1 year ago

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.

Also, remove some trailing whitespaces.

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. Also, remove some trailing whitespaces.
faust added 1 commit 1 year ago
342f89844b
Add unixtime option
bortzmeyer merged commit 86436ef1f0 into master 1 year ago
The pull request has been merged as 86436ef1f0.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: bortzmeyer/check_expire#2
Loading…
There is no content yet.