Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Bluecoat Proxy Template (inc fan & temp) (2005/09/19)
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
cmarsot



Joined: 13 Sep 2005
Posts: 27

PostPosted: Wed Oct 05, 2005 4:37 am    Post subject: Reply with quote

Availability and percent is part of addon:
http://forums.cacti.net/viewtopic.php?t=9272

If you don't need these graph, delete them from host template
Back to top
riz



Joined: 05 Aug 2005
Posts: 11

PostPosted: Mon Oct 10, 2005 10:56 am    Post subject: Reply with quote

Sorry if this is a really basic question but I'm getting the following when trying to import:

############################################
Graph Template

[success] #PRX03 - Proxy - HTTP Client Requests (and Hits) [update]
[success] #PRX02 - Proxy - CPU Load [update]
[success] #PRX04 - Proxy - HTTP Server Requests [update]
[success] #PRX08 - Proxy - Hit Ratio [update]
+ Found Dependency: (Data Template Item) hr_objects
+ Found Dependency: (GPRINT Preset) Percentage
+ Found Dependency: (Data Template Item) hr_bytes
+ Unmet Dependency: (Data Template Item)
+ Found Dependency: (CDEF) Unknown-Data
+ Found Dependency: (GPRINT Preset) Normal
[success] #PRX09 - Proxy - Workers [update]
[success] #_Availability [update]
[success] #_Response Time [update]
[success] #PRX10 - Proxy - Temperature [update]
[success] #PRX11 - Proxy - Fan [update]
[success] Interface - Traffic (bits/sec) [update]
[success] Interface - Packets Errors/Discards [update]
[success] Interface - Packets Unicast [update]
[success] Interface - Packets Non-Unicast [update]
[success] Interface - Traffic (bytes/sec) [update]
[success] Interface - Traffic (bits/sec, 95th Percentile, Total Bandwith) [update]
[success] Interface - Traffic (bits/sec, Total Bandwidth) [update]
[success] Interface - Traffic (bytes/sec, Total Bandwidth) [update]

############################################

If anyone could help me in the right direction, I'd much appreciate it, thanks.

regards,
riz.
Back to top
riz



Joined: 05 Aug 2005
Posts: 11

PostPosted: Sun Oct 16, 2005 4:21 am    Post subject: Scripts Reply with quote

I have muddled through this and now have working graphs!

But I can't get the 'availability' and 'response time' graphs to display any data?? (graph is grey with nan)

Please somebody help!


I also have a problem with using the admin password in the scripts!

I don't know if this is because I've configured my setup incorrectly..
but, the scripts directory is in /www/html/cacti/scripts!!

Although I have directory listing disabled on Apache, if you type in the full path in a browser
(http://<IP address>/cacti/scripts/proxySG_sensors_temp.pl) I am prompted to download the file!!

I tried using .htaccess to restrict access to the /www/html/cacti directory, which did prompt me for a user/password but all my graphs stopped working!

Is there a way to not have the password in the actual script, but point it to another file that isn't in www/html/xxx/xxx?

I'd really appreciate some helps here fellas!

cheers,
riz.
Back to top
riz



Joined: 05 Aug 2005
Posts: 11

PostPosted: Sun Oct 16, 2005 6:55 am    Post subject: Reply with quote

I have sorted out the permissions on /cacti/scripts and is now more secure.. ...ok, n00b alert I know, but we all have to start somewhere!

the response times and availability graphs are still getting the better of me, but after 24 hours of looking at it, I just can't figure it out so am going fishing! *HELP!!*


this is the output when in debug:

Code:

[size=9]10/16/2005 12:40:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/bluecoat_proxysg2_responsetime_50.rrd --template responsetime 1129462801:U 
10/16/2005 12:40:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/bluecoat_proxysg2_availability_49.rrd --template availability 1129462801:U 
10/16/2005 12:40:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/bluecoat_proxysg2_hr_objects_48.rrd --template hr_bytes:hr_objects 1129462801:36:46 
10/16/2005 12:40:03 PM - POLLER: Poller[0] Parsed MULTI output field 'cpu2:27.8' [map cpu2->cpu2] 
10/16/2005 12:40:03 PM - POLLER: Poller[0] Parsed MULTI output field 'cpu1:27.8' [map cpu1->cpu1] 
10/16/2005 12:40:03 PM - POLLER: Poller[0] Parsed MULTI output field 'mb1:25.3' [map mb1->mb1] 
10/16/2005 12:40:03 PM - POLLER: Poller[0] Parsed MULTI output field 'objects:46' [map objects->hr_objects] 
10/16/2005 12:40:03 PM - POLLER: Poller[0] Parsed MULTI output field 'bytes:36' [map bytes->hr_bytes] 
10/16/2005 12:40:03 PM - CMDPHP: Poller[0] Time: 1.5405 s, Theads: N/A, Hosts: 1 
10/16/2005 12:40:03 PM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting 
10/16/2005 12:40:03 PM - CMDPHP: Poller[0] Host[5] DS[56] CMD: perl /var/www/html/cacti/scripts/proxySG_sensors_temp.pl 10.134.12.111, output: mb1:25.3 cpu1:27.8 cpu2:27.8 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] DS[55] SNMP: v2: 10.134.12.111, dsname: snmp_oid, oid: .1.3.6.1.3.25.17.3.2.2.1.0, output: 4499407 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] DS[53] SNMP: v2: 10.134.12.111, dsname: snmp_oid2, oid: .1.3.6.1.3.25.17.3.2.1.2.0, output: 2459727 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] DS[52] SNMP: v2: 10.134.12.111, dsname: snmp_oid, oid: .1.3.6.1.4.1.3417.2.4.1.1.1.4.1, output: 3 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] DS[51] SNMP: v2: 10.134.12.111, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.2, output: 455708357 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] DS[51] SNMP: v2: 10.134.12.111, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.2, output: 1070806165 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] DS[54] SNMP: v2: 10.134.12.111, dsname: snmp_oid1, oid: .1.3.6.1.3.25.17.3.2.1.1.0, output: 5397708 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] DS[50] CMD: /var/www/html/cacti/scripts/host_availability_current.php 10.134.12.111, output: U 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] DS[50] WARNING: Result from CMD not valid. Partial Result: 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] DS[49] CMD: /var/www/html/cacti/scripts/host_availability_percent.php 10.134.12.111, output: U 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] DS[49] WARNING: Result from CMD not valid. Partial Result: 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] DS[48] CMD: perl /var/www/html/cacti/scripts/proxySG_hit_ratio.pl 10.134.12.111, output: bytes:36 objects:46 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] RECACHE: Processing 1 items in the auto reindex cache for '10.134.12.111'. 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] Host[5] SNMP: Host responded to SNMP 
10/16/2005 12:40:02 PM - CMDPHP: Poller[0] PHP Script Server Started Properly  [/size]



I don't have a /scripts/host_availability_percent.php file!! where the heck is that then??!

HEEEEEEEEELLLLLLLP!!!! ....please!

nope, had enough...gone fishing!
Back to top
drose12



Joined: 10 Mar 2005
Posts: 31

PostPosted: Mon Dec 05, 2005 4:07 pm    Post subject: Reply with quote

Anyone ever come across the host_availability_percent.php script?
Back to top
cmarsot



Joined: 13 Sep 2005
Posts: 27

PostPosted: Tue Dec 06, 2005 6:10 am    Post subject: Reply with quote

Here is the script:

#!/usr/bin/php -q
<?php
include(dirname(__FILE__) . "/../include/config.php");
$ip = $HTTP_SERVER_VARS['argv'][1];
$server = $database_hostname;
$db = mysql_connect($database_hostname, $database_username, $database_password);
mysql_select_db($database_default, $db);
$sql="SELECT * FROM host WHERE hostname = '$ip'";
$result=mysql_query($sql, $db);
while ($row = mysql_fetch_array($result)) {
$avail = $row['availability'];
}
echo trim($avail);
exit(0);
?>

You couls also with a search find this:
http://forums.cacti.net/about8230.html&highlight=host+availability
Back to top
merlinx2040



Joined: 24 Feb 2005
Posts: 2

PostPosted: Thu Dec 08, 2005 6:54 am    Post subject: Reply with quote

In case anyone was wondering about the host_availability_current.php , here it is:
Code:
#!/usr/bin/php -q
<?php
include(dirname(__FILE__) . "/../include/config.php");
$ip = $HTTP_SERVER_VARS['argv'][1];
$server = $database_hostname;
$db = mysql_connect($database_hostname, $database_username, $database_password);
mysql_select_db($database_default, $db);
$sql="SELECT * FROM host WHERE hostname = '$ip'";
$result=mysql_query($sql, $db);
while ($row = mysql_fetch_array($result)) {
$current = $row['cur_time'];
}
echo trim($current);
exit(0);
?>


Back to top
alphademon



Joined: 26 Jul 2005
Posts: 8

PostPosted: Mon Feb 20, 2006 8:43 pm    Post subject: disk usage? Reply with quote

cmarsot wrote:
Availability and percent is part of addon:
http://forums.cacti.net/viewtopic.php?t=9272

If you don't need these graph, delete them from host template


Hi Cmarsot.. is there anyway to find out the disk usage on the bluecoat appliance ?
Back to top
omurillo



Joined: 05 Apr 2006
Posts: 1

PostPosted: Wed Apr 05, 2006 3:51 pm    Post subject: Re: Bluecoat Proxy Template (inc fan & temp) (2005/09/19 Reply with quote

Hi! I'm new at this, but I was able to get cacti up and running. Ok I have 2 questions. 1 - You said "DO NOT FORGET to change username/password in perl script" which perl script?

2 - When I try to import I get the following error:

Warning: filesize() [function.filesize]: stat failed for C:\WINDOWS\TEMP\phpE.tmp in c:\Inetpub\wwwroot\cacti\templates_import.php on line 59

Warning: fread() [function.fread]: Length parameter must be greater than 0 in c:\Inetpub\wwwroot\cacti\templates_import.php on line 59

Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\cacti\templates_import.php:59) in c:\Inetpub\wwwroot\cacti\templates_import.php on line 71


cmarsot wrote:
Hi,

Here is a template for Bluecoat Proxy (based on the one done by Morgan)
http://forums.cacti.net/viewtopic.php?t=6735&start=0&postdays=0&postorder=asc&highlight=bluecoat

Here what it graphs:
- Traffic
- CPU Load
- HTTP Clients Requests / Clients Hits
- HTTP Proxy Requests (Server requests)
- Hit Ratio (Objects, Bytes)
- Workers (Max specified by licence, and current)
- Availability
- Response Time
- Fan Speed : CPU, Chassis (new)
- Temperature : CPU, Motherboard (new)


DO NOT FORGET to change username/password in perl script.

When CPU Temp is not available (like CPU2 on ProxySG 800) the return value is 0.
When Fan speed is not available (like fan on CPU 2 on proxySG 800), the return value is defined to 10. I decided not to define to 0 due to thold Alerts.

Temperature & Fan Speed DO NOT WORK on ProxySG400 (information are not available in sysinfo).
Both scripts (Fan Speed & Temperature) must be modified to work with CacheFlow.

Have Fun !
Back to top
bidzer



Joined: 20 Jun 2006
Posts: 21

PostPosted: Wed Jun 21, 2006 1:46 pm    Post subject: Anyone get the Perl Scripts working? Reply with quote

I've been able to get the SNMP stuff to work, but I've been unable to get the hit ratio and workers to work at all.
Back to top
nohare



Joined: 30 Jun 2006
Posts: 3

PostPosted: Fri Jun 30, 2006 9:02 am    Post subject: Reply with quote

I am a newbie to Cacti and so far have been able to install and monitor via SNMP Bluecoat devices.
.
I have downloaded and imported the Bluecoat XML templates, and have also copied the "workers" scripts to the relevant directory.

Can anyone assist with being getting cacti to retrieve the workers values?

I have created a Data Input Method called "Bluecoat HTTP Workers" which has "perl <path_cacti>/scripts/proxysg_workers.pl <ip>" as the input string (I tried to copyuse exisiting data Input Methods). Then I have specified two Output Fields, one called "Current Workers" the other called "Max Workers"

Under Data Templates, I created two entries, one called "Bluecoat Proxy - HTTP Workers - Current" and the other called "Bluecoat Proxy - HTTP Workers - Max".

I then created a Graph Template called "Bluecoat Proxy - HTTP Workers" which two Graph Template Items (one for current, one for max). I also created two Graph Item Inputs (one for current, one for max).

This is as far as I have got and have been unable to get cacti retrieving the data which I want to plot.

Can anyone help?
Back to top
bidzer



Joined: 20 Jun 2006
Posts: 21

PostPosted: Fri Jun 30, 2006 9:24 am    Post subject: Reply with quote

nohare,

Are you using https and port 8082 to connect to your bluecoat? I had to play around with the scripts to get them to work with my cache engine. I ran the poller.php manually and saw that the poller was looking for the wrong script name.
Back to top
nohare



Joined: 30 Jun 2006
Posts: 3

PostPosted: Fri Jun 30, 2006 9:32 am    Post subject: Reply with quote

Bidzer,

I am using http:8081 to connect to my bluecoat, I have checked this and the browser can connect successfully.
Back to top
nohare



Joined: 30 Jun 2006
Posts: 3

PostPosted: Fri Jun 30, 2006 10:23 am    Post subject: Reply with quote

I am also seeing this in my cacti.log file

06/30/2006 04:05:56 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select output_string from data_input where id=14"
06/30/2006 04:06:32 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select output_string from data_input where id=14"
06/30/2006 04:06:45 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select output_string from data_input where id=14"
06/30/2006 04:06:49 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select output_string from data_input where id=14"
06/30/2006 04:06:51 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select output_string from data_input where id=14"
06/30/2006 04:06:54 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select output_string from data_input where id=14"
06/30/2006 04:08:26 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select output_string from data_input where id=14"
06/30/2006 04:08:29 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select output_string from data_input where id=14"
06/30/2006 04:08:33 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select output_string from data_input where id=14"



Any Ideas ?
Back to top
bidzer



Joined: 20 Jun 2006
Posts: 21

PostPosted: Fri Jun 30, 2006 11:00 am    Post subject: Reply with quote

I never received that error. Have you tried to run the scripts manually from the command line? It will tell you if the scripts have any problems and what lines to focus. Can you try this and post the errors?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 



Powered by phpBB © 2001, 2005 phpBB Group