Skip to content

Commit

Permalink
Updates docs to describe use of the new report command.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnsnyder committed Jul 24, 2014
1 parent f01a863 commit 80faffb
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 24 deletions.
49 changes: 33 additions & 16 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,18 @@ profile item has parameters for name, auth, ports, and range.) For example:
"192.168.123.1 - 192.168.123.200"
]
}
],
"version": 1
],
"reports": [
{
"name": "basic",
"output_filename": "basic.csv",
"report_format": [
"date.date",
"uname.os"
]
},
]
"version": 3
}

Running the scan is simple. Just point the rho tool to the profile (or
Expand Down Expand Up @@ -162,15 +172,17 @@ The basic syntax is:

rho command subcommand [options]

There are three rho commands:
There are four rho commands:

* auth, for managing auth entries

* profile, for managing profile entries

* report, for managing report entries

* scan, for running scans

auth and profile both have three subcommands:
auth, profile, and report both have three subcommands:

* add to create a new entry

Expand Down Expand Up @@ -216,7 +228,14 @@ Then, create the profile to use for the scan. This should include a list of IP
addresses or ranges, the auth identity to use, and the SSH ports to try.

rho profile edit --name profile1 --range "1.2.3.0 - 1.2.3.255" --auth
server1creds --auth server2creds --ports 22,318,415
server1creds --auth server2creds --ports 22,318,415

REPORTS
Optionally, create a report to save report-formats for the scan. This should include a list of fields that constitute the report along with an optional output filename to always write this report to. The provided fields should be from the list reported by 'rho scan --show-fields'

rho report add --name basic --fields date.date,uname.os

With no output filename specified the output file name defaults to NAME.csv where NAME is the provided name of the report.


SCANNING
Expand Down Expand Up @@ -282,7 +301,7 @@ available report fields (which may change with every version).
uname.processor:uname -p (processor)

The output can then be configured to contain any combination of these fields in
the --report-format option. The only three required fields are
the --report-format option or by defining a report using the report command. The only three required fields are
ip,port,authname. For example:

rho scan --profile myprofile --output /home/me/custom.csv --report-format
Expand All @@ -305,6 +324,14 @@ any potential damage or security problems.
The rho user should have read permissions to things like install-num and the
RHN systemid files, which are normally only readable by root.

INITIALIZING CONFIG
*******************
The rho tool can generate a config with a few default items to help get started (at this time this includes only pre-defined reports).
To do this run:
rho initconfig

Note: if a new config file is not specified with --config this will overwrite the default config: ~/.rho.conf

SCHEDULING SCANS
****************
It is possible to schedule rho scans as cron jobs, to run routinely. BE VERY
Expand Down Expand Up @@ -369,16 +396,6 @@ subnet.
* Outputs results to CSV file reports.
* Allows the report format to be customized.

*~*~*~*~*
PACK-SCAN
~*~*~*~*~
Running pack-scan.sh [username] [file of hosts] will run the pack-scan report
against the provided file of hosts using the given username.
If there is no shared ssh key with the provided username, you will be prompted
for the password on the command line.
The script will output the pack-scan report to pack-scan.csv in the directory
from which it was run.

*~*~*~*
CONTACT
~*~*~*~
Expand Down
76 changes: 68 additions & 8 deletions doc/rho.1
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ rho
.SH DESCRIPTION
rho is a network discovery tool to identify the number of systems running on a network, their operating system, hardware, and release numbers for almost any Linux or Unix flavor. Being able to identify the systems running on the network is a vital component to managing licenses and renewals. Ultimately, discovery is part of the larger sysadmin task of managing inventories.
.PP
rho uses two configuration entries to manage the discovery process.
rho uses three configuration entries to manage the discovery process.
.I Profiles
define the network or subnet that is being monitored.
.I Credentials
contains the usernames, passwords or, alternatively, the SSH keys of the user as which discovery runs. There can be multiple network profiles and authentication credentials, used in any combination.
.I Reports
define the fields and output filename that will be run with a scan.
.PP
rho is an
.I agentless
Expand All @@ -22,7 +24,7 @@ discovery tool, so there is no need to install anything on multiple systems. OS
This man page covers the commands, subcommands and options for rho with basic usage information. For more detailed information and examples, including best practices, see the rho README.

.SH USAGE
rho performs three major tasks:
rho performs four major tasks:
.PP
1. Creating authentication profiles. This has the basic command:
.PP
Expand All @@ -32,15 +34,19 @@ rho performs three major tasks:
.PP
.B rho profiles add --name X --range X --auth X
.PP
3. Running discovery, such as:
3. Creating report profiles. This has the basic command:
.PP
.B rho scan --profile X
.B rho report add --name X --fields X,Y,Z
.PP
4. Running discovery, such as:
.PP
.B rho scan --profile X --report Y
.PP
The following sections cover these commands in more detail.
.PP
The primary purpose of rho is to scan a network. This can be done using simply 'rho scan' and passing all of the required network parameters and authentication credentials with every discovery pass. Using network and authentication profiles, however, simplifies discovery.
The primary purpose of rho is to scan a network. This can be done using simply 'rho scan' and passing all of the required network parameters and authentication credentials with every discovery pass. Using network, authentication, and report profiles, however, simplifies discovery.
.PP
By default, the authentication credentials and profiles created using rho are stored in an encrypted file, $HOME/.rho.conf. The file is encrypted with AES-128 encryption and is decrypted when the 'rho' command is run, using a passphrase to access the file.
By default, the authentication credentials, profiles, and reports created using rho are stored in an encrypted file, $HOME/.rho.conf. The file is encrypted with AES-128 encryption and is decrypted when the 'rho' command is run, using a passphrase to access the file.


.SS AUTHENTICATION
Expand Down Expand Up @@ -167,7 +173,7 @@ This required argument sets the name of the new profile. This name is used to id
.PP
.TP
--hosts file
This adds the hostnames in the provided file (one per line) to the profile.
This adds the hostnames in the provided file (csv) to the profile.
.PP
.TP
--range ip_address
Expand Down Expand Up @@ -261,7 +267,61 @@ Any or all profiles can be deleted using the 'clear' subcommand.
.I name
.B | --all


.SS REPORTS
.I Reports
define a list of fields along with a file to output to.
IMPORTANT: The file specified is overwritten everytime the report is run.
.PP
.B
Creating and Editing Reports
.PP
A report is a named set of fields along with an output file name. A report can be created as follows:
.PP
.B rho report add --name
.I name
.B --fields
.I <fields>
.B [--output
.I filename
.B ]
.PP
Here <fields> is a comma seperated list of fields.
.PP
Editing a report is done in the same way as a profile with two extra options:
.PP
.B rho report edit --name
.I name
.B --fields
.I <fields>
.B [--output
.I filename
.B ] [--add]
.B [--remove]
.PP
The --add and --remove options modify the behavior of the --fields option. With --add the fields provided by the --fields option are appended (added) to the list of fields in the report.
.PP Note: This does not remove duplicates.
.PP The --remove option removes the field(s) provided with the --fields option from the report.
.PP If neither --add or --remove are specified the entire list of fields for the given report are overwritten.
.B
Listing and Showing Reports
.PP Listing and showing reports can be done in the same way as with profiles.
.PP To list reports:
.PP
.B rho report list
.PP
.PP To show a specific report:
.PP
.B rho report show --name
.I name
.PP
.B
Deleting Reports
.PP All reports can be deleted as follows:
.B rho report clear --all
.PP A specific report can be deleted using the --name option:
.B rho report clear --name
.I reportname
.PP
.SS SCANNING
The 'scan' command is the one that actually runs discovery on the network. This command scans all of the servers within the range, and then prints the information to a CSV file.
.PP
Expand Down

0 comments on commit 80faffb

Please sign in to comment.