CACTI VIA PROXY

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

ha, forgot about that. you need to add the following line at the very top of the script ( depending where you installed perl to ):

Code: Select all

#!/usr/bin/perl
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Maher457
Cacti User
Posts: 54
Joined: Thu Jul 29, 2010 3:07 am
Location: Paris France

Post by Maher457 »

this doesn't resolve my problem
i have this message error when i run the script in the console:

Can't locate LWP/UserAgent.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at proxiedHttpCheck.pl line 2.
BEGIN failed--compilation aborted at proxiedHttpCheck.pl line 2.

any idea?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Sure, install the required perl module ( e.g. on CentOS ):

Code: Select all

yum install perl-libwww-perl
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Maher457
Cacti User
Posts: 54
Joined: Thu Jul 29, 2010 3:07 am
Location: Paris France

Post by Maher457 »

in the console when i run it I have 'U'
hope it works now i will wait and see if Cacti will graph this time
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

did you change the lines

Code: Select all

# Username/Password, for NTLM Auth use the following format
$proxyUsername="DOMAIN\\Username";
$proxyPassword="password"; 
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Maher457
Cacti User
Posts: 54
Joined: Thu Jul 29, 2010 3:07 am
Location: Paris France

Post by Maher457 »

yeah i change them
but in proxyname i put one slash insteed of the two slash
DOMAIN\Username
because we use this format in my society
i am still having no graph :-?
but now i have no more the old error:
SPINE: Poller[0] Host[248] ERROR: Empty result [website ip adress]: 'perl /var/www/html/scripts/proxiedHttpCheck.pl [proxy IP] 8080 [website ip adress]'
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

you need to have two slasshes as perl removes one anyway ... ( one backslash is a special symbol in perl )
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Maher457
Cacti User
Posts: 54
Joined: Thu Jul 29, 2010 3:07 am
Location: Paris France

Post by Maher457 »

ok i change it but still no value in the graph!!
but no more the error in the cacti log
do i have to do anything to update the graph to use the new script or it will use it automatically?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

well, first thing is: does the script print out a value now on the CLI or still just a "U" ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Maher457
Cacti User
Posts: 54
Joined: Thu Jul 29, 2010 3:07 am
Location: Paris France

Post by Maher457 »

no it prints just a 'U'!!
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

ok, try using "http://<ip>" for the url then ... seems like it needs this syntax
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Maher457
Cacti User
Posts: 54
Joined: Thu Jul 29, 2010 3:07 am
Location: Paris France

Post by Maher457 »

when i run the script it took some minutes and it printed 'U'
and now when i changed this when i wnat to connect to cacti via the navigator am not abel the page takes too much time and doent open yet :( :cry: what is happened?what should i do now?
Maher457
Cacti User
Posts: 54
Joined: Thu Jul 29, 2010 3:07 am
Location: Paris France

Post by Maher457 »

sorry it was a network problem!!
but i'm still having the same thing :-?
Maher457
Cacti User
Posts: 54
Joined: Thu Jul 29, 2010 3:07 am
Location: Paris France

Post by Maher457 »

i'm not sure the slowliness is from the netwrok ..It's only Cacti that's slow!!and now am not able to open it
what should i do?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

do a

Code: Select all

ps -ef
from the command line and check if there are numerous pollers or perl scripts running.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests