Service (port) Monitoring

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
apeterson
Posts: 14
Joined: Tue Aug 23, 2005 3:02 pm

Service (port) Monitoring

Post by apeterson »

Rather than only checking for up/down status using either snmp, ping or both, how about also checking specific tcp/udp ports either instead or in addition? Maybe even send a string and expect a response?
karpet
Posts: 2
Joined: Thu Aug 18, 2005 5:16 am

Post by karpet »

not quite the same.. but might be of use to you. I just use it with thold

adaptation of the ping-tcp.pl script to check if a connection can actually be established to a port.

perl <path_cacti>/scripts/tcp.pl <count> <ip> <port>
Attachments
tcp.pl.txt
(1.33 KiB) Downloaded 228 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Karpet,

Please see the 0.8.6g addon call ss_fping.php. It supports the following format through the Script Server:

php ss_fping.php <hostname> <count> <type> <port>

<hostname> - Host DNS or IP
<count> - Number of connection attempts
<type> - ICMP, TCP, UDP
<port> - TCP/UDP Port to SYN

You may find that it's faster.

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?
apeterson
Posts: 14
Joined: Tue Aug 23, 2005 3:02 pm

How to implement fping

Post by apeterson »

I implemented ss_fping from the 1.2 version posted. I remember now why I stopped using it. It polls correctly (even with the new version and parameters) but something about the graphs doesn't work because cacti will not display them. Instead I get those awesome red X's as if it can't find the image/file. I don't believe the graph ID is getting recorded properly wherever that info gets recorded.

Can you offer any assistance?
TheWitness wrote:Karpet,

Please see the 0.8.6g addon call ss_fping.php. It supports the following format through the Script Server:

php ss_fping.php <hostname> <count> <type> <port>

<hostname> - Host DNS or IP
<count> - Number of connection attempts
<type> - ICMP, TCP, UDP
<port> - TCP/UDP Port to SYN

You may find that it's faster.

TheWitness
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Goto "Graph Management", edit one of the graphs in question. Once it's edited, there will be a Graph Debug link in the upper right corner. Please post the result of that DEBUG as well as the graph syntax.

To get the graph syntax, you must run in DEBUG mode and view the graph again. You can then goto the log and you will find a "CACTI2RRD" statement followed by the graph syntax.

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?
apeterson
Posts: 14
Joined: Tue Aug 23, 2005 3:02 pm

Service (port) Monitoring

Post by apeterson »

The debug output is non-existant other than a red X so I've attached it instead.

The graph syntax is:

09/16/2005 04:16:50 PM - WEBLOG: Poller[0] CACTI2RRD: d:\apache\apache2\htdocs\cacti\rrdtool.exe graph - --imgformat=PNG --start=-86400 --end=-300 --title="365 Main AT&T Router TEST - Advanced Ping" --base=1000 --height=120 --width=500 --upper-limit=10 --lower-limit=0 --units-exponent=1 --vertical-label="milliseconds" --slope-mode --font TITLE:12:c:\winnt\fonts\arial.ttf --font AXIS:8:c:\winnt\fonts\arial.ttf --font LEGEND:10:c:\winnt\fonts\arial.ttf --font UNIT:8:c:\winnt\fonts\arial.ttf DEF:a="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":min:AVERAGE DEF:b="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":avg:AVERAGE DEF:c="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":max:AVERAGE DEF:d="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:e="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":dev:AVERAGE DEF:f="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:g="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:h="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:i="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:j="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:ba="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:bb="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:bc="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":avg:AVERAGE DEF:bd="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":max:AVERAGE DEF:be="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":max:AVERAGE DEF:bf="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":max:AVERAGE DEF:bg="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":max:AVERAGE DEF:bh="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":max:AVERAGE DEF:bi="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:bj="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:ca="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:cb="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:cc="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:cd="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:ce="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":loss:AVERAGE DEF:cf="D\:/Apache/Apache2/htdocs/cacti/rra/365_main_att_router_test_loss_379.rrd":avg:AVERAGE CDEF:cdefg=d,0,GT,d,2,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefh=d,3,GT,d,5,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefi=d,5,GT,d,10,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefj=d,10,GT,d,15,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefba=d,15,GT,d,50,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefbb=d,50,GT,d,95,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefbc=d,95,GT,d,100,GT,UNKN,INF,IF,UNKN,IF CDEF:cdefbd=d,UN,1,EQ,TIME,300,+,NOW,GT,UNKN,INF,IF,d,95,GT,INF,UNKN,IF,IF CDEF:cdefbf=e,2,/ CDEF:cdefbh=c,b,-,e,-,3,/ CDEF:cdefcd=d,0,GT,d,2,GT,UNKN,b,IF,UNKN,IF CDEF:cdefce=d,3,GT,d,5,GT,UNKN,b,IF,UNKN,IF CDEF:cdefcf=d,5,GT,d,10,GT,UNKN,b,IF,UNKN,IF CDEF:cdefcg=d,10,GT,d,15,GT,UNKN,b,IF,UNKN,IF CDEF:cdefch=d,15,GT,d,50,GT,b,INF,IF,UNKN,IF CDEF:cdefci=d,50,GT,d,95,GT,UNKN,b,IF,UNKN,IF CDEF:cdefcj=d,95,GT,d,100,GT,UNKN,b,IF,UNKN,IF COMMENT:" Pkt Loss\:" AREA:cdefg#AFECED:"1-2%" AREA:cdefh#55D6D3:"3-5%" AREA:cdefi#7CB3F1:"6-10%" AREA:cdefj#4668E4:"11-15%" AREA:cdefba#A150AA:"16-50%" AREA:cdefbb#FF00FF:"51-95%" AREA:cdefbc#F51D30:"96-100%" COMMENT:"Unknown\n" AREA:cf#FFFFFF:"" AREA:cdefbf#333333:"":STACK AREA:cdefbf#555555:"":STACK AREA:cdefbh#888888:"":STACK AREA:cdefbh#AAAAAA:"":STACK AREA:cdefbh#CCCCCC:"":STACK GPRINT:ce:AVERAGE:" Avg Loss\:%6.2lf%%" GPRINT:ce:MAX:"Max Loss\:%6.2lf%%\n" COMMENT:" Latency\:" AREA:cdefcd#AFECED:"" AREA:cdefce#55D6D3:"" AREA:cdefcf#7CB3F1:"" AREA:cdefcg#4668E4:"" AREA:cdefch#A150AA:"" AREA:cdefci#FF00FF:"" AREA:cdefcj#F51D30:"" GPRINT:a:AVERAGE:"Min\:%8.2lf ms" GPRINT:cf:AVERAGE:"Avg\:%8.2lf ms" GPRINT:bh:MAX:"Max\:%8.2lf ms" GPRINT:e:AVERAGE:"Dev\:%8.2lf ms\n" COMMENT:"Avg Latency\:" LINE1:cf#00BD27:"."

TheWitness wrote:Goto "Graph Management", edit one of the graphs in question. Once it's edited, there will be a Graph Debug link in the upper right corner. Please post the result of that DEBUG as well as the graph syntax.

To get the graph syntax, you must run in DEBUG mode and view the graph again. You can then goto the log and you will find a "CACTI2RRD" statement followed by the graph syntax.

TheWitness
Attachments
Just a red X...
Just a red X...
nograph.JPG (8.77 KiB) Viewed 4322 times
apeterson
Posts: 14
Joined: Tue Aug 23, 2005 3:02 pm

Post by apeterson »

Also, this is on Win2k. Is it possible this is the 2048 character limitation I read about? It certainly won't run that command from a command prompt window because it's way too long.
TheWitness wrote:Goto "Graph Management", edit one of the graphs in question. Once it's edited, there will be a Graph Debug link in the upper right corner. Please post the result of that DEBUG as well as the graph syntax.

To get the graph syntax, you must run in DEBUG mode and view the graph again. You can then goto the log and you will find a "CACTI2RRD" statement followed by the graph syntax.

TheWitness
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What is your Operating System?
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?
apeterson
Posts: 14
Joined: Tue Aug 23, 2005 3:02 pm

Post by apeterson »

TheWitness wrote:What is your Operating System?
Win2k (Server).
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Yes, that appears to be the problem. I want to rewrite the template, it will take a while. If you recreate the graph with a very short name, let the RRD be created and then rename the graph, you will have a workaround though.

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?
apeterson
Posts: 14
Joined: Tue Aug 23, 2005 3:02 pm

Post by apeterson »

You're right. I did what you said and it works now. I look forward to your update and thanks so much for the help! :D
apeterson
Posts: 14
Joined: Tue Aug 23, 2005 3:02 pm

Post by apeterson »

No errors in the log in debug and the graphs are now accessible BUT empty. More fun with this on Monday...
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests