I've been trying to add a field describing the status of the current rpm.
Basically I've been using execbeats to execute a command which returns all the currently installed rpms.
Now we have an internal tool which basically builds all rpms daily. So we can assume, if an RPM is older than last day 19:00, it is out of date.
Currently I'm already extracting the timestamp as a seperate STRING field.
It has the format of YYMMddHH ... so 21101819 as an example. Now the idea would be to do something like
[rpmtimestamp] >= "%{+YYMMdd}-{1 day}19"
Now I think there are 2 issues with this, first >= is probably not supported for strings as I get some huge error. Secondly, I don't know how I would implement (-1 day). Since you also have to consider end of month and such. (well technically I don't think you need to, if string comparison actually worked) I have seen a few suggestions with ruby, but I don't think it looks that readable so I was trying to get it to work like this. Is it possible? (Possibly with Int / string conversions)