aboutsummaryrefslogtreecommitdiffstats
path: root/clients
diff options
context:
space:
mode:
Diffstat (limited to 'clients')
-rwxr-xr-xclients/ping.pl2
-rwxr-xr-xclients/snmpfetchng.pl4
2 files changed, 3 insertions, 3 deletions
diff --git a/clients/ping.pl b/clients/ping.pl
index 174342a..3f4139e 100755
--- a/clients/ping.pl
+++ b/clients/ping.pl
@@ -15,7 +15,7 @@ my $dbh = nms::db_connect();
$dbh->{AutoCommit} = 0;
$dbh->{RaiseError} = 1;
-my $q = $dbh->prepare("SELECT switch,host(ip) as ip,host(secondary_ip) as secondary_ip FROM switches WHERE ip is not null ORDER BY random()");
+my $q = $dbh->prepare("SELECT switch,host(mgmt_v4_addr) as ip,host(mgmt_v6_addr) as secondary_ip FROM switches WHERE mgmt_v4_addr is not null ORDER BY random()");
my $lq = $dbh->prepare("SELECT linknet,addr1,addr2 FROM linknets");
while (1) {
diff --git a/clients/snmpfetchng.pl b/clients/snmpfetchng.pl
index 36dd675..630347d 100755
--- a/clients/snmpfetchng.pl
+++ b/clients/snmpfetchng.pl
@@ -23,13 +23,13 @@ $dbh->{RaiseError} = 1;
my $qualification = <<"EOF";
(last_updated IS NULL OR now() - last_updated > poll_frequency)
AND (locked='f' OR now() - last_updated > '15 minutes'::interval)
-AND ip is not null
+AND mgmt_v4_addr is not null
EOF
# Borrowed from snmpfetch.pl
our $qswitch = $dbh->prepare(<<"EOF")
SELECT
- sysname,switch,host(ip) as ip,community,
+ sysname,switch,host(mgmt_v4_addr) as ip,community,
DATE_TRUNC('second', now() - last_updated - poll_frequency) AS overdue
FROM
switches