NAME
sneck - a boopable LibreNMS JSON style SNMP extend for remotely running nagios style checks akin to NRPE
SYNOPSIS
sneck -u [-C <cache file] [-f <config file>] [-p] [-i] [-d] [-q] [-l] [-P <pid dir>] [-r]
sneck -c [-C <cache file] [-b]
sneck [-f <config file>] [-p] [-i] [-r]
sneck -t [-f <config file>]
DESCRIPTION
For a description of the config file format and output, please see Monitoring::Sneck.
FLAGS
-f <config file>
The config file to use.
Files ending in .yaml or .yml are read as YAML, which needs YAML::XS. See Monitoring::Sneck::Config for both formats.
Default :: /usr/local/etc/sneck.conf
-p
Pretty it in a nicely formatted format.
-C <cache file>
The cache file to use.
Default :: /var/cache/sneck.cache
A secondary cache file based on this name is also created. By default it is /var/cache/sneck.cache.snmp and always holds the GZip+BASE64 compressed version.
-u
Update the cache file. Will also print the was written to it.
-c
Print the cache file. Please note that -p or -i won't affect this as this flag only reads/prints the cache file.
-b
When used with -c, print the LibreNMS style GZip+BASE64 compressed cache instead.
-i
Includes the config file used.
-d
Print debugging info if called with -u.
-q
Don't print the results for -u. Exit queitly.
-l
Enable locking for with -u so more than one instance can't run at a time.
The PID file is sneck.pid in the directory set by -P.
-P <pid dir>
The directory for the PID file used by -l. The user running sneck must be able to write to it.
Default :: /var/run
-r
Run any restarts whose checks failed. Without this, restarts are only reported as 'restarts disabled'. Meant to be used with -u from cron. Never use it from snmpd.
Restart state, used for min_interval and max_retries, is kept in the cache file name with '.restarts' added, so by default /var/cache/sneck.cache.restarts.
Use -l with this to make sure two runs can't restart things at the same time. Without -l, a warning saying so is printed to stderr.
See Monitoring::Sneck::Config for how restarts are configured.
-t
Test the config file. Prints any errors and warnings, then exits 0 if there are no errors and 1 if there are or the file can't be read. Warnings, such as a check using a undefined variable, do not affect the exit code.