#336 new "stats" command for netdisco-do
This commit is contained in:
@@ -124,6 +124,12 @@ unless ($action) {
|
||||
return ('done', 'Generated monitor data.');
|
||||
}
|
||||
|
||||
use App::Netdisco::Util::Statistics ();
|
||||
sub stats {
|
||||
App::Netdisco::Util::Statistics::update_stats();
|
||||
return ('done', 'Updated statistics.');
|
||||
}
|
||||
|
||||
sub show {
|
||||
my ($self, $job) = @_;
|
||||
my ($device, $port, $extra) = map {$job->$_} qw/device port extra/;
|
||||
@@ -397,6 +403,10 @@ pass an SQL statement in the C<-e> option then it will be executed.
|
||||
~netdisco/bin/netdisco-do psql -e 'SELECT ip, dns FROM device'
|
||||
~netdisco/bin/netdisco-do psql -e 'COPY (SELECT ip, dns FROM device) TO STDOUT WITH CSV HEADER'
|
||||
|
||||
=head2 stats
|
||||
|
||||
Updates Netdisco's statistics on number of devices, nodes, etc, for today.
|
||||
|
||||
=head2 location
|
||||
|
||||
Set the SNMP location field on the device (specified with C<-d>). Pass the
|
||||
|
||||
Reference in New Issue
Block a user