CACTI VIA PROXY
Moderators: Developers, Moderators
CACTI VIA PROXY
hello is there any way to supervise internet from cacti via proxy?because now i supervise it directly via a firewall and directly to the internet.
Thanks
Thanks
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Attach a picture,
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
In my society from our post we have an account that will redirect us to proxy and we pass to internet via proxy
with my cacti on my post i measure the HTTP response time of a website.
But cacti don't pass by a proxy it pass directly to internet.So it's complicated to give cacti an account and tell it to pass via a proxy i don't how to do.
Do you know what should i do?
or do u have another solution that cacti that measure the time of HTTP response and graph it from my post
Thank you
with my cacti on my post i measure the HTTP response time of a website.
But cacti don't pass by a proxy it pass directly to internet.So it's complicated to give cacti an account and tell it to pass via a proxy i don't how to do.
Do you know what should i do?
or do u have another solution that cacti that measure the time of HTTP response and graph it from my post
Thank you
- Attachments
-
- cacti.JPG (638.12 KiB) Viewed 19515 times
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Well your first problem is that you will get false positives if you are going through a proxy. So, you might have to go to a push type method. However, I imagine that you will have even more issues related to getting data 'in' from the internet.
If the proxy is automatic and requires no authentication, you will have to setup a port that does not cache responses on the proxy and use that for your response time request. Then it becomes no different than a firewall.
TheWitness
If the proxy is automatic and requires no authentication, you will have to setup a port that does not cache responses on the proxy and use that for your response time request. Then it becomes no different than a firewall.
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
I guess if you are able to control the content of the webpage ( e.g. adding meta headers to tell the proxy not to cache it, always provide some dynamic content etc.) caching shouldn't be too much of a concern ?
For the auth, you could use a script which goes and fetches the webpage and returns a number you can use to put into cacti ( Data inpuit methods ...)
The following perl code works for NTLM based proxies, too ...
For the auth, you could use a script which goes and fetches the webpage and returns a number you can use to put into cacti ( Data inpuit methods ...)
The following perl code works for NTLM based proxies, too ...
Code: Select all
#!/usr/bin/perl
use LWP::UserAgent;
use HTTP::Request::Common;
use Time::HiRes qw { time };
# Get the arguments from command line, or set them static here.
$proxyServer = $ARGV[0];
$proxyPort = $ARGV[1];
$url = $ARGV[2];
# Username/Password, for NTLM Auth use the following format
$proxyUsername="DOMAIN\\Username";
$proxyPassword="password";
# Set up the ntlm client
# and then the base64 encoded ntlm handshake message
$ua = new LWP::UserAgent(keep_alive=>1);
$ua->proxy(http => 'http://'.$proxyServer.':'.$proxyPort);
# Set the proxy and credentials to use for that proxy.
$netloc = "$proxyServer:$proxyPort";
$ua->credentials($netloc, '', $proxyUsername, $proxyPassword);
my $startTime = time();
# Start the URL retrieval
$request = GET $url;
$response = $ua->request($request);
# End of URL retrieval
$totaltime = time() - $startTime;
if ($response->is_success) {
print $totaltime;
}
else {
print "U";
}
Last edited by phalek on Thu Sep 16, 2010 3:16 am, edited 1 time in total.
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
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
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Almost indistinguishable from PHP these days
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Yeah
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
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
Thank you for your script that's exactly what i need but i didn't understand where to put ur script.
I'm doing a measure of HTTP response time that i found in the forum.
here's the code it's called http_nrpe.pl and it uses a file check_http
i have attached this script.
should i put ur script in the http_nrpe.pl down the already existing code?or where?
please help
thank you
I'm doing a measure of HTTP response time that i found in the forum.
here's the code it's called http_nrpe.pl and it uses a file check_http
i have attached this script.
should i put ur script in the http_nrpe.pl down the already existing code?or where?
please help
thank you
- Attachments
-
- nrpe_http.pl
- (272 Bytes) Downloaded 3439 times
-
- cacti.JPG (2.25 MiB) Viewed 19280 times
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
I would change the input string to:
where "proxiedHttpCheck.pl" is the script posted by me,
"10.0.10.1" needs to be your proxy server
"8080" is the port of your proxy.
that should do it.
Code: Select all
perl <path_cacti>/scripts/proxiedHttpCheck.pl 10.0.10.1 8080 <ip>
"10.0.10.1" needs to be your proxy server
"8080" is the port of your proxy.
that should do it.
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
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
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
The code is complete so far.
You only need to change the following lines:
And you do not need to exectue/call the check_http file or the nrpe_http.pl file.
You only need to change the following 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
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
i undertand ur point but i want to have one graph of http response time without proxy and another one via proxy.
What should i do to keep the two.
it's complicated what should i place as a XML file to have the date source and the data template
please help
What should i do to keep the two.
it's complicated what should i place as a XML file to have the date source and the data template
please help
- Attachments
-
- cacti_graph_template_http_response_time_nrpe_165.xml
- (10.07 KiB) Downloaded 3034 times
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
hoestly, I would just go through the documentation and create another data input mehtod, data template and graph template:
http://docs.cacti.net/manual:087:3a_adv ... put_method
http://docs.cacti.net/manual:087:3a_adv ... put_method
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
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
thanks for ur instructions i followed them and put ur script in the script directory and modify the user and pass for the proxy
but i have no graph
in cacti log i have this 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]'
when i run ur scipt in a console it didn-t recogniwe the "Use" syntax!!
please i need ur help
but i have no graph
in cacti log i have this 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]'
when i run ur scipt in a console it didn-t recogniwe the "Use" syntax!!
please i need ur help
Who is online
Users browsing this forum: No registered users and 0 guests