diff options
author | Ole Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com> | 2018-03-17 18:03:23 +0100 |
---|---|---|
committer | Ole Mathias Aa. Heggem <olemathias.aa.heggem@gmail.com> | 2018-03-17 18:03:23 +0100 |
commit | dc97b997e8d6e5edc63c598c05090a8b98e79757 (patch) | |
tree | 42762b3582ec8416cc70527c178dda6498b90f19 /collectors/ping.pl | |
parent | 8607a0880724eca35c220f7c26a138d9f0f50f72 (diff) |
Added support for delete switches
Diffstat (limited to 'collectors/ping.pl')
-rwxr-xr-x | collectors/ping.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/collectors/ping.pl b/collectors/ping.pl index 952932a..82c5c42 100755 --- a/collectors/ping.pl +++ b/collectors/ping.pl @@ -18,7 +18,7 @@ $dbh->{RaiseError} = 1; my $influx = nms::influx_connect(); -my $q = $dbh->prepare("SELECT switch,sysname,host(mgmt_v4_addr) as ip,host(mgmt_v6_addr) as secondary_ip FROM switches WHERE mgmt_v4_addr is not null or mgmt_v6_addr is not null ORDER BY random();"); +my $q = $dbh->prepare("SELECT switch,sysname,host(mgmt_v4_addr) as ip,host(mgmt_v6_addr) as secondary_ip FROM switches WHERE switches.deleted = false and (mgmt_v4_addr is not null or mgmt_v6_addr is not null) ORDER BY random();"); my $lq = $dbh->prepare("SELECT linknet,addr1,addr2 FROM linknets WHERE addr1 is not null and addr2 is not null;"); my $last = time(); |