| Cheshire Cat Computing http://steveshipway.org/forum/ |
|
| check_website http://steveshipway.org/forum/viewtopic.php?f=20&t=1708 |
Page 1 of 2 |
| Author: | venuwin [ Tue Jan 27, 2009 11:24 pm ] |
| Post subject: | check_website |
Hi, I had installed check_website plugin for nagios on ubuntu linux. When i run the ./check_website, i get the following error : ./check_website Can't locate LWP/UserAgent.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at ./check_website line 19. BEGIN failed--compilation aborted at ./check_website line 19. How do i go ahead ? Pls help. Thanks Venu |
|
| Author: | stevesh [ Wed Jan 28, 2009 5:44 pm ] |
| Post subject: | Re: check_website |
Install the Perl module LWP::UserAgent plus all dependencies. $ perl -MCPAN -e shell cpan> install Bundle::LWP (this installas all the LWP modules) Steve |
|
| Author: | venuwin [ Wed Jan 28, 2009 6:51 pm ] |
| Post subject: | Re: check_website |
I got this error when i did what you told..dont know why perl -MCPAN -e shell Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.7602) ReadLine support available (try 'install Bundle::CPAN') cpan> install Bundle::LWP CPAN: Storable loaded ok LWP not available CPAN: Net::FTP loaded ok Fetching with Net::FTP: ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz Trying with "/usr/bin/lynx -source" to get ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz Looking up http://www.perl87.cn Making FTP connection to http://www.perl87.cn Alert!: Unable to connect to FTP host. Looking up http://www.perl87.cn Making FTP connection to http://www.perl87.cn Alert!: Unable to connect to FTP host. Can't Access `ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz' Alert!: Unable to access document. lynx: Can't access startfile System call "/usr/bin/lynx -source "ftp://www.perl87.cn/CPAN/authors/01mailrc.tx .txt" returned status 1 (wstat 256) Warning: expected file [/root/.cpan/sources/authors/01mailrc.txt.gz] doesn't exi Trying with "/usr/bin/wget -O -" to get ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz --23:18:06-- ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz => `-' Resolving http://www.perl87.cn... 121.26.200.93 Connecting to http://www.perl87.cn|121.26.200.93|:21... failed: Connection timed out. Retrying. --23:21:16-- ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz (try: 2) => `-' Connecting to http://www.perl87.cn|121.26.200.93|:21... failed: Connection timed out. Retrying. --23:24:27-- ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz (try: 3) => `-' Connecting to http://www.perl87.cn|121.26.200.93|:21... failed: Connection timed out. Retrying. --23:27:39-- ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz (try: 4) => `-' Connecting to http://www.perl87.cn|121.26.200.93|:21... failed: Connection timed out. Retrying. --23:30:52-- ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz (try: 5) => `-' Connecting to http://www.perl87.cn|121.26.200.93|:21... failed: Connection timed out. Retrying. --23:34:06-- ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz (try: 6) => `-' Connecting to http://www.perl87.cn|121.26.200.93|:21... failed: Connection timed out. Retrying. --23:37:21-- ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz (try: 7) => `-' Connecting to http://www.perl87.cn|121.26.200.93|:21... failed: Connection timed out. Retrying. --23:40:37-- ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz (try: Connecting to http://www.perl87.cn|121.26.200.93|:21... failed: Connection timed out. Retrying. --23:43:54-- ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz (try: 9) => `-' Connecting to http://www.perl87.cn|121.26.200.93|:21... failed: Connection timed out. Retrying. --23:47:12-- ftp://www.perl87.cn/CPAN/authors/01mailrc.txt.gz (try:10) => `-' Connecting to http://www.perl87.cn|121.26.200.93|:21... |
|
| Author: | stevesh [ Thu Jan 29, 2009 10:44 am ] |
| Post subject: | Re: check_website |
You appear to be downloading the packages from a site in China? You need internet access (FTP) for this to work and automatically download packages. Also your mirror site needs to be up and available. Somehow you're configured to use a site in China for your packages, if this is not correct or the site is down you'll need to reconfigure to use a different mirror for CPAN. Try: perl -MCPAN -e shell cpan> o conf urllist pop cpan> o conf urllist push ftp://ftp.auckland.ac.nz/pub/CPAN/ cpan> install Bundle::LWP |
|
| Author: | venuwin [ Thu Jan 29, 2009 7:19 pm ] | ||
| Post subject: | Re: check_website | ||
|
|||
| Author: | venuwin [ Thu Jan 29, 2009 10:16 pm ] |
| Post subject: | Re: check_website |
Resolved the issue by doing "apt-get install libwww-perl". And also the auckland server was up to install the modules. Funniest part was that even after the perl installation, it was showing errors in some other .pm ..anyways, got fixed after installilng libwww package(??) |
|
| Author: | stevesh [ Mon Feb 02, 2009 11:41 am ] |
| Post subject: | Re: check_website |
Glad its working now, you were missing the UserAgent module but I never know which Linux package it will be kept in... |
|
| Author: | jmituzas [ Wed Nov 18, 2009 11:28 am ] |
| Post subject: | Re: check_website |
Hello, I have just tried to run ./check_website.pl and it returns this: Unable to open script.scr! I have latest perl installed and have giving the file the permissions of chmod +rwx check_website.pl Have also done as stated above, no errors there. And with the file the way it is now, nagios is giving an out-of-bounds error. Thanks in Advance, |
|
| Author: | stevesh [ Wed Nov 18, 2009 12:32 pm ] |
| Post subject: | Re: check_website |
You need to have created a check script for check_website to use. If you don't give the name of the script on the command line, it will assume a name of script.scr. If there is no script it exits with a -1 status (which is out of bounds for nagios, technically it should give status 3 (unknown) on a script error) Check what command line arguments you are giving the check_website script, and make sure you have created a checking script so it knows what URLs to retrieve. Steve |
|
| Author: | dkbkk1 [ Tue Aug 10, 2010 1:01 am ] |
| Post subject: | Re: check_website |
When i run ./check_website.pl i get: PROCESS COMPLETED. When i run it through Nagios i get "==> Added initial symbol HOST=www.youtube.com" in Status Information. I used the samples with only minimal changes (i changed the hostname and using only a FETCH in the scr-file). |
|
| Page 1 of 2 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|