Related to:
I want to alert on a date stamped cell if it has not updated in a specific time, alerting on date stamps, alert when not updating, alert on date value cell, alerting on timestamps
Problem
- You would like to be alerted whenever a dataview cell with a date-stamp formatted value is no longer updating or has not updated within a specific time range.
Possible Solution(s)
- You will need to use the following Rule functions called parseDate, as well as the now() function to get the baseline date values (presented in epoch format) for you to do your comparison within the Rule.
- You will need to take note of the time/date format parsing codes in order to use the parseDate function properly.
- In your Rule, where the rule target cell value corresponds to a time stamp, you will need to parse the date according to how the value is formatted, e.g. "Mon Aug 23 07:03:45 PM 2021"
- the parse code in the example above would be: "%a %b %d %I:%M:%S %p %Y"
- In the Rule example below, we have a target cell value and we would like to know if that date/time stamp value is already more than 30-days, which corresponds to more than 2,592,000 seconds:
-
set $(EpochTime_lastRebootTime) parseDate("%a %b %d %I:%M:%S %p %Y", value)
set $(now) now()
set $(delta) $(now) - $(EpochTime_lastRebootTime)
if $(delta) > 2592000 then
severity critical
else
severity ok
endif
-
- Since the date in the target value is already more than 30 days, the Rule has evaluated the cell as critical
Related Articles
- How do I compare dates in a rule?
- How to calculate difference between two dates and get it converted to seconds
If Issue Persists
- Please contact with our Client Services team via the chat service box available in any of our websites or via email to support@itrsgroup.com
- Make sure you provide to us:
- Screenshot of the dataview
- Rule XML configuration
- Show Rules command output on target cell
- Any troubleshooting step already verified from the ones described in this article.
Comments
0 comments
Please sign in to leave a comment.