X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=clients%2Fsmanagrun.pl;h=d02d731b20efe7e4302913abc3e6ae85b3012a7e;hb=1e7869f8141084245dcd34fb065f38a418517e7b;hp=e66cfd26469b68e3267c62cf1becc3db951a8a46;hpb=d6cfbb682b3492d24b6623fbf1345c5b2b95f230;p=nms diff --git a/clients/smanagrun.pl b/clients/smanagrun.pl index e66cfd2..d02d731 100755 --- a/clients/smanagrun.pl +++ b/clients/smanagrun.pl @@ -7,6 +7,8 @@ use strict; use Net::Telnet; use DBI; use POSIX; +use lib '../include'; +use nms; # Tweak and check my $password = 'removed'; @@ -14,9 +16,7 @@ my $timeout = 15; my $delaytime = 30; my $poll_frequency = 60; -my $dbh = DBI->connect("dbi:Pg:dbname=snmpfetch;host=violet.tg05.gathering.org", - "snmpfetch", "removed") - or die "Couldn't connect to database"; +my $dbh = db_connect(); $dbh->{AutoCommit} = 0; my $spoll = $dbh->prepare("