Generic way to check if pkg/freebsd-update would provides updates

Greetings

I am trying to write a Nagios/Icinga check for upgradeable packages.
Is there a way to check, after running pkg update, if there are updates available so i can return it to the monitoring system?
Also, same question for freebsd-update.
 
That worked out fine, icinga2 now notifies me when new packages are available on any of the monitored machines.
Now how would i got about this with freebsd-update. Are there any files freebsd-update cron creates or modifies, which i would be able to check? freebsd-update cron should download the patches automatically right? I simply could check if the directory it uses (no idea which) is populated right?
 
Back
Top