hi.
I'm trying to create a trigger to check last backup freshness.
This script return the timestamp of the last successful backup.
I also created a discovery rule which returns the enabled backups and the max age of it. Returned data is something like this (of course I can change maxage to whatever needed):
I managed to create the item, but how do I create the trigger? I had a look through the available expressions but didn't find one that could fit.
The function should be
but how do I generate the NOW()-#MAXAGE value? I tried
but it's not accepted (also it's missing the time span...).
Help appreciated.
thanks!
I'm trying to create a trigger to check last backup freshness.
This script return the timestamp of the last successful backup.
I also created a discovery rule which returns the enabled backups and the max age of it. Returned data is something like this (of course I can change maxage to whatever needed):
Code:
{"data":[
{ "{#TYPE}":"hourly", "{#MAXAGE}":"1d" },
{ "{#TYPE}":"daily", "{#MAXAGE}":"1d" },
{ "{#TYPE}":"weekly", "{#MAXAGE}":"7d" },
{ "{#TYPE}":"monthly", "{#MAXAGE}":"1m" }
]}
The function should be
Code:
last()
Code:
{Template App rsnapshot:rsnapshot.check[{#TYPE}].last()}<now()
Help appreciated.
thanks!
Comment