When I login to my Ubuntu (18.04) boxes using ssh or on the console, I get a helpful messages telling me how many updates are outstanding, how many are security related and if a reboot is required. I would like to expose this information in my monitoring platform - but what generates it?
I've looked in /etc/profile, /etc/profile.d and ~/.bash_profile (/etc/motd does not exist) but I don't see anything there which would generate this.
apt list --upgradable | grep "\-security"
works but with dire warnings :(/etc/update-motd.d