diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-03-04 06:12:18 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-03-04 06:12:18 +0000 |
commit | 9ce221b58ff8e5df3707cdf7d2272600da25a303 (patch) | |
tree | 92a2b4a6d815a95ae0639b14cb2373d5786b6eed | |
parent | 26d529e6faaafa442e2b06093db1714f8f0b75bc (diff) | |
download | mangemanche-9ce221b58ff8e5df3707cdf7d2272600da25a303.tar.gz mangemanche-9ce221b58ff8e5df3707cdf7d2272600da25a303.tar.bz2 |
Add on-line documentation. Whitespace cleanup.
-rw-r--r-- | lib/App/Mangemanche.pm | 102 | ||||
-rw-r--r-- | lib/App/Mangemanche/Command.pm | 1 | ||||
-rw-r--r-- | lib/App/Mangemanche/Command/dbload.pm | 5 | ||||
-rw-r--r-- | lib/App/Mangemanche/Command/ident.pm | 1 | ||||
-rw-r--r-- | lib/App/Mangemanche/Command/inspect.pm | 1 | ||||
-rw-r--r-- | lib/App/Mangemanche/Command/ipadd.pm | 1 | ||||
-rw-r--r-- | lib/App/Mangemanche/Command/ipdel.pm | 0 | ||||
-rw-r--r-- | lib/App/Mangemanche/Command/nagios.pm | 3 | ||||
-rw-r--r-- | lib/Net/Ping903.pm | 1 |
9 files changed, 101 insertions, 14 deletions
diff --git a/lib/App/Mangemanche.pm b/lib/App/Mangemanche.pm index d719ecb..2bcbc44 100644 --- a/lib/App/Mangemanche.pm +++ b/lib/App/Mangemanche.pm @@ -36,6 +36,10 @@ sub new { -input => pod_where({-inc => 1}, $class), -verbose => 0) }, + 'version' => sub { + print "$0 version $VERSION\n"; + exit(EX_OK); + }, 'config|c=s' => \$config_file, 'url|u=s' => \$url ) or exit(EX_USAGE); @@ -149,7 +153,7 @@ sub list_commands { =head1 NAME -mangemanche - interface to B<ping903> daemon. +mangemanche - remote management interface to B<ping903> daemon. =head1 SYNOPSIS @@ -165,9 +169,105 @@ B<mangemanche> [B<-?>] [B<--help>] [B<--usage>] +[B<--version>] =head1 DESCRIPTION +Mangemanche provides remote management facilities for the running B<ping903> +daemon. First non-optional argument specifies the name of the I<command> to +run. Arguments following it supply options and arguments to that command. + +Mangemanche reads the IP address and port number of the B<ping903> management +socket from its configuration file, F</etc/ping903.conf>. If the file does +not exist, the default port (B<localhost:8080>) is used. The location of +both can be overridden in the command line. + +If the server requests HTTP authorization, the program will look up the +authorization credentials in the B<.ping903.cred> file located in the +home directory. Refer to L<ping903.cred>(5) for a detailed description. + =head1 OPTIONS +=over 4 + +=item B<-c>, B<--config=>I<FILE> + +Specifies alternative configuration file to use instead of +F</etc/ping903.conf>. + +=item B<-u>, B<--url=>I<FILE> + +Sets the URL of the B<ping903> management socket. + +=back + +=head2 Informative options + +Each of these options causes the program to display a particular piece of +information and exit with the zero status. Any other options and arguments +are ignored. + +=over 4 + +=item B<-?> + +Displays a short option reminder and lists the available commands with +their short descriptions. + +=item B<--help> + +Displays this manual page. + +=item B<--usage> + +Displays a terse command line usage summary. + +=item B<--version> + +Displays the program version and copyright information. + +=back + +=head1 COMMANDS + +This section summarizes the basic B<mangemanche> commands. Your installation +may provide more. Use B<mangemanche -?> to obtain the list of available +command. + +To see the manual for each particular command, run + + mangemanche COMMAND --help + +=head2 ident + +Displays B<ping903> server identification: package name, version number, +and main process PID. + +=head2 inspect + +Displays the actual B<ping903> server configuration. + +=head2 ipadd + +Adds a single IP to the mutable list of monitored IP addresses. + +=head2 ipdel + +Deletes a single IP from the mutable list of monitored IP addresses. + +=head2 nagios + +Extracts the list of monitored IP addresses from the Nagios configuration +and installs them in B<ping903>. + +=head2 dbload + +Load IP addresses from SQL database into B<ping903>. + +=head1 SEE ALSO + +L<ping903>(1), +L<ping903.conf>(5), +L<ping903.cred>(5). +=cut diff --git a/lib/App/Mangemanche/Command.pm b/lib/App/Mangemanche/Command.pm index 9857652..45eacfb 100644 --- a/lib/App/Mangemanche/Command.pm +++ b/lib/App/Mangemanche/Command.pm @@ -130,4 +130,3 @@ sub usage_error { } 1; - diff --git a/lib/App/Mangemanche/Command/dbload.pm b/lib/App/Mangemanche/Command/dbload.pm index c7ddf38..90188c8 100644 --- a/lib/App/Mangemanche/Command/dbload.pm +++ b/lib/App/Mangemanche/Command/dbload.pm @@ -236,8 +236,3 @@ L<DBI>, L<mangemache>. =cut - - - - - diff --git a/lib/App/Mangemanche/Command/ident.pm b/lib/App/Mangemanche/Command/ident.pm index a871b95..af86d83 100644 --- a/lib/App/Mangemanche/Command/ident.pm +++ b/lib/App/Mangemanche/Command/ident.pm @@ -71,4 +71,3 @@ Display a detailed program manual. =head1 SEE ALSO L<ping903>(1), L<ping903.conf>(5). - diff --git a/lib/App/Mangemanche/Command/inspect.pm b/lib/App/Mangemanche/Command/inspect.pm index 81f1049..8ad4221 100644 --- a/lib/App/Mangemanche/Command/inspect.pm +++ b/lib/App/Mangemanche/Command/inspect.pm @@ -82,4 +82,3 @@ and mutable IPs from the server configuration. =head1 SEE ALSO L<ping903>(1), L<ping903.conf>(5). - diff --git a/lib/App/Mangemanche/Command/ipadd.pm b/lib/App/Mangemanche/Command/ipadd.pm index 53c48b6..7a68d82 100644 --- a/lib/App/Mangemanche/Command/ipadd.pm +++ b/lib/App/Mangemanche/Command/ipadd.pm @@ -54,4 +54,3 @@ L<mangemache>, L<ipdel>. =cut - diff --git a/lib/App/Mangemanche/Command/ipdel.pm b/lib/App/Mangemanche/Command/ipdel.pm index ef4005b..0671973 100644 --- a/lib/App/Mangemanche/Command/ipdel.pm +++ b/lib/App/Mangemanche/Command/ipdel.pm diff --git a/lib/App/Mangemanche/Command/nagios.pm b/lib/App/Mangemanche/Command/nagios.pm index 7e42d01..fc21a37 100644 --- a/lib/App/Mangemanche/Command/nagios.pm +++ b/lib/App/Mangemanche/Command/nagios.pm @@ -102,6 +102,3 @@ L<ipadd>, L<ipdel>. =cut - - - diff --git a/lib/Net/Ping903.pm b/lib/Net/Ping903.pm index 2ca2006..0c38d51 100644 --- a/lib/Net/Ping903.pm +++ b/lib/Net/Ping903.pm @@ -139,4 +139,3 @@ sub set_ip_list { } 1; - |