Advanced ping for CACTI 1.2.21 RRD 1.8.0

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
sSIDs
Posts: 6
Joined: Thu Jul 14, 2022 11:32 am

Advanced ping for CACTI 1.2.21 RRD 1.8.0

Post by sSIDs »

Good day team!
Could you plz help me to sotr out weird gratth behaivour?
[root@CACTI ~]# php -v
PHP 7.4.29 (cli) (built: Apr 12 2022 10:55:38) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
I have greated ping grath for private host and public ip hosts.
private hosts pings and graths are drowing.
As for public IP host... i can ping. On Devices tab i see message

Code: Select all

Ping Results
ICMP Ping Success (298.986 ms)

i also can ping from terminal.
But grath are empty...i see only 'nan'
Image
https://pasteboard.co/CM88pXYccYQ9.png
tryied advanced ping 1.5 and tried built-in template Unix - Ping Latency. None of them are drowing graths.
Last edited by sSIDs on Thu Jul 14, 2022 2:16 pm, edited 1 time in total.
sSIDs
Posts: 6
Joined: Thu Jul 14, 2022 11:32 am

Re: Advanced ping for CACTI 1.2.21 RRD 1.8.0

Post by sSIDs »

Code: Select all

RRDtool Command:
/usr/bin/rrdtool graph - \
--imgformat=SVG \
--start='-86400' \
--end='-300' \
--pango-markup  \
--disable-rrdtool-tag  \
--title='hq-edge1_external_IP - Advanced Ping' \
--vertical-label='milliseconds' \
--slope-mode \
--base=1000 \
--height=300 \
--width=1000 \
--units-exponent=1 \
--tabwidth '30' \
--alt-autoscale-max \
--lower-limit='0' \
--units-exponent='1' \
COMMENT:"From 2022.07.13 20\:07\:51 To 2022.07.14 20\:02\:51\c" \
COMMENT:"  \n" \
--border $rrdborder --slope-mode \
--watermark 'Bellintegrator' \
DEF:a='/usr/share/cacti/rra/hq-edge1_external_ip_loss_787.rrd':'min':AVERAGE \
DEF:b='/usr/share/cacti/rra/hq-edge1_external_ip_loss_787.rrd':'avg':AVERAGE \
DEF:c='/usr/share/cacti/rra/hq-edge1_external_ip_loss_787.rrd':'max':AVERAGE \
DEF:d='/usr/share/cacti/rra/hq-edge1_external_ip_loss_787.rrd':'loss':AVERAGE \
DEF:e='/usr/share/cacti/rra/hq-edge1_external_ip_loss_787.rrd':'dev':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:cdefbe='e,2,/' \
CDEF:cdefbg='c,b,-,e,-,3,/' \
CDEF:cdefca='b,a,-,0.2,*' \
CDEF:cdefch='d,0,GT,d,2,GT,UNKN,a,IF,UNKN,IF' \
CDEF:cdefci='d,3,GT,d,5,GT,UNKN,a,IF,UNKN,IF' \
CDEF:cdefcj='d,5,GT,d,10,GT,UNKN,a,IF,UNKN,IF' \
CDEF:cdefda='d,10,GT,d,15,GT,UNKN,a,IF,UNKN,IF' \
CDEF:cdefdb='d,15,GT,d,50,GT,a,INF,IF,UNKN,IF' \
CDEF:cdefdc='d,50,GT,d,95,GT,UNKN,a,IF,UNKN,IF' \
CDEF:cdefdd='d,95,GT,d,100,GT,UNKN,a,IF,UNKN,IF' \
LINE1:a:  \
LINE1:b:  \
LINE1:c:  \
LINE1:d:  \
LINE1:e:  \
COMMENT:'   Pkt Loss\:'  \
AREA:cdefg#AFECEDFF:'1-2%'  \
AREA:cdefh#55D6D3FF:'3-5%'  \
AREA:cdefi#7CB3F1FF:'6-10%'  \
AREA:cdefj#4668E4FF:'11-15%'  \
AREA:cdefba#A150AAFF:'16-50%'  \
AREA:cdefbb#FF00FFFF:'51-95%'  \
AREA:cdefbc#F51D30FF:'96-100%\n'  \
AREA:b#FFFFFFFF:  \
AREA:cdefbe#333333FF::STACK \
AREA:cdefbe#555555FF::STACK \
AREA:cdefbg#888888FF::STACK \
AREA:cdefbg#AAAAAAFF::STACK \
AREA:cdefbg#CCCCCCFF::STACK \
AREA:a#FFFFFFFF:  \
AREA:cdefca#CCCCCCFF::STACK \
AREA:cdefca#AAAAAAFF::STACK \
AREA:cdefca#888888FF::STACK \
AREA:cdefca#555555FF::STACK \
AREA:cdefca#333333FF::STACK \
GPRINT:d:AVERAGE:'   Avg Loss\:%6.2lf%%'  \
GPRINT:d:MAX:'Max Loss\:%6.2lf%%\n'  \
AREA:cdefch#AFECEDFF:  \
AREA:cdefci#55D6D3FF:  \
AREA:cdefcj#7CB3F1FF:  \
AREA:cdefda#4668E4FF:  \
AREA:cdefdb#A150AAFF:  \
AREA:cdefdc#FF00FFFF:  \
AREA:cdefdd#F51D30FF:  \
COMMENT:'    Latency\:'  \
GPRINT:a:AVERAGE:'Min\:%8.2lf ms'  \
GPRINT:a:AVERAGE:'Avg\:%8.2lf ms'  \
GPRINT:a:MAX:'Max\:%8.2lf ms'  \
GPRINT:e:AVERAGE:'Dev\:%8.2lf ms\n'  \
COMMENT:'Avg Latency\:'  \
GPRINT:a:AVERAGE:'Min\:%8.2lf ms'  \
GPRINT:b:AVERAGE:'Avg\:%8.2lf ms'  \
GPRINT:b:MAX:'Max\:%8.2lf ms'  \
GPRINT:e:AVERAGE:'Dev\:%8.2lf ms\n'  \
LINE1:b#00BD27FF: 
RRDtool Command lengths = 2881 charaters.
RRDtool Says:
SVG/XML Output OK
sSIDs
Posts: 6
Joined: Thu Jul 14, 2022 11:32 am

Re: Advanced ping for CACTI 1.2.21 RRD 1.8.0

Post by sSIDs »

still no graph. replaced old with new one from rlease 1.2.21 PING_Advanced_Ping.xml

Code: Select all

RRDtool Command:
/usr/bin/rrdtool graph - \
--imgformat=SVG \
--start='-86400' \
--end='-300' \
--pango-markup  \
--disable-rrdtool-tag  \
--title='hq-edge1_external_IP - Advanced Ping' \
--vertical-label='milliseconds' \
--slope-mode \
--base=1000 \
--height=300 \
--width=1000 \
--units-exponent=1 \
--tabwidth '30' \
--alt-autoscale-max \
--lower-limit='0' \
--units-exponent='1' \
COMMENT:"From 2022.07.13 20\:58\:28 To 2022.07.14 20\:53\:28\c" \
COMMENT:"  \n" \
--border $rrdborder --slope-mode \
--watermark 'Bellintegrator' \
DEF:a='/usr/share/cacti/rra/hq-edge1_external_ip_loss_3934.rrd':'min':AVERAGE \
DEF:b='/usr/share/cacti/rra/hq-edge1_external_ip_loss_3934.rrd':'avg':AVERAGE \
DEF:c='/usr/share/cacti/rra/hq-edge1_external_ip_loss_3934.rrd':'max':AVERAGE \
DEF:d='/usr/share/cacti/rra/hq-edge1_external_ip_loss_3934.rrd':'loss':AVERAGE \
DEF:e='/usr/share/cacti/rra/hq-edge1_external_ip_loss_3934.rrd':'dev':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:cdefbe='e,2,/' \
CDEF:cdefbg='c,b,-,e,-,3,/' \
CDEF:cdefca='b,a,-,0.2,*' \
VDEF:vdefzzcf='d,AVERAGE' \
CDEF:cdefch='d,0,GT,d,2,GT,UNKN,a,IF,UNKN,IF' \
CDEF:cdefci='d,3,GT,d,5,GT,UNKN,a,IF,UNKN,IF' \
CDEF:cdefcj='d,5,GT,d,10,GT,UNKN,a,IF,UNKN,IF' \
CDEF:cdefda='d,10,GT,d,15,GT,UNKN,a,IF,UNKN,IF' \
CDEF:cdefdb='d,15,GT,d,50,GT,a,INF,IF,UNKN,IF' \
CDEF:cdefdc='d,50,GT,d,95,GT,UNKN,a,IF,UNKN,IF' \
CDEF:cdefdd='d,95,GT,d,100,GT,UNKN,a,IF,UNKN,IF' \
LINE1:a:  \
LINE1:b:  \
LINE1:c:  \
LINE1:d:  \
LINE1:e:  \
COMMENT:'   Pkt Loss\:'  \
AREA:cdefg#AFECEDFF:'1-2%'  \
AREA:cdefh#55D6D3FF:'3-5%'  \
AREA:cdefi#7CB3F1FF:'6-10%'  \
AREA:cdefj#4668E4FF:'11-15%'  \
AREA:cdefba#A150AAFF:'16-50%'  \
AREA:cdefbb#FF00FFFF:'51-95%'  \
AREA:cdefbc#F51D30FF:'96-100%\n'  \
AREA:b#FFFFFFFF:  \
AREA:cdefbe#333333FF::STACK \
AREA:cdefbe#555555FF::STACK \
AREA:cdefbg#888888FF::STACK \
AREA:cdefbg#AAAAAAFF::STACK \
AREA:cdefbg#CCCCCCFF::STACK \
AREA:a#FFFFFFFF:  \
AREA:cdefca#CCCCCCFF::STACK \
AREA:cdefca#AAAAAAFF::STACK \
AREA:cdefca#888888FF::STACK \
AREA:cdefca#555555FF::STACK \
AREA:cdefca#333333FF::STACK \
GPRINT:vdefzzcf:'   Avg Loss\:%6.2lf%%'  \
GPRINT:d:MAX:'Max Loss\:%6.2lf%%\n'  \
AREA:cdefch#AFECEDFF:  \
AREA:cdefci#55D6D3FF:  \
AREA:cdefcj#7CB3F1FF:  \
AREA:cdefda#4668E4FF:  \
AREA:cdefdb#A150AAFF:  \
AREA:cdefdc#FF00FFFF:  \
AREA:cdefdd#F51D30FF:  \
COMMENT:'    Latency\:'  \
GPRINT:a:AVERAGE:'Min\:%8.2lf ms'  \
GPRINT:a:AVERAGE:'Avg\:%8.2lf ms'  \
GPRINT:a:MAX:'Max\:%8.2lf ms'  \
GPRINT:e:AVERAGE:'Dev\:%8.2lf ms\n'  \
COMMENT:'Avg Latency\:'  \
GPRINT:a:AVERAGE:'Min\:%8.2lf ms'  \
GPRINT:b:AVERAGE:'Avg\:%8.2lf ms'  \
GPRINT:b:MAX:'Max\:%8.2lf ms'  \
GPRINT:e:AVERAGE:'Dev\:%8.2lf ms\n'  \
LINE1:b#00BD27FF: 
RRDtool Command lengths = 2912 charaters.
RRDtool Says:
SVG/XML Output OK
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Advanced ping for CACTI 1.2.21 RRD 1.8.0

Post by TheWitness »

Test the script by hand. Get the entry out of the poller cache. It's under Console > Utilities > View Poller Cache
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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest