From 2a5cbfe5fa9930b3ac72a618e956a14878e20043 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Thu, 17 Mar 2016 21:42:19 +0000 Subject: NMS: Strip netmask from management ips where relevant --- clients/ping.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clients/ping.pl') diff --git a/clients/ping.pl b/clients/ping.pl index 47119f1..27aa878 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,ip,secondary_ip FROM switches WHERE ip is not null ORDER BY random()"); +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 $lq = $dbh->prepare("SELECT linknet,addr1,addr2 FROM linknets"); while (1) { -- cgit v1.2.3