#!/opt/vdops/bin/perl # This script walks the network, gathering hostname, sysDescr, and # sysObjectID on active IP addresses, inserting the results into Soma # Load modules use strict; use warnings; use Perl6::Say; use lib '/home/soma/lib'; use FHCRC::VDOPS::Foundation; use FHCRC::VDOPS::IPSpace; use FHCRC::VDOPS::QueryHost; use FHCRC::VDOPS::SomaCrud; use FHCRC::VDOPS::SomaData; use FHCRC::VDOPS::Utilities; # Notify operator log_it("Beginning $0"); say "Beginning $0" if $job eq 'interactive'; # Thread job doesn't work well here, so disable it $debug = 0; $thrMode = 1; # Tighten SNMP timeouts and strings $snmp_timeout = 2; @snmp_read_plebian = qw/public/; # Construct a foundation foundation(); # Query hosts for dns name, sysDescr, and sysObjectID walk_route_table(\&gather_host_snmp, 'gather_host_snmp', $processHostSnmpTimeout, \%excludeRoute); # Insert results iu_hosts_snmp(); # Notify operator log_it("Ending $0"); say "Ending $0" if $job eq 'interactive';