Internal documentation only
This page has been marked as draft.
How to setup the rule to alert 90, 60 & 30 days before expiry
Related to Copied
Create an alert for component expiry dates (YYYYMMDD HHMM format) in a cell. It should trigger notifications 90, 60, and 30 days prior to the expiry.
Requirement Copied
Need to set up the rule to alert 90, 60 & 30 days before expiry.
Solution(s) Copied
Implement a rule to calculate and alert 90, 60, and 30-day pre-expiry dates from a cell containing a YYYYMMDD HHMM-formatted expiry date
- Solution: Just need to tweak or adjust this FAQ: https://support.itrsgroup.com/hc/en-us/articles/115004021605-Geneos-Gateway-How-to-compute-the-difference-in-days-between-the-current-date-and-a-given-date
Use the following test dataview and was able to create a rule on the ExpiryDate column like below:
The idea is to use the parseDate function to convert the date string into Unix epoch time and compare the Unix epoch at the rule run time. To get the remaining days just divide the difference by the number of seconds in a day. So the rule block should look something like this:
set $(diffInDays) (parseDate("%Y%m%d%H%M", value) - now()) / 86400 if $(diffInDays) <= 30 then severity critical elseif $(diffInDays) > 30 and $(diffInDays) <= 60 then severity warning elseif $(diffInDays) > 60 and $(diffInDays) <= 90 then severity ok endif
Related article(s) Copied
[Guide: Provide the official documentation links of the related product feature mentioned above and other external references that would further help the user understand the problem/s and solution/s.]
- https://support.itrsgroup.com/hc/en-us/articles/115004021605-Geneos-Gateway-How-to-compute-the-difference-in-days-between-the-current-date-and-a-given-date
- https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_rulesactionsalerts_tr/index.html
- https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_rulesactionsalerts_tr/index.html#parsedate