DNS Server Response Time: Script & Templates
Moderators: Developers, Moderators
dig only use "msec" and don't switch to second, at least in version 8.4.6 .
But, I don't know if it use the local resolver cache because it should not.
The perl script will be pretty straight forward. The only problem is it relies on the fact that dig have to be installed locally on the cacti machine, it's not true for the majority of the OSes.
An other solution could be a script that connect to the DNS sever via SSH and launch a dig command remotely ...
I have tested dig and dnsResponseTime.pl measurement, the first give me an average of 4 ms et the second 12 ms, which one is righter ?
But, I don't know if it use the local resolver cache because it should not.
The perl script will be pretty straight forward. The only problem is it relies on the fact that dig have to be installed locally on the cacti machine, it's not true for the majority of the OSes.
An other solution could be a script that connect to the DNS sever via SSH and launch a dig command remotely ...
I have tested dig and dnsResponseTime.pl measurement, the first give me an average of 4 ms et the second 12 ms, which one is righter ?
I am having the same problem, except mine is stuck at 1k...Delta wrote:I have discovered the problem. The script name was dnsResponseTime.pl so cacti could not find it. I have rename it in dnsResponseTimeLoop.pl and now is drawing something on the graphs but I don't know if those are the true values. The graph shows on all values number -2.00 K and does not move from this point.
Empty result
Hi
i have a problem the result is empty, here is entries off the poller.log
11/21/2006 10:48:56 AM - CACTID: Poller[0] Host[2] ERROR: Empty result [hcsztws16158.hcst.com]: 'perl C:/cacti/scripts/dnsResponseTimeLoop.pl -s xx.xx.xx.xx -h cacti.xxxx.com -t 9 -i 10 -r -d 10'
11/21/2006 10:48:56 AM - CACTID: Poller[0] Host[2] DS[804] SCRIPT: perl C:/cacti/scripts/dnsResponseTimeLoop.pl -s xx.xx.xx.xx -h cacti.xxxx.com -t 9 -i 10 -r -d 10, output: U
have someone a idea?
bye Holger
i have a problem the result is empty, here is entries off the poller.log
11/21/2006 10:48:56 AM - CACTID: Poller[0] Host[2] ERROR: Empty result [hcsztws16158.hcst.com]: 'perl C:/cacti/scripts/dnsResponseTimeLoop.pl -s xx.xx.xx.xx -h cacti.xxxx.com -t 9 -i 10 -r -d 10'
11/21/2006 10:48:56 AM - CACTID: Poller[0] Host[2] DS[804] SCRIPT: perl C:/cacti/scripts/dnsResponseTimeLoop.pl -s xx.xx.xx.xx -h cacti.xxxx.com -t 9 -i 10 -r -d 10, output: U
have someone a idea?
bye Holger
-
- Cacti Guru User
- Posts: 1884
- Joined: Mon Oct 16, 2006 5:57 am
- Location: United Kingdom
- Contact:
Looks like you need to specify the complete path to the PERL binaries. From version "g", you can't state "PERL". For example, you'd need to change your PERL path to "/usr/bin/perl".
Hope this helps ?
Hope this helps ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
i tried running this script from windows os command line
dnsResponseTimeLoop.pl -s x.x.x.x -h google.com -t 9 -i 300 -r -d 10
output
Can't locate Net/DNS.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .)
at dnsResponseTimeLoop.pl line 3.
BEGIN failed--compilation aborted at dnsResponseTimeLoop.pl line 3
can this be ported to windows? thanks
dnsResponseTimeLoop.pl -s x.x.x.x -h google.com -t 9 -i 300 -r -d 10
output
Can't locate Net/DNS.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .)
at dnsResponseTimeLoop.pl line 3.
BEGIN failed--compilation aborted at dnsResponseTimeLoop.pl line 3
can this be ported to windows? thanks
POLLER: Poller[0] Maximum runtime of 296 seconds exceeded. Exiting.
I changed under [Data Input Methods [edit: DNS Response Time]
from
scripts/dnsresponsetimeloop.pl -s <serveraddr> -h <hostname> -t 9 -i 300 -r -d 10 (300 seconds)
to
scripts/dnsresponsetimeloop.pl -s <serveraddr> -h <hostname> -t 9 -i 60 -r -d 10 (60 seconds)
I'm guessing that as 296 seconds is being exceeded you can up this value to just below that figure and should work fine?
I changed under [Data Input Methods [edit: DNS Response Time]
from
scripts/dnsresponsetimeloop.pl -s <serveraddr> -h <hostname> -t 9 -i 300 -r -d 10 (300 seconds)
to
scripts/dnsresponsetimeloop.pl -s <serveraddr> -h <hostname> -t 9 -i 60 -r -d 10 (60 seconds)
I'm guessing that as 296 seconds is being exceeded you can up this value to just below that figure and should work fine?
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
Did anyone find a good solution for some of the issues here?
If I let Cacti (0.8.6.j) just run, I get a POPEN failure in the log.. If I run:
manually, then it sits there (I'm guessing this is right though).
If I change -i 300 to -i 10, then does that screw up the results at all?
If I let Cacti (0.8.6.j) just run, I get a POPEN failure in the log.. If I run:
Code: Select all
/usr/bin/perl /var/www/cacti/scripts/dnsResponseTimeLoop.pl -s 192.168.50.3 -h www.google.com -t 9 -i 300 -r -d 10
If I change -i 300 to -i 10, then does that screw up the results at all?
adrianmarsh,
I run it manually and I get the results below.
I wonder if running from root does it.
When I change the -i option, it runs for that many seconds.
I changed mine to 60 because I do one minute polling
-d looks to be how long it takes to fire off again , so in 60 seconds it happens 6 times.
Did you wait the full 5 minutes to see any output?
[root@localhost ~]# perl /var/www/html/scripts/dnsResponseTimeLoop.pl -s 10.10.2.4 -h www.google.com -t 9 -i 60 -r -d 10
min:3 median:3 avg:4 max:9 iter:6
My log shows below
04/23/2007 10:23:37 AM - CACTID: Poller[0] Host[380] DS[17254] WARNING: Result from SCRIPT not valid. Partial Result: ...
04/23/2007 10:23:37 AM - CACTID: Poller[0] Host[380] ERROR: The POPEN timed out
Also, if I do: top -u apache -c it shows what I believe what should be running
[root@localhost ~]# 7605 apache 17 0 10628 7660 1828 S 0.0 0.2 0:00.18 /usr/bin/perl /var/www/html/scripts/dnsResponseTimeLoop.pl -s 10.10.2.4 -h www.google.com -t 9 -i 60 -r -d 10
I run it manually and I get the results below.
I wonder if running from root does it.
When I change the -i option, it runs for that many seconds.
I changed mine to 60 because I do one minute polling
-d looks to be how long it takes to fire off again , so in 60 seconds it happens 6 times.
Did you wait the full 5 minutes to see any output?
[root@localhost ~]# perl /var/www/html/scripts/dnsResponseTimeLoop.pl -s 10.10.2.4 -h www.google.com -t 9 -i 60 -r -d 10
min:3 median:3 avg:4 max:9 iter:6
My log shows below
04/23/2007 10:23:37 AM - CACTID: Poller[0] Host[380] DS[17254] WARNING: Result from SCRIPT not valid. Partial Result: ...
04/23/2007 10:23:37 AM - CACTID: Poller[0] Host[380] ERROR: The POPEN timed out
Also, if I do: top -u apache -c it shows what I believe what should be running
[root@localhost ~]# 7605 apache 17 0 10628 7660 1828 S 0.0 0.2 0:00.18 /usr/bin/perl /var/www/html/scripts/dnsResponseTimeLoop.pl -s 10.10.2.4 -h www.google.com -t 9 -i 60 -r -d 10
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
Who is online
Users browsing this forum: No registered users and 3 guests