|
|
| Author |
Message |
gilles Cacti User
Joined: 12 Jul 2005 Posts: 237
|
Posted: Wed Oct 04, 2006 1:23 pm Post subject: TCP Port Template |
|
|
This a TCP Port Template.
It let you graph the state of a TCP port :
You can then set a treshold on it.
http://gilles.boulon.free.fr/tcp/tcp.zip
To use, unzip the template, import xml files and place appropriates files in scripts and ressources.
Not all of the 65535 ports will be tested (too long i think...), so you must edit file ports.inc.
Then go to Associated Data Queries, add TCP, click verbose and go to graphs.
This is derivate from my Plugin Manage and Cacti users without Plugin Architecture can use it.
|
|
| Back to top |
|
 |
gilles Cacti User
Joined: 12 Jul 2005 Posts: 237
|
|
| Back to top |
|
 |
gilles Cacti User
Joined: 12 Jul 2005 Posts: 237
|
Posted: Fri Nov 02, 2007 4:17 am Post subject: |
|
|
| i have just updated the template to be compatible with cacti 0.8.7
|
|
| Back to top |
|
 |
cacti_008
Joined: 06 Nov 2006 Posts: 2
|
Posted: Sun Nov 11, 2007 10:31 pm Post subject: |
|
|
| Hi, I cann't download the tcp.zip, where can I get it? Thx!
|
|
| Back to top |
|
 |
KyRoo
Joined: 19 Oct 2007 Posts: 47
|
Posted: Fri Nov 16, 2007 9:24 am Post subject: |
|
|
Hi Gillis,
i'm currently teting your cool plugin, but i have a problem
ive installed your manage plugin. everything seems to work. When i bring down a tcp port the manage tool detects that. But when i display the graph, it is always down.
when i look at my poller log i see that it returns the U value.
i've installed this when the zip was updates for version 0.8.7, but i run 0.8.6j. I think this could be the problem.
Do you still have the previous version?
debug info:
| Code: | Data Query Debug Information
+ Running data query [12].
+ Found type = '6 '[script query].
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/tcp.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\tcp.php localhost 2 index'
+ Executing script query 'c:\php\php.exe -q C:\Inetpub\wwwroot\cacti\scripts\tcp.php localhost 2 query index'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'C:/Inetpub/wwwroot/cacti/resource/script_server/tcp.xml'
|
| Code: | Data Query [TCP]
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.
|
Thx,
KyRoo
|
|
| Back to top |
|
 |
mcutting Cacti Guru User
Joined: 16 Oct 2006 Posts: 1804 Location: United Kingdom
|
Posted: Fri Nov 16, 2007 9:29 am Post subject: |
|
|
| KyRoo - I still have the TCP template that is compatible with 0.8.6j...
|
|
| Back to top |
|
 |
KyRoo
Joined: 19 Oct 2007 Posts: 47
|
Posted: Fri Nov 16, 2007 10:36 am Post subject: |
|
|
| mcutting wrote: | | KyRoo - I still have the TCP template that is compatible with 0.8.6j... |
TY, works perfect now
|
|
| Back to top |
|
 |
Jem
Joined: 12 Apr 2005 Posts: 27
|
Posted: Mon Dec 10, 2007 10:32 am Post subject: |
|
|
Hello,
I tried to use this but it's not working for me, I have an error in my cacti log file:
12/10/2007 04:27:40 PM - CMDPHP: Poller[0] Host[2] DS[35] WARNING: Result from SERVER not valid. Partial Result: Invalid include/conf
Host and DS are for my localhost with TCP query on port 80...
Here is my Data Source Debug:
| Code: | Data Source Debug
/usr/syno/bin/rrdtool create \
/volume1/web/cacti/rra/uranus_tcp_35.rrd \
--step 300 \
DS:TCP:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:500 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
|
If it can help...
And my log in DEBUG mode:
| Code: | 12/10/2007 05:52:27 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (35, 'TCP', '2007-12-10 17:52:15', 'U')"
12/10/2007 05:52:27 PM - CMDPHP: Poller[0] Host[2] DS[35] SERVER: /volume1/web/cacti/scripts/tcp.php TCP 192.168.78.7 2 get TCP 80, output: U
12/10/2007 05:52:27 PM - CMDPHP: Poller[0] Host[2] DS[35] WARNING: Result from SERVER not valid. Partial Result: Invalid include/conf
12/10/2007 05:52:26 PM - PHPSVR: Poller[0] DEBUG: INC: '/volume1/web/cacti/scripts/tcp.php' FUNC: 'TCP' PARMS: '192.168.78.7 2 get TCP 80' |
Thanks for your answers
|
|
| Back to top |
|
 |
oven
Joined: 24 Mar 2007 Posts: 8
|
Posted: Tue Dec 18, 2007 9:09 pm Post subject: Re: TCP Port Template |
|
|
| gilles wrote: | This a TCP Port Template.
It let you graph the state of a TCP port :
You can then set a treshold on it.
http://gilles.boulon.free.fr/tcp/tcp.zip
To use, unzip the template, import xml files and place appropriates files in scripts and ressources.
Not all of the 65535 ports will be tested (too long i think...), so you must edit file ports.inc.
Then go to Associated Data Queries, add TCP, click verbose and go to graphs.
This is derivate from my Plugin Manage and Cacti users without Plugin Architecture can use it. |
| Code: | RRDTool Command:
/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="OCN Proxy - TCP State - 80" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/html/cacti/rra/ocn_proxy_tcp_155.rrd":TCP:LAST \
DEF:b="/var/www/html/cacti/rra/ocn_proxy_tcp_155.rrd":TCP:AVERAGE \
AREA:a#EA8F00FF:"TCP" \
GPRINT:a:LAST:"%8.0lf\n" \
COMMENT:"(1 = Running, 0 = Stopped)"
RRDTool Says:
ERROR: the RRD does not contain an RRA matching the chosen CF
|
WHo can help me ?
|
|
| Back to top |
|
 |
bcarpio
Joined: 04 Jun 2008 Posts: 6
|
Posted: Thu Jun 05, 2008 10:08 pm Post subject: |
|
|
I installed this and all my queries in debug mode show no errors, however the graph never displays here is the error I get in my /var/log/httpd/error_log:
the RRD does not contain an RRA matching the chosen CF
|
|
| Back to top |
|
 |
gueutzilla
Joined: 13 Jul 2008 Posts: 9
|
Posted: Wed Jul 30, 2008 10:36 am Post subject: |
|
|
Hi,
I have a problem whith graph on TCP template for all my devices.
The snmp query is ok and return :
| Quote: | | 5) TCP (Verbose Query) Uptime Goes Backwards Success [7 Items, 7 Rows] |
In verbose :
| Quote: | + Running data query [16].
+ Found type = '6 '[script query].
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'D:\Web\PHP5\php.exe -q D:\Web\Cacti\scripts\tcp.php 172.17.170.8 53 index'
+ Executing script query 'D:\Web\PHP5\php.exe -q D:\Web\Cacti\scripts\tcp.php 172.17.170.8 53 query index'
+ Found item [ServiceIndex='80'] index: 80
+ Found item [ServiceIndex='443'] index: 443
+ Found item [ServiceIndex='110'] index: 110
+ Found item [ServiceIndex='995'] index: 995
+ Found item [ServiceIndex='25'] index: 25
+ Found item [ServiceIndex='143'] index: 143
+ Found item [ServiceIndex='993'] index: 993
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml' |
In the graph tabs, there is no graph for "|host_description| -TCP -".
In the cacti Console -> Graph Management , I turn on debug mod and I have the result in the first attachment.
In the Cacti Console -> Data Sources I turn on debug mode and have the result in second attachment.
The poller run properly and return correct value : 1 for port status.
In the cacti log file have this errors :
| Quote: | 07/30/2008 05:30:21 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1224.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1218.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1219.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1222.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1223.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1221.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1220.
07/30/2008 05:30:16 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1212.
07/30/2008 05:30:14 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1242.
07/30/2008 05:30:10 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1257.
07/30/2008 05:30:10 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1259. |
My cacti is 8.7.b with rrdtool 1.2.x (lastest version) and only graph for TCP template not working!!!
Can you help me???
Thanks
| Description: |
|
| Filesize: |
220.32 KB |
| Viewed: |
10788 Time(s) |

|
| Description: |
|
| Filesize: |
265.32 KB |
| Viewed: |
10788 Time(s) |

|
|
|
| Back to top |
|
 |
jerrison
Joined: 29 Dec 2006 Posts: 48
|
Posted: Tue Mar 03, 2009 4:49 am Post subject: |
|
|
Hi there,
thanks for the templates.
Just to give some information on how i got them to work with the latest cactiEZ-distribution: i need to edit your tcp.php script, line 54 and 57 (print "0", print "1"). Instead of "printing" the retun values i "returned" them:
return "0", return "1".
I had all "NaN" before, poller output was "1U" instead of only "1" or "0".
Hope this might help someone .
Greetz,
André
|
|
| Back to top |
|
 |
ssabchew
Joined: 23 Feb 2009 Posts: 2
|
Posted: Thu Mar 05, 2009 11:33 am Post subject: |
|
|
[quote="gueutzilla"]Hi,
I have a problem whith graph on TCP template for all my devices.
The snmp query is ok and return :
[quote]5) TCP (Verbose Query) Uptime Goes Backwards Success [7 Items, 7 Rows][/quote]
In verbose :
[quote]+ Running data query [16].
+ Found type = '6 '[script query].
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'D:\Web\PHP5\php.exe -q D:\Web\Cacti\scripts\tcp.php 172.17.170.8 53 index'
+ Executing script query 'D:\Web\PHP5\php.exe -q D:\Web\Cacti\scripts\tcp.php 172.17.170.8 53 query index'
+ Found item [ServiceIndex='80'] index: 80
+ Found item [ServiceIndex='443'] index: 443
+ Found item [ServiceIndex='110'] index: 110
+ Found item [ServiceIndex='995'] index: 995
+ Found item [ServiceIndex='25'] index: 25
+ Found item [ServiceIndex='143'] index: 143
+ Found item [ServiceIndex='993'] index: 993
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'
+ Found data query XML file at 'D:/Web/Cacti/resource/script_server/tcp.xml'[/quote]
In the graph tabs, there is no graph for "|host_description| -TCP -".
In the cacti Console -> Graph Management , I turn on debug mod and I have the result in the first attachment.
In the Cacti Console -> Data Sources I turn on debug mode and have the result in second attachment.
The poller run properly and return correct value : 1 for port status.
In the cacti log file have this errors :
[quote]07/30/2008 05:30:21 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1224.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1218.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1219.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1222.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1223.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1221.
07/30/2008 05:30:20 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1220.
07/30/2008 05:30:16 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1212.
07/30/2008 05:30:14 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1242.
07/30/2008 05:30:10 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1257.
07/30/2008 05:30:10 PM - CMDPHP: Poller[0] ERROR: There are no RRA's assigned to local_data_id: 1259.[/quote]
My cacti is 8.7.b with rrdtool 1.2.x (lastest version) and only graph for TCP template not working!!!
Can you help me??? :roll:
Thanks[/quote]
I have EXACTLY the same problem...
cacti version - 0.8.7d
PLease HEEeeEEeeelp
|
|
| Back to top |
|
 |
killshoot Cacti User
Joined: 26 Mar 2008 Posts: 72
|
Posted: Tue Mar 31, 2009 7:16 am Post subject: |
|
|
| By me the result is always "0" even if the port is really open. Any suggestion?
|
|
| Back to top |
|
 |
pthaynes Cacti User
Joined: 20 Apr 2009 Posts: 54 Location: Australia
|
Posted: Mon Apr 20, 2009 7:01 pm Post subject: TCP Templates |
|
|
I noticed that my graphs for the TCP ports I am monitoring always show as down (ie a value of 0). Digging a little further I noticed that within the data template for TCP the "Maximum Value" was 0 (look under Console > Data templates - it's about half way down the page). I've changed that to 1 and now my TCP ports show as up.
I assume that was the right thing to do... if it is could someone please update the templates in the original source location?
|
|
| Back to top |
|
 |
|