Changed help screen a bit and added a README.md file
This commit is contained in:
parent
2206b61492
commit
a4946ae59e
14
README.md
Normal file
14
README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# nagios-bootstrap #
|
||||
This is a Bash script meant to aid system administrators to quickly get a
|
||||
Nagios instance up and running. The script scans through a specified host for
|
||||
open services and matches those services to avaliable Nagios checks/plugins
|
||||
found on the system. If the open service has a matching plugin it is added to
|
||||
the config file. Once every open service has been found (using Nmap) and
|
||||
matched to a plugin the script creates a config file with all the data. If the
|
||||
-o option is omitted, the config file will be printed to stdout.
|
||||
|
||||
## Usage ##
|
||||
To create a config file for the the host _host1.example.com_ and save the
|
||||
config in _host1.cfg_ issue the following
|
||||
command `./nagios-bootstrap.sh -H host1.example.com -o host1.cfg`. If the -o
|
||||
option is ommited the output will be printed to stdout instead.
|
@ -21,7 +21,6 @@
|
||||
################################################################################
|
||||
|
||||
# nagios-bootstrap
|
||||
# Version 0.1
|
||||
|
||||
# Binaries
|
||||
Which="/bin/which"
|
||||
@ -29,6 +28,7 @@ Binaries=(nmap sed awk printf ls grep egrep cut tr head)
|
||||
|
||||
# Variables
|
||||
Version="0.1"
|
||||
Author="Jack-Benny Persson <jack-benny@cyberinfo.se>"
|
||||
Plugindir="dummy_checks/"
|
||||
|
||||
|
||||
@ -49,14 +49,17 @@ done
|
||||
# Define functions
|
||||
print_usage()
|
||||
{
|
||||
$Printf "Usage: `basename $0` -H <host> -o <output-file> -h (help)\n"
|
||||
$Printf "\n`basename $0`\nVersion $Version\n"
|
||||
$Printf "$Author\n\n"
|
||||
$Printf "Usage: `basename $0` -H <host> -o <output-file> -h (help)\n\n"
|
||||
}
|
||||
|
||||
print_help()
|
||||
{
|
||||
print_usage
|
||||
$Printf "-h This help screen\n"
|
||||
$Printf "-H Host to scan and bootstrap for Nagios\n"
|
||||
$Printf "-o Output file to save the configuration file in\n"
|
||||
$Printf "-o Output file to save the configuration file in\n\n"
|
||||
}
|
||||
|
||||
# Parse options and arguments
|
||||
|
Loading…
x
Reference in New Issue
Block a user