096 - Problem with Target statements

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

NetAdmin
Cacti User
Posts: 98
Joined: Wed Aug 30, 2006 8:45 pm

096 - Problem with Target statements

Post by NetAdmin »

Very strange problem with Target statements, but only in certain nodes. Several other nodes with similar target statements are working fine. All nodes worked fine with Weathermap version 095b.

Cacti log file shows several warnings similar to this:

04/21/2009 09:51:20 AM - WEATHERMAP: Poller[0] WARNING: [Map 13] New York: ReadData: NODE SOMENODE, target: gauge:c:\cacti\rra\routerb_cisco_memused_533.rrd:cisco_memused:- on config line 155 was not recognised as a valid TARGET [WMWARN08]

Code from a working node is:

Code: Select all

NODE LOCATIONA2
	LABEL Memory(Used): {node:this:bandwidth_in:%k}
	LABELFONT 2
	INFOURL /graph.php?rra_id=all&local_graph_id=538
	OVERLIBGRAPH /graph_image.php?local_graph_id=538&rra_id=0&graph_nolegend=false&graph_height=100&graph_width=300
	TARGET gauge:c:\cacti\rra\routera_cisco_memused_548.rrd:cisco_memused:-
	USESCALE mem in
	POSITION LOCATIONA1 -30 18
	MAXVALUE 128M
Code from a node that is generating the above error:

Code: Select all

NODE LOCATIONB2
	LABEL Memory(Used): {node:this:bandwidth_in:%k}
	LABELFONT 2
	INFOURL /graph.php?rra_id=all&local_graph_id=528
	OVERLIBGRAPH /graph_image.php?local_graph_id=528&rra_id=0&graph_nolegend=false&graph_height=100&graph_width=300
	TARGET gauge:c:\cacti\rra\routerb_cisco_memused_533.rrd:cisco_memused:-
	USESCALE mem in
	POSITION LOCATIONB1 -30 18
	MAXVALUE 64M
Cacti Version - 0.8.7d
Plugin Architecture - 2.4
Poller Type - CMD.php
Server Info - Windows NT 5.2
Web Server - Apache/2.2.10 (Win32) PHP/5.2.0
PHP - 5.2.0
PHP Extensions - bcmath, calendar, com_dotnet, ctype, session, filter, ftp, hash, iconv, json, odbc, pcre, Reflection, date, libxml, standard, tokenizer, zlib, SimpleXML, dom, SPL, wddx, xml, xmlreader, xmlwriter, apache2handler, gd, mysql, snmp, sockets
MySQL - 5.0.67-community-nt
RRDTool - 1.2.30
SNMP - 5.4
colejv
Posts: 46
Joined: Wed Mar 19, 2008 10:50 am

Post by colejv »

Is it failing on all the nodes that have MAXVALUE 64M or is that just coincidental.
NetAdmin
Cacti User
Posts: 98
Joined: Wed Aug 30, 2006 8:45 pm

Post by NetAdmin »

Just coincidental. It's also failing on nodes that do not have a maxvalue specified.

Reverted back to 0.95b and all is well with all nodes/maps.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

OK - I'll see if I can recreate this one too :-)

Any chance you could PM me the whole config?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
NetAdmin
Cacti User
Posts: 98
Joined: Wed Aug 30, 2006 8:45 pm

Post by NetAdmin »

Just PM'd you the config. Thanks Howie.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

At least part of it is that some of your paths use \ and some use /. It looks like \n is being interpreted as a carriage-return, and therefore the path fails to match the pattern that weathermap expects.

This is why "gauge:c:\cacti\rra\nyc_.." fails but "C:/Cacti/rra/nyc_..." works, I think.

However, that doesn't explain your original example, and it shouldn't do that in the first place.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Here's your fix, I hope.

Change line 743 of Weathermap.class.php from

Code: Select all

$targetstring = $this->ProcessString($target[4], $myobj, FALSE);
to

Code: Select all

$targetstring = $this->ProcessString($target[4], $myobj, FALSE, FALSE);
Please let me know if it completely works for you, but I no longer get the same errors with your map file.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
NetAdmin
Cacti User
Posts: 98
Joined: Wed Aug 30, 2006 8:45 pm

Post by NetAdmin »

Ah ha! You're exactly right! Any node that contained \n (i.e. c:\cacti\rra\nyc_router......) is absolutely failing in 0.96. I have replaced all of my \ with / and all is well.

Thanks Howie! :D
konsa79
Posts: 15
Joined: Wed May 13, 2009 3:41 am

Post by konsa79 »

i've a similar problem on 0.96a

Code: Select all

SET SW_CED /opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet Port on unit 1, port_28

LINK SW_CED-SW_AMM
        TARGET {map:SW_AMM}/ifInOctets_ifInOctets.rrd:-:ds0 {map:SW_AMM}/ifOutOctets_ifOutOctets.rrd:ds0:-
        NODES SW_CED SW_AMM
        BANDWIDTH 1G

and i've this error

Code: Select all

WARNING: configs/LAIS: ReadData: LINK SW_CED-SW_AMM, target: /opt/zenoss/perf/Devices//ifOutOctets_ifOutOctets.rrd:ds0:- on config line 147 had no valid data, according to WeatherMapDataSource_rrd
but my rrd

Code: Select all

[root@IpMonitoring EtherNet Port on unit 1, port_28]# pwd
/opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet Port on unit 1, port_28
[root@IpMonitoring EtherNet Port on unit 1, port_28]# ls
ifHCInOctets_ifHCInOctets.rrd          ifInUcastPackets_ifInUcastPackets.rrd
ifHCInUcastPkts_ifHCInUcastPkts.rrd    ifOperStatus_ifOperStatus.rrd
ifHCOutOctets_ifHCOutOctets.rrd        ifOutErrors_ifOutErrors.rrd
ifHCOutUcastPkts_ifHCOutUcastPkts.rrd  ifOutOctets_ifOutOctets.rrd
ifInErrors_ifInErrors.rrd              ifOutUcastPackets_ifOutUcastPackets.rrd
ifInOctets_ifInOctets.rrd
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

konsa79 wrote:i've a similar problem on 0.96a

Code: Select all

SET SW_CED /opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet Port on unit 1, port_28

LINK SW_CED-SW_AMM
        TARGET {map:SW_AMM}/ifInOctets_ifInOctets.rrd:-:ds0 {map:SW_AMM}/ifOutOctets_ifOutOctets.rrd:ds0:-
        NODES SW_CED SW_AMM
        BANDWIDTH 1G

and i've this error

Code: Select all

WARNING: configs/LAIS: ReadData: LINK SW_CED-SW_AMM, target: /opt/zenoss/perf/Devices//ifOutOctets_ifOutOctets.rrd:ds0:- on config line 147 had no valid data, according to WeatherMapDataSource_rrd
but my rrd

Code: Select all

[root@IpMonitoring EtherNet Port on unit 1, port_28]# pwd
/opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet Port on unit 1, port_28
[root@IpMonitoring EtherNet Port on unit 1, port_28]# ls
ifHCInOctets_ifHCInOctets.rrd          ifInUcastPackets_ifInUcastPackets.rrd
ifHCInUcastPkts_ifHCInUcastPkts.rrd    ifOperStatus_ifOperStatus.rrd
ifHCOutOctets_ifHCOutOctets.rrd        ifOutErrors_ifOutErrors.rrd
ifHCOutUcastPkts_ifHCOutUcastPkts.rrd  ifOutOctets_ifOutOctets.rrd
ifInErrors_ifInErrors.rrd              ifOutUcastPackets_ifOutUcastPackets.rrd
ifInOctets_ifInOctets.rrd
It's not a similar problem. The previous one was that the target wasn't recognised at all. Yours is that weathermap thinks rrdtool isn't returning valid data. You can check that:

rrdtool info (your rrd file)

and make sure that the last_value near the top is not NaN.

Then you can use --debug on the weathermap command-line to see what ReadData is getting for that link.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
konsa79
Posts: 15
Joined: Wed May 13, 2009 3:41 am

Post by konsa79 »

ok sorry

i think it a path error.... maybe comma value is not accepted
this is my path /opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet Port on unit 1, port_28
i also try with backslash EtherNet\ Port\ on\ unit\ \1\,\port_28

but nothing change

Code: Select all

DEBUG: [add_hint@Weathermap.class.php:110] configs/LAIS: Adding hint SW_CED='/opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet Port on unit 1, port_28' to MAP

Code: Select all

DEBUG: [Reset@WeatherMapNode.class.php:697] configs/LAIS: Resetting SW_CED with DEFAULT
DEBUG: [CopyFrom@WeatherMapNode.class.php:719] configs/LAIS: Initialising NODE SW_CED from DEFAULT
DEBUG: [ReadConfig@Weathermap.class.php:1616] configs/LAIS: Saving Node: SW_CED
DEBUG: [Reset@WeatherMapNode.class.php:697] configs/LAIS: Resetting SW_AMM with DEFAULT
DEBUG: [CopyFrom@WeatherMapNode.class.php:719] configs/LAIS: Initialising NODE SW_AMM from DEFAULT
DEBUG: [ReadConfig@Weathermap.class.php:1616] configs/LAIS: Saving Node: SW_AMM

Code: Select all

DEBUG: [ReadConfig@Weathermap.class.php:1653] configs/LAIS: New LINK SW_CED-SW_AMM
DEBUG: [Reset@WeatherMapLink.class.php:116] configs/LAIS: Resetting SW_CED-SW_AMM with DEFAULT
DEBUG: [CopyFrom@WeatherMapLink.class.php:141] configs/LAIS: Initialising LINK SW_CED-SW_AMM from DEFAULT
DEBUG: [ReadConfig@Weathermap.class.php:1916] configs/LAIS:   TARGET: {map:SW_AMM}/ifInOctets_ifInOctets.rrd:-:ds0
DEBUG: [ReadConfig@Weathermap.class.php:1916] configs/LAIS:   TARGET: {map:SW_AMM}/ifOutOctets_ifOutOctets.rrd:ds0:-
DEBUG: [ReadConfig@Weathermap.class.php:1624] configs/LAIS: Saving Link: SW_CED-SW_AMM

Code: Select all

DEBUG: [ReadData@Weathermap.class.php:729] configs/LAIS: 
DEBUG: [ReadData@Weathermap.class.php:730] configs/LAIS: ReadData for LINK SW_CED-SW_AMM: 
DEBUG: [ReadData@Weathermap.class.php:738] configs/LAIS: ReadData: New Target: {map:SW_AMM}/ifInOctets_ifInOctets.rrd:-:ds0
DEBUG: [ReadData@Weathermap.class.php:747] configs/LAIS: Targetstring is now /opt/zenoss/perf/Devices//ifInOctets_ifInOctets.rrd:-:ds0
DEBUG: [ReadData@Weathermap.class.php:782] configs/LAIS: ReadData: Matched for WeatherMapDataSource_rrd. Calling WeatherMapDataSource_rrd->ReadData()
DEBUG: [ReadData@WeatherMapDataSource_rrd.php:533] configs/LAIS: Special DS names seen (- and ds0).
DEBUG: [ReadData@WeatherMapDataSource_rrd.php:553] configs/LAIS: SCALING result by 8
WARNING: configs/LAIS: Target /opt/zenoss/perf/Devices//ifInOctets_ifInOctets.rrd doesn't exist. Is it a file? [WMRRD06]
DEBUG: [ReadData@WeatherMapDataSource_rrd.php:641] configs/LAIS: RRD ReadData: Returning (NULL,NULL,0)
WARNING: configs/LAIS: ReadData: LINK SW_CED-SW_AMM, target: /opt/zenoss/perf/Devices//ifInOctets_ifInOctets.rrd:-:ds0 on config line 147 had no valid data, according to WeatherMapDataSource_rrd
DEBUG: [ReadData@Weathermap.class.php:825] configs/LAIS: Aggregate so far: 0 0
DEBUG: [ReadData@Weathermap.class.php:738] configs/LAIS: ReadData: New Target: {map:SW_AMM}/ifOutOctets_ifOutOctets.rrd:ds0:-
DEBUG: [ReadData@Weathermap.class.php:747] configs/LAIS: Targetstring is now /opt/zenoss/perf/Devices//ifOutOctets_ifOutOctets.rrd:ds0:-
DEBUG: [ReadData@Weathermap.class.php:782] configs/LAIS: ReadData: Matched for WeatherMapDataSource_rrd. Calling WeatherMapDataSource_rrd->ReadData()
DEBUG: [ReadData@WeatherMapDataSource_rrd.php:533] configs/LAIS: Special DS names seen (ds0 and -).
DEBUG: [ReadData@WeatherMapDataSource_rrd.php:553] configs/LAIS: SCALING result by 8
WARNING: configs/LAIS: Target /opt/zenoss/perf/Devices//ifOutOctets_ifOutOctets.rrd doesn't exist. Is it a file? [WMRRD06]
DEBUG: [ReadData@WeatherMapDataSource_rrd.php:641] configs/LAIS: RRD ReadData: Returning (NULL,NULL,0)
WARNING: configs/LAIS: ReadData: LINK SW_CED-SW_AMM, target: /opt/zenoss/perf/Devices//ifOutOctets_ifOutOctets.rrd:ds0:- on config line 147 had no valid data, according to WeatherMapDataSource_rrd
DEBUG: [ReadData@Weathermap.class.php:825] configs/LAIS: Aggregate so far: 0 0
DEBUG: [ReadData@Weathermap.class.php:838] configs/LAIS: ReadData complete for LINK SW_CED-SW_AMM: 0 0
DEBUG: [add_note@Weathermap.class.php:90] configs/LAIS: Adding note inscalekey='' to SW_CED-SW_AMM
DEBUG: [add_note@Weathermap.class.php:90] configs/LAIS: Adding note outscalekey='' to SW_CED-SW_AMM
DEBUG: [add_note@Weathermap.class.php:90] configs/LAIS: Adding note inscaletag='' to SW_CED-SW_AMM
DEBUG: [add_note@Weathermap.class.php:90] configs/LAIS: Adding note outscaletag='' to SW_CED-SW_AMM
DEBUG: [add_note@Weathermap.class.php:90] configs/LAIS: Adding note inscalecolor='#c0c0c0' to SW_CED-SW_AMM
DEBUG: [add_note@Weathermap.class.php:90] configs/LAIS: Adding note outscalecolor='#c0c0c0' to SW_CED-SW_AMM
DEBUG: [ReadData@Weathermap.class.php:899] configs/LAIS: ReadData: Setting 0,0
DEBUG: [ReadData@Weathermap.class.php:729] configs/LAIS: 
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

In here, you are defining SW_CED, but using SW_AMM...
konsa79 wrote:

Code: Select all

SET SW_CED /opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet Port on unit 1, port_28

LINK SW_CED-SW_AMM
        TARGET {map:SW_AMM}/ifInOctets_ifInOctets.rrd:-:ds0 {map:SW_AMM}/ifOutOctets_ifOutOctets.rrd:ds0:-
        NODES SW_CED SW_AMM
        BANDWIDTH 1G

commas shouldn't be a problem with this type of format, but files that don't exist would be ;-)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
konsa79
Posts: 15
Joined: Wed May 13, 2009 3:41 am

Post by konsa79 »

:D i've to check config better before posting... sorry for the post
konsa79
Posts: 15
Joined: Wed May 13, 2009 3:41 am

Post by konsa79 »

maybe is not a good day to debug but....

Code: Select all

WARNING: configs/LAIS: ReadData: LINK SW_CED-SW_AMM, target: /opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet Port on unit 1, port_28/ifInOctets_ifInOctets.rrd:-:ds0 on config line 147 had no valid data, according to WeatherMapDataSource_rrd
WARNING: configs/LAIS: ReadData: LINK SW_CED-SW_AMM, target: /opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet Port on unit 1, port_28/ifOutOctets_ifOutOctets.rrd:ds0:- on config line 147 had no valid data, according to WeatherMapDataSource_rrd
and

Code: Select all

[root@IpMonitoring weathermap]# ls  /opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet\ Port\ on\ unit\ 1\,\ port_28/
ifHCInOctets_ifHCInOctets.rrd        ifHCOutUcastPkts_ifHCOutUcastPkts.rrd  ifInUcastPackets_ifInUcastPackets.rrd  ifOutOctets_ifOutOctets.rrd
ifHCInUcastPkts_ifHCInUcastPkts.rrd  ifInErrors_ifInErrors.rrd              ifOperStatus_ifOperStatus.rrd          ifOutUcastPackets_ifOutUcastPackets.rrd
ifHCOutOctets_ifHCOutOctets.rrd      ifInOctets_ifInOctets.rrd              ifOutErrors_ifOutErrors.rrd
it's not a slash / backslash \ issue?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

konsa79 wrote:maybe is not a good day to debug but....

Code: Select all

WARNING: configs/LAIS: ReadData: LINK SW_CED-SW_AMM, target: /opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet Port on unit 1, port_28/ifInOctets_ifInOctets.rrd:-:ds0 on config line 147 had no valid data, according to WeatherMapDataSource_rrd
WARNING: configs/LAIS: ReadData: LINK SW_CED-SW_AMM, target: /opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet Port on unit 1, port_28/ifOutOctets_ifOutOctets.rrd:ds0:- on config line 147 had no valid data, according to WeatherMapDataSource_rrd
and

Code: Select all

[root@IpMonitoring weathermap]# ls  /opt/zenoss/perf/Devices/SW_Amministrazione/os/interfaces/EtherNet\ Port\ on\ unit\ 1\,\ port_28/
ifHCInOctets_ifHCInOctets.rrd        ifHCOutUcastPkts_ifHCOutUcastPkts.rrd  ifInUcastPackets_ifInUcastPackets.rrd  ifOutOctets_ifOutOctets.rrd
ifHCInUcastPkts_ifHCInUcastPkts.rrd  ifInErrors_ifInErrors.rrd              ifOperStatus_ifOperStatus.rrd          ifOutUcastPackets_ifOutUcastPackets.rrd
ifHCOutOctets_ifHCOutOctets.rrd      ifInOctets_ifInOctets.rrd              ifOutErrors_ifOutErrors.rrd
it's not a slash / backslash \ issue?
You only just added the backslashes! How could it be a backslash issue before you added them? :-)

When you run with --debug, and use the correct SW_CED, what does ReadData say then?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests