MIB Protocol Statistics (RFC1213) [v2.1 - 2009-05-10]

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

Moderators: Developers, Moderators

Post Reply
khoch3
Posts: 10
Joined: Tue Aug 07, 2007 10:18 am

Post by khoch3 »

Hi, I just installed these scripts and templates, the scripts run fine from command line and the script server but cacti is not creating the rrd's when running poller.php. Other graphs are working and the cactiuser has RW perms over /var/www/html/cacti/*.


-bash-3.00$ php /var/www/html/cacti/scripts/ss_protocol_traffic.php nagiosdev <comm-string> 1 161 5000
PHP Warning: Missing argument 6 for ss_protocol_traffic() in /var/www/html/cacti/scripts/ss_protocol_traffic.php on line 15
PHP Warning: Missing argument 7 for ss_protocol_traffic() in /var/www/html/cacti/scripts/ss_protocol_traffic.php on line 15
ipInReceives:6381172 ipOutRequests:6649105 tcpInSegs:5925583 tcpOutSegs:6181027 udpInDatagrams:281501 udpOutDatagrams:283620 snmpInPkts:3707 snmpOutPkts:3707 icmpInMsgs:173987 icmpOutMsgs:52578

-bash-3.00$ php script_server.php
PHP Script Server has Started - Parent is cmd
/var/www/html/cacti/scripts/ss_protocol_traffic.php ss_protocol_traffic nagiosdev <comm-string> 1 161 5000
ipInReceives:6382064 ipOutRequests:6649994 tcpInSegs:5926135 tcpOutSegs:6181576 udpInDatagrams:281837 udpOutDatagrams:283956 snmpInPkts:3811 snmpOutPkts:3811 icmpInMsgs:173994 icmpOutMsgs:52579


This is the DEBUG I see in cacti.log:


08/10/2007 05:15:06 PM - PHPSVR: Poller[0] DEBUG: INC: '/var/www/html/cacti/scripts/ss_protocol_udp.php' FUNC: 'ss_protocol_udp' PARMS: 'nagiosdev <comm-string> 1 161 5000'
08/10/2007 05:15:05 PM - PHPSVR: Poller[0] DEBUG: INC: '/var/www/html/cacti/scripts/ss_protocol_snmp.php' FUNC: 'ss_protocol_snmp' PARMS: 'nagiosdev <comm-string> 1 161 5000'
08/10/2007 05:15:05 PM - PHPSVR: Poller[0] DEBUG: INC: '/var/www/html/cacti/scripts/ss_protocol_tcp.php' FUNC: 'ss_protocol_tcp' PARMS: 'nagiosdev <comm-string> 1 161 5000'
08/10/2007 05:15:04 PM - PHPSVR: Poller[0] DEBUG: INC: '/var/www/html/cacti/scripts/ss_protocol_traffic.php' FUNC: 'ss_protocol_traffic' PARMS: 'nagiosdev <comm-string> 1 161 5000'
08/10/2007 05:15:04 PM - PHPSVR: Poller[0] DEBUG: INC: '/var/www/html/cacti/scripts/ss_protocol_ip.php' FUNC: 'ss_protocol_ip' PARMS: 'nagiosdev <comm-string> 1 161 5000'
08/10/2007 05:15:03 PM - PHPSVR: Poller[0] DEBUG: INC: '/var/www/html/cacti/scripts/ss_protocol_ip.php' FUNC: 'ss_protocol_ip' PARMS: 'nagiosdev <comm-string> 1 161 5000'

and the debug for one of the graphs:

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="nagiosdev - IP Protocol Statistics" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale \
--vertical-label="per 5 minutes" \
DEF:a="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipForwDatagrams:AVERAGE \
DEF:b="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipFragCreates:AVERAGE \
DEF:c="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipFragFails:AVERAGE \
DEF:d="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipFragOKs:AVERAGE \
DEF:e="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipInAddrErrors:AVERAGE \
DEF:f="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipInDiscards:AVERAGE \
DEF:g="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipInHdrErrors:AVERAGE \
DEF:h="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipInUnknownProtos:AVERAGE \
DEF:i="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipOutDiscards:AVERAGE \
DEF:j="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipOutNoRoutes:AVERAGE \
DEF:ba="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipReasmFails:AVERAGE \
DEF:bb="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipReasmOKs:AVERAGE \
DEF:bc="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipReasmReqds:AVERAGE \
DEF:bd="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipRoutingDiscards:AVERAGE \
CDEF:cdefa=a,300,* \
CDEF:cdefe=b,300,* \
CDEF:cdefi=c,300,* \
CDEF:cdefbc=d,300,* \
CDEF:cdefbg=e,300,* \
CDEF:cdefca=f,300,* \
CDEF:cdefce=g,300,* \
CDEF:cdefci=h,300,* \
CDEF:cdefdd=i,-300,* \
CDEF:cdefde=i,300,* \
CDEF:cdefdh=j,-300,* \
CDEF:cdefdi=j,300,* \
CDEF:cdefeb=ba,-300,* \
CDEF:cdefec=ba,300,* \
CDEF:cdefef=bb,-300,* \
CDEF:cdefeg=bb,300,* \
CDEF:cdefej=bc,-300,* \
CDEF:cdeffa=bc,300,* \
CDEF:cdeffd=bd,-300,* \
CDEF:cdeffe=bd,300,* \
AREA:cdefa#FFF200:"IpForwDatagrams" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefe#FF6044:"ipFragCreates" \
GPRINT:cdefe:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefi#C4FD3D:"ipFragFails" \
GPRINT:cdefi:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefi:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefbc#D8ACE0:"ipFragOKs" \
GPRINT:cdefbc:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefbc:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefbc:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefbg#CCCCCC:"ipInAddrErrors" \
GPRINT:cdefbg:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefbg:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefbg:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefca#B90054:"ipInDiscards" \
GPRINT:cdefca:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefca:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefca:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefce#00BED9:"ipInHdrErrors" \
GPRINT:cdefce:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefce:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefce:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefci#623465:"ipInUnknownProtos" \
GPRINT:cdefci:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefci:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefci:MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:"\n" \
AREA:cdefdd#55D6D3:"ipOutDiscards" \
GPRINT:cdefde:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefde:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefde:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefdh#6557D0:"ipOutNoRoutes" \
GPRINT:cdefdi:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefdi:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefdi:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefeb#35962B:"ipReasmFails" \
GPRINT:cdefec:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefec:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefec:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefef#0000FF:"ipReasmOKs" \
GPRINT:cdefeg:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefeg:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefeg:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefej#311F4E:"ipReasmReqds" \
GPRINT:cdeffa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdeffa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeffa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdeffd#FFF200:"ipRoutingDiscards" \
GPRINT:cdeffe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeffe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeffe:MAX:"Maximum\:%8.2lf %s\n"

RRDTool Says:

ERROR: opening '/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd': No such file or directory


any help you can give me in solving this would be greatly appreciated!

Thanks,

Keith
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Change the logging level in cacti to debug and wait for a polling cycle. Then look through the log file for ss_protocol_tcp.php. Did the script return data? Do you see CACTI2RRD entries related to ss_protocol_tcp.php's outputted data?
khoch3
Posts: 10
Joined: Tue Aug 07, 2007 10:18 am

Post by khoch3 »

Thanks for the quick reply, yes, I do see data returned but I don't see a CACTI2RRD entry for any of these scripts:

[root@nagiosdev log]# cat cacti.log |grep ss_protocol_tcp
08/10/2007 05:15:05 PM - PHPSVR: Poller[0] DEBUG: INC: '/var/www/html/cacti/scripts/ss_protocol_tcp.php' FUNC: 'ss_protocol_tcp' PARMS: 'nagiosdev <community> 1 161 5000'
08/10/2007 05:15:05 PM - CMDPHP: Poller[0] Host[1] DS[142] SERVER: /var/www/html/cacti/scripts/ss_protocol_tcp.php ss_protocol_tcp nagiosdev <community> 1 161 5000 , output: tcpActiveOpens:484751 tcpPassiveOpens:421552 tcpAttemptFails:39 tcpEstabResets:89208 tcpCurrEstab:3 tcpRetransSegs:40008 tcpInErrs:0 tcpOutRsts:100394
[root@nagiosdev log]# cat cacti.log |grep ss_protocol_tcp |grep CACTI2RRD
[root@nagiosdev log]#
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

you won't see entries related to CACTI2RRD with the ss_protocol text in them... Don't have a cacti installation in front of me, but those entries are when cacti actually updates the rrd files with the data it collected. Either manually look through the log or post it
khoch3
Posts: 10
Joined: Tue Aug 07, 2007 10:18 am

Post by khoch3 »

Thanks... here's the related entries:

08/10/2007 05:15:05 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool create /var/www/html/cacti/rra/nagiosdev_snmpinpkts_141.rrd --step 300
DS:snmpInPkts:COUNTER:600:0:U DS:udpOutDatagrams:COUNTER:600:0:U DS:tcpOutSegs:COUNTER:600:0:U DS:udpInDatagrams:COUNTER:600:0:U DS:ipOutRequests:COUNTE
R:600:0:U DS:tcpInSegs:COUNTER:600:0:U DS:ipInReceives:COUNTER:600:0:U DS:snmpOutPkts:COUNTER:600:0:U DS:icmpInMsgs:COUNTER:600:0:U DS:icmpOutMsgs:COUNTE
R:600:0:U 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:MIN:0.5:1:600 RRA:MIN:0.5:6:700 RRA:MIN:0.5:24
:775 RRA:MIN:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 RRA:LAST:0.5:1:600 RRA:LAST:0.5:6:700 RRA:LAST:0.5
:24:775 RRA:LAST:0.5:288:797
08/10/2007 05:15:05 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/nagiosdev_snmpinpkts_141.rrd --template ip
InReceives:ipOutRequests:tcpInSegs:tcpOutSegs:udpInDatagrams:udpOutDatagrams:snmpInPkts:snmpOutPkts:icmpInMsgs:icmpOutMsgs N:6383672:6651768:5927630:6183237:2
81975:284094:3871:3871:174029:52587
08/10/2007 05:15:05 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool create /var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd --st
ep 300 DS:ipInUnknownProtos:COUNTER:600:0:U DS:ipForwDatagrams:COUNTER:600:0:U DS:ipInAddrErrors:COUNTER:600:0:U DS:ipInHdrErrors:COUNTER:600:0:U DS:ipI
nDiscards:COUNTER:600:0:U DS:ipInDelivers:COUNTER:600:0:U DS:ipOutDiscards:COUNTER:600:0:U DS:ipOutNoRoutes:COUNTER:600:0:U DS:ipRoutingDiscards:COUNTER:6
00:0:U DS:ipReasmReqds:COUNTER:600:0:U DS:ipReasmOKs:COUNTER:600:0:U DS:ipReasmFails:COUNTER:600:0:U DS:ipFragOKs:COUNTER:600:0:U DS:ipFragFails:COUNTER:
600:0:U DS:ipFragCreates:COUNTER:600:0:U 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:MIN:0.5:1:600 R
RA:MIN:0.5:6:700 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 RRA:LAST:0.5:1:600
RRA:LAST:0.5:6:700 RRA:LAST:0.5:24:775 RRA:LAST:0.5:288:797
08/10/2007 05:15:05 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd --temp
late ipInHdrErrors:ipInAddrErrors:ipForwDatagrams:ipInUnknownProtos:ipInDiscards:ipInDelivers:ipOutDiscards:ipOutNoRoutes:ipRoutingDiscards:ipReasmReqds:ipRea
smOKs:ipReasmFails:ipFragOKs:ipFragFails:ipFragCreates N:0:0:0:0:0:6383672:0:0:0:0:0:0:0:0:0
08/10/2007 05:15:06 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool create /var/www/html/cacti/rra/nagiosdev_tcpactiveopens_142.rrd --step
300 DS:tcpActiveOpens:COUNTER:600:0:U DS:tcpPassiveOpens:COUNTER:600:0:U DS:tcpAttemptFails:COUNTER:600:0:U DS:tcpEstabResets:COUNTER:600:0:U DS:tcpCurr
Estab:GAUGE:600:0:U DS:tcpRetransSegs:COUNTER:600:0:U DS:tcpInErrs:COUNTER:600:0:U DS:tcpOutRsts:COUNTER:600:0:U 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:MIN:0.5:1:600 RRA:MIN:0.5:6:700 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MA
X:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 RRA:LAST:0.5:1:600 RRA:LAST:0.5:6:700 RRA:LAST:0.5:24:775 RRA:LAST:0.5:288:797
08/10/2007 05:15:06 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/nagiosdev_tcpactiveopens_142.rrd --templat
e tcpActiveOpens:tcpPassiveOpens:tcpAttemptFails:tcpEstabResets:tcpCurrEstab:tcpRetransSegs:tcpInErrs:tcpOutRsts N:484751:421552:39:89208:3:40008:0:100394
08/10/2007 05:15:06 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool create /var/www/html/cacti/rra/nagiosdev_snmpinbadversions_143.rrd --st
ep 300 DS:snmpInBadVersions:COUNTER:600:0:U DS:snmpInBadCommunityN:COUNTER:600:0:U DS:snmpInBadCommunityU:COUNTER:600:0:U DS:snmpInASNParseErrs:COUNTER:6
00:0:U DS:snmpInTooBigs:COUNTER:600:0:U DS:snmpInBadValues:COUNTER:600:0:U DS:snmpInReadOnlys:COUNTER:600:0:U DS:snmpInGenErrs:COUNTER:600:0:U DS:snmpInT
otalReqVars:COUNTER:600:0:U DS:snmpInTotalSetVars:COUNTER:600:0:U DS:snmpInGetRequests:COUNTER:600:0:U DS:snmpInGetNexts:COUNTER:600:0:U DS:snmpInSetReque
sts:COUNTER:600:0:U DS:snmpInGetResponses:COUNTER:600:0:U DS:snmpInTraps:COUNTER:600:0:U DS:snmpOutTooBigs:COUNTER:600:0:U DS:snmpOutNoSuchNames:COUNTER:6
00:0:U DS:snmpOutBadValues:COUNTER:600:0:U DS:snmpOutTraps:COUNTER:600:0:U DS:snmpOutGenErrs:COUNTER:600:0:U DS:snmpOutGetRequests:COUNTER:600:0:U DS:snm
pOutGetNexts:COUNTER:600:0:U DS:snmpOutSetRequests:COUNTER:600:0:U DS:snmpOutGetResponses:COUNTER:600:0:U 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:MIN:0.5:1:600 RRA:MIN:0.5:6:700 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:
700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 RRA:LAST:0.5:1:600 RRA:LAST:0.5:6:700 RRA:LAST:0.5:24:775 RRA:LAST:0.5:288:797
08/10/2007 05:15:06 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/nagiosdev_snmpinbadversions_143.rrd --temp
late snmpInBadVersions:snmpInBadCommunityN:snmpInBadCommunityU:snmpInASNParseErrs:snmpInTooBigs:snmpInBadValues:snmpInReadOnlys:snmpInGenErrs:snmpInTotalReqVa
rs:snmpInTotalSetVars:snmpInGetRequests:snmpInGetNexts:snmpInSetRequests:snmpInGetResponses:snmpInTraps:snmpOutTooBigs:snmpOutNoSuchNames:snmpOutBadValues:snm
pOutGenErrs:snmpOutGetRequests:snmpOutGetNexts:snmpOutSetRequests:snmpOutGetResponses:snmpOutTraps N:0:0:0:0:0:0:0:0:3886:0:3749:144:0:0:0:0:4:0:0:0:0:0:3904:
0
08/10/2007 05:15:07 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool create /var/www/html/cacti/rra/nagiosdev_udpinerrors_144.rrd --step 300
DS:udpInErrors:COUNTER:600:0:U DS:udpNoPorts:COUNTER:600:0:U RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:79
7 RRA:MIN:0.5:1:600 RRA:MIN:0.5:6:700 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:79
7 RRA:LAST:0.5:1:600 RRA:LAST:0.5:6:700 RRA:LAST:0.5:24:775 RRA:LAST:0.5:288:797
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Alright, so we know the script is properly returning data. Also, we can see cacti is attempting to update the rrd files with the new data. Yet you state the graphs are blank? Sure sounds like the rrd files don't have the proper rights to get updated.

Have you already read through http://docs.cacti.net/node/283 ?
khoch3
Posts: 10
Joined: Tue Aug 07, 2007 10:18 am

Post by khoch3 »

Yeah, I've read through that doc many times, the problem is there are no rrd files to update. I've attached the portion of the cacti.log where it runs these scripts, I don't see anything that says "can't create rrd file" but perhaps I'm missing something. I really appreciate your help.

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="nagiosdev - IP Protocol Statistics" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale \
--vertical-label="per 5 minutes" \
DEF:a="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipForwDatagrams:AVERAGE \
DEF:b="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipFragCreates:AVERAGE \
DEF:c="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipFragFails:AVERAGE \
DEF:d="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipFragOKs:AVERAGE \
DEF:e="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipInAddrErrors:AVERAGE \
DEF:f="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipInDiscards:AVERAGE \
DEF:g="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipInHdrErrors:AVERAGE \
DEF:h="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipInUnknownProtos:AVERAGE \
DEF:i="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipOutDiscards:AVERAGE \
DEF:j="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipOutNoRoutes:AVERAGE \
DEF:ba="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipReasmFails:AVERAGE \
DEF:bb="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipReasmOKs:AVERAGE \
DEF:bc="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipReasmReqds:AVERAGE \
DEF:bd="/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd":ipRoutingDiscards:AVERAGE \
CDEF:cdefa=a,300,* \
CDEF:cdefe=b,300,* \
CDEF:cdefi=c,300,* \
CDEF:cdefbc=d,300,* \
CDEF:cdefbg=e,300,* \
CDEF:cdefca=f,300,* \
CDEF:cdefce=g,300,* \
CDEF:cdefci=h,300,* \
CDEF:cdefdd=i,-300,* \
CDEF:cdefde=i,300,* \
CDEF:cdefdh=j,-300,* \
CDEF:cdefdi=j,300,* \
CDEF:cdefeb=ba,-300,* \
CDEF:cdefec=ba,300,* \
CDEF:cdefef=bb,-300,* \
CDEF:cdefeg=bb,300,* \
CDEF:cdefej=bc,-300,* \
CDEF:cdeffa=bc,300,* \
CDEF:cdeffd=bd,-300,* \
CDEF:cdeffe=bd,300,* \
AREA:cdefa#FFF200:"IpForwDatagrams" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefe#FF6044:"ipFragCreates" \
GPRINT:cdefe:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefi#C4FD3D:"ipFragFails" \
GPRINT:cdefi:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefi:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefbc#D8ACE0:"ipFragOKs" \
GPRINT:cdefbc:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefbc:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefbc:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefbg#CCCCCC:"ipInAddrErrors" \
GPRINT:cdefbg:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefbg:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefbg:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefca#B90054:"ipInDiscards" \
GPRINT:cdefca:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefca:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefca:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefce#00BED9:"ipInHdrErrors" \
GPRINT:cdefce:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefce:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefce:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefci#623465:"ipInUnknownProtos" \
GPRINT:cdefci:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefci:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefci:MAX:"Maximum\:%8.2lf %s\n" \
COMMENT:"\n" \
AREA:cdefdd#55D6D3:"ipOutDiscards" \
GPRINT:cdefde:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefde:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefde:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefdh#6557D0:"ipOutNoRoutes" \
GPRINT:cdefdi:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefdi:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefdi:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefeb#35962B:"ipReasmFails" \
GPRINT:cdefec:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefec:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefec:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefef#0000FF:"ipReasmOKs" \
GPRINT:cdefeg:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefeg:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefeg:MAX:"Maximum\:%8.2lf %s\n" \
STACK:cdefej#311F4E:"ipReasmReqds" \
GPRINT:cdeffa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdeffa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeffa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdeffd#FFF200:"ipRoutingDiscards" \
GPRINT:cdeffe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeffe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeffe:MAX:"Maximum\:%8.2lf %s\n"

RRDTool Says:

ERROR: opening '/var/www/html/cacti/rra/nagiosdev_ipinunknownprotos_140.rrd': No such file or directory


Attachments
cacti.log.txt
(33.28 KiB) Downloaded 504 times
khoch3
Posts: 10
Joined: Tue Aug 07, 2007 10:18 am

Post by khoch3 »

some more info... I created the rrd's by hand using the syntax from the cacti.log and I was the apache user (the user that runs cacti for me), the rrd's were created but then not updated by the poller. I then updated the rrd's by hand using the syntax I got from the cacti.log and that partially worked. I have some values but a few 'nans'. However, when poller runs, the rrd's are not updated at all and when I delete the rrd's they are not created by the poller. Yet, other graphs such as MySQL and Apache are working fine and the rrd's all have the same perms.

One thing I just thought of, I am running RRDtool 1.0.50. Should I upgrade to 1.2? Do you think that could be it?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Do you have cacti 1.0 selected in cacti's settings? It should work fine, but wouldn't hurt to upgrade to 1.2.

Are you sure the /cacti/rra/ folder has RW permissions for the cron user? The simple fact is that, is that one can see the CACTI2RRD entries are trying to create the rrd files several times, but they're not getting created, which would lead me to believe a permission problem. But you say, other graphs are working?
khoch3
Posts: 10
Joined: Tue Aug 07, 2007 10:18 am

Post by khoch3 »

BSOD2600 wrote:Do you have cacti 1.0 selected in cacti's settings? It should work fine, but wouldn't hurt to upgrade to 1.2.

Are you sure the /cacti/rra/ folder has RW permissions for the cron user? The simple fact is that, is that one can see the CACTI2RRD entries are trying to create the rrd files several times, but they're not getting created, which would lead me to believe a permission problem. But you say, other graphs are working?
Yes, I have cacti 1.0 selected, I'll try upgrading tonight.

Yes, other graphs are working, the apache user definitely has rw to /rra.

[root@nagiosdev cacti]# crontab -u apache -l
*/5 * * * * php /var/www/html/cacti/poller.php > /dev/null 2>&1

[root@nagiosdev cacti]# ls -l |grep rra
drwxrwxrw- 2 apache apache 5120 Aug 11 12:55 rra
ptexp
Posts: 2
Joined: Thu May 18, 2006 2:07 pm

Post by ptexp »

Thanks for this! It seems to work smoothly here.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Modified stuff uploaded to first post of the thread to fully support SNMPv3
Reinhard
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

heh, thanks gandalf
User avatar
merana
Posts: 14
Joined: Sun Dec 22, 2002 3:32 pm
Location: So.Jersey/Philly
Contact:

Sort of Working but with odd results

Post by merana »

Ok, before I get too far let me make the following statements:

- I couldn't get the import to work so I rebuilt from scratch by tracing through the XML file.
- It all seems to work except for the negative portions of the graph and the truncation of the Max values.

The questions are:

- Why don't the negatives show as clearly?
- Why are the Max values getting truncated?

To that I present the following:

Image

The rrdtool output for the Graph is as follows:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Combined Protocol traffic" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale \
--vertical-label="" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":ipInReceives:AVERAGE \
DEF:b="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":ipInReceives:MAX \
DEF:c="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":udpInDatagrams:AVERAGE \
DEF:d="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":udpInDatagrams:MAX \
DEF:e="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":icmpInMsgs:AVERAGE \
DEF:f="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":icmpInMsgs:MAX \
DEF:g="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":snmpInPkts:AVERAGE \
DEF:h="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":snmpInPkts:MAX \
DEF:i="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":ipOutRequests:AVERAGE \
DEF:j="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":ipOutRequests:MAX \
DEF:ba="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":udpOutDatagrams:AVERAGE \
DEF:bb="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":udpOutDatagrams:MAX \
DEF:bc="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":icmpOutMsgs:AVERAGE \
DEF:bd="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":icmpOutMsgs:MAX \
DEF:be="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":snmpOutPkts:AVERAGE \
DEF:bf="/var/www/cacti/rra/switch_snmpinpkts_113.rrd":snmpOutPkts:MAX \
CDEF:cdefbh=i,-1,* \
CDEF:cdefcb=ba,-1,* \
CDEF:cdefcf=bc,-1,* \
CDEF:cdefcj=be,-1,* \
AREA:a#00CF00FF:"ipInReceives"  \
GPRINT:a:LAST:"   Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:c#FF0000FF:"udpInDatagrams"  \
GPRINT:c:LAST:" Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:d:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:e#00FF00FF:"icmpInMsgs"  \
GPRINT:e:LAST:"     Current\:%8.2lf %s"  \
GPRINT:e:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:f:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:g#C4FD3DFF:"snmpInPkts"  \
GPRINT:g:LAST:"     Current\:%8.2lf %s"  \
GPRINT:g:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:h:MAX:"Maximum\:%8.2lf %s\n"  \
COMMENT:"\n"  \
AREA:cdefbh#002A97FF:"ipOutRequests"  \
GPRINT:i:LAST:"  Current\:%8.2lf %s"  \
GPRINT:i:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:j:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefcb#96E78AFF:"udpOutDatagrams"  \
GPRINT:ba:LAST:"Current\:%8.2lf %s"  \
GPRINT:ba:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:bb:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefcf#00CF00FF:"icmpOutMsgs"  \
GPRINT:bc:LAST:"    Current\:%8.2lf %s"  \
GPRINT:bc:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:bd:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefcj#C4FD3DFF:"snmpOutPkts"  \
GPRINT:be:LAST:"    Current\:%8.2lf %s"  \
GPRINT:be:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:bf:MAX:"Maximum\:%8.2lf %s\n" 
The RRDTOOL Output for the DS is:

Code: Select all

Data Source Debug

/usr/bin/rrdtool create \
/var/www/cacti/rra/switch_snmpinpkts_113.rrd \
--step 300  \
DS:snmpInPkts:COUNTER:600:0:U \
DS:udpOutDatagrams:COUNTER:600:0:U \
DS:tcpOutSegs:COUNTER:600:0:U \
DS:udpInDatagrams:COUNTER:600:0:U \
DS:ipOutRequests:COUNTER:600:0:U \
DS:tcpInSegs:COUNTER:600:0:U \
DS:ipInReceives:COUNTER:600:0:U \
DS:snmpOutPkts:COUNTER:600:0:U \
DS:icmpInMsgs:COUNTER:600:0:U \
DS:icmpOutMsgs:COUNTER: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 \
Also I am including an export of the DS and the graph for your review.
Attachments
Sample graph output
Sample graph output
graphout1.png (36.88 KiB) Viewed 9589 times
cacti_data_template_protocol_statistics_-_combined.xml
Data Source Template XML
(18.53 KiB) Downloaded 489 times
cacti_graph_template_protocol_statistics_-_combined.xml
Graph Template XML
(41.59 KiB) Downloaded 637 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Sort of Working but with odd results

Post by BSOD2600 »

merana wrote:I couldn't get the import to work so I rebuilt from scratch by tracing through the XML file.
Why not? what errors did you get?

Did you import the 1.0 or newer 1.2 templates? Try the older...
merana wrote:- Why don't the negatives show as clearly?
I used a CDEF to make the stack negative, this would've been imported if you used my templates.

Code: Select all

cdef=CURRENT_DATA_SOURCE,-300,*
merana wrote:Why are the Max values getting truncated?
What do you mean? I also made the graphs "per 5 minutes" instead of the default.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests