NAME

Monitoring::Sneck::Checks::packages - checks packages are or are not installed

VERSION

Version 0.0.1

SYNOPSIS

!no_telnet|control=CIS-2.3.4 framework=CIS|perl:packages -a telnet -a rsh-client
!auditd||perl:packages -i auditd -i audispd-plugins
!www_no_compilers||perl:packages -j www -a gcc13 -a llvm18

DESCRIPTION

Checks packages are installed, or are not, as given. Anything not as given is CRITICAL.

On Debian and its kin, the dpkg status file is read, and a package only counts as installed once fully installed, not if it was removed with its config files left. On FreeBSD, pkg query is run, for a jail too with --jail. Others are UNKNOWN.

OPTIONS

- -i, --installed :: A package that must be installed. May be given more than once.

- -a, --absent :: A package that must not be installed. May be given more than once.

- -j, --jail :: On FreeBSD, check the packages in this jail. UNKNOWN on other OSes.

One or more of --installed or --absent must be given.

METHODS

check

Does the check.

installed

Returns a hash ref of the names of the installed packages. Dies if they can not be found.