# Monitoring freebsd-update



## anselm (Feb 26, 2015)

I want to integrate the update status of the base system into my monitoring. Is there an easy way to query freebsd-update(8) or any other tool to give me information on whether there are updates available?

I thought of a way similar to what I can do with pkg: `pkg audit -q | wc -l` for example will give me an integer indicating the number of installed packages that have open vulnerabilities. I can perfectly integrate that metric into my monitoring.

I thought of the following possibilities to do the same with the base system, but none was satisfying for me so far:

Running `freebsd-update cron` periodically will produce mails from cron and is not nice to integrate into a monitoring like Zabbix.
freebsd-version(1) shows me the current kernel and base system version of my installation. Can I query the latest version online and compare it? It would however not indicate if my system configuration really needs an update.

If freebsd-update(8) runs periodically with `cron` or `fetch`, can I somehow how read the update status from `/var/db/freebsd-update`?
Somebody has a better idea?


----------



## NewGuy (Feb 27, 2015)

Though not available in FreeBSD by default, there is a package used by the PC-BSD branch that will check for either base system updates and/or package updates. I think the utility is part of the TrueOS-base package. Running `pc-updatemanager check` will search for upgrades to the base system and report back on available updates. That might give you better results than using plain freebsd-update(8).


----------



## reinhard (Jul 24, 2015)

AFAIK /var/db/freebsd-update/tag contains update version information.


----------

