NAME

Monitoring::Sneck::Checks::hosts - checks /etc/hosts

VERSION

Version 0.0.1

SYNOPSIS

hosts|perl:hosts
hosts_db|perl:hosts -e db.example.org=192.0.2.20 -e db=192.0.2.20

DESCRIPTION

Reads the hosts file. Lines that do not start with a IP, have no names, or have names that are not hostnames are WARNING, as is localhost not being in it. Not being able to read it is CRITICAL, as is a name given via --expect not mapping to the address given.

OPTIONS

- -f, --file :: The file. Default :: /etc/hosts

- -e, --expect :: "name=address", a name that must map to that address. May be given more than once.

- --no-localhost :: Do not require localhost to be in it.

METHODS

check

Does the check.