Verified Commit 5caf68a7 authored by Adrian Schollmeyer's avatar Adrian Schollmeyer
Browse files

Add manpages for existing scripts


Signed-off-by: Adrian Schollmeyer's avatarAdrian 'nex' Schollmeyer <adrian.schollmeyer@fem.tu-ilmenau.de>
parent 1fb370b1
......@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
* `export-netbox-to-dokuwiki.py`
* support for retrieving the LDAP password from a command line instead of a hard-coded value
* support for exporting statistics about the NetBox-Wiki-export to an Icinga2 API as check result
* Manpages for existing scripts
### Changed
* Included describing comments in example configuration
......
.TH EXPORT-NETBOX-TO-DOKUWIKI 1 2021-05-28 GNU "FeM manual"
.SH NAME
export-netbox-to-dokuwiki \- Script to export most of NetBox's data to a set of DokuWiki pages
.SH SYNPOSIS
.B export-netbox-to-dokuwiki
.RB [ Options... ]
.SH DESCRIPTION
.B export-netbox-to-dokuwiki
queries a NetBox instance for the most important data and exports it in DokuWiki-format.
The export can be either as text files to a local directory or as actual wiki pages via the DokuWiki XML-RPC API.
Configuration happens mostly via a configuration file, but there are a few important options.
Please read the comments in the example configuration file for information about the configuration file.
.SH OPTIONS
.TP
.BR -h | --help
Print the help message and exit.
.TP
.BR -c | --config \c
.I " file-name"
Load the configuration file
.IR file-name .
If unspecified, the default configuration file path
.B /etc/fem-netbox-user-scripts.conf
will be used to load the configuration file.
.TP
.BR -w | --wiki-export
Export the generated wiki pages to a DokuWiki instance via the XML-RPC API.
.TP
.BR -d | --destination \c
.I " destination-directory"
Export the generated wiki pages as text files to a local
.IR destination-directory .
.TP
.BR -P | --progress
Enable a progress bar in the terminal to inform about the current export process.
While this option should not be used in automated scripts like cronjobs, it is useful when the script is executed directly from an interactive shell to get a visual clue on the current progress.
As both the NetBox API and the DokuWiki API tend to be slow (the export, as of May 2021, takes about 30 minutes), it can be quite useful to have a visual clue that the script it not stuck somewhere.
.TP
.BR -S | --submit-check-result
Submit the check result to an Icinga2 API after the script has finished.
For this to work, the configuration parameters of the
.I icinga
section in the configuration file need to be set appropriately.
.SH EXIT STATUS
.B export-netbox-to-dokuwiki
returns 0 on success and a non-zero return value whenever an exception or error occurs.
.TH GET-ARUBA-AP-UPLINKS 1 2021-05-28 GNU "FeM manual"
.SH NAME
get-aruba-ap-uplinks \- Script to retrieve uplink switch ports of Aruba APs documented in FeM's NetBox instance.
.SH SYNPOSIS
.B get-aruba-ap-uplinks
.RB [ Options... ]
.B get-aruba-ap-uplinks
outputs a newline-separated list of switch/port combinations, which are uplink ports of Aruba access points which are documented in the NetBox instance.
Using certain filters, the output can be limited either to a specific house's access points or access points whose uplink ports are on a certain switch.
Configuration is passed via a configuration file and command-line parameters.
Please read the comments in the example configuration file for information about the configuration file.
.SH OPTIONS
.TP
.BR -h | --help
Print the help message and exit.
.TP
.BR -c | --config \c
.I " file-name"
Load the configuration file
.IR file-name .
If unspecified, the default configuration file path
.B /etc/fem-netbox-user-scripts.conf
will be used to load the configuration file.
.TP
.BR -b | --block \c
.I " block-name"
Query only access points belonging to a certain house/block.
In reality, this can be any Site within NetBox.
.I block-name
must be the Site's slug.
.TP
.BR -s | --switch \c
.I " switch"
Query all access points, but output only switch ports belonging to
.IR switch .
.I switch
can be any switch name.
.SH OUTPUT FORMAT
The output is a list of switch ports where each item is on a new line.
Items have the form
.IR switch-name / port-name
where
.I switch-name
is the name of the switch whose port is being referenced and
.I port-name
is the name of the port being referenced.
Please note that those port names are not port numbers, so the output is not directly suitable for SNMP commands.
.SH EXIT STATUS
.B get-aruba-ap-uplinks
returns 0 on success and a non-zero return value whenever an exception or error occurs.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment