TCP Port Template
Moderators: Developers, Moderators
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.
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.
The template has been updated because it modify your rra settings.
You will experience this problem :
http://forums.cacti.net/viewtopic.php?t=16647
To correct this :
- use these steps http://forums.cacti.net/viewtopic.php?t=16541
or
- reimport the new TCP Port Template
or
- reimport another good template like this one http://forums.cacti.net/viewtopic.php?t=16618
I'm sorry for the inconvenience.
You will experience this problem :
http://forums.cacti.net/viewtopic.php?t=16647
To correct this :
- use these steps http://forums.cacti.net/viewtopic.php?t=16541
or
- reimport the new TCP Port Template
or
- reimport another good template like this one http://forums.cacti.net/viewtopic.php?t=16618
I'm sorry for the inconvenience.
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:
Thx,
KyRoo
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: Select all
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: Select all
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.
KyRoo
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:
If it can help...
And my log in DEBUG mode:
Thanks for your answers
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: Select all
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 \
And my log in DEBUG mode:
Code: Select all
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'
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: Select all
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
-
- Posts: 9
- Joined: Sun Jul 13, 2008 10:28 am
Hi,
I have a problem whith graph on TCP template for all my devices.
The snmp query is ok and return :
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 :
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
I have a problem whith graph on TCP template for all my devices.
The snmp query is ok and return :
In verbose :5) TCP (Verbose Query) Uptime Goes Backwards Success [7 Items, 7 Rows]
In the graph tabs, there is no graph for "|host_description| -TCP -".+ 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 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 :
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
- Attachments
-
- 1st attachment
- TCP-err.jpg (265.32 KiB) Viewed 52063 times
-
- 2nd attachment
- TCP-err1.jpg (220.32 KiB) Viewed 52063 times
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é
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é
[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
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
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?
I assume that was the right thing to do... if it is could someone please update the templates in the original source location?
Who is online
Users browsing this forum: No registered users and 1 guest