[request] limited number of characters in TARGET

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
duduclx
Posts: 4
Joined: Fri Oct 07, 2016 9:19 am

[request] limited number of characters in TARGET

Post by duduclx »

Hello all,


first, the config:
cacti 0.8.8h
weathermap 0.98

I have issue with a TARGET who have to sum 72 .rra
(about 5119 characters)

my very long line is ok, but in log, i can see than the target is cropped after the 4158 characters of the line, and so give an error.

i looked about variables to get smaller line, like:
http://forums.cacti.net/viewtopic.php?f=16&t=55470
but no succes yet.

so, how to get it up to more than 4158 characters ?
or, how to have working hint variable to get a smaller line ?

here the errors:

Code: Select all

10/07/2016 04:22:44 PM - WEATHERMAP: Poller[0] WARNING: [Map 4] _imag-DC.conf: ProcessTargets: NODE totalrangeeA, target: 0.1*gauge:{map:cacti_path_rra}/pdu-a6-3_ph2amp_670.rrd: on config line 123 of /home/mgmt/Cacti/cacti-0.8.8h/plugins/weathermap/configs/_imag-DC.conf was not recognised as a valid TARGET [WMWARN08]

10/07/2016 04:22:43 PM - WEATHERMAP: Poller[0] WARNING: [Map 4] _imag-DC.conf: Unrecognised config on line 124: ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-3_ph3amp_675.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-4_ph1amp_690.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-4_ph2amp_695.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-4_ph3amp_700.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-1_ph1amp_715.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-1_ph2amp_720.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-1_ph3amp_725.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-2_ph1amp_740.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-2_ph2amp_745.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-2_ph3amp_750.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-3_ph1amp_765.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-3_ph2amp_770.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-3_ph3amp_775.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-4_ph1amp_790.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-4_ph2amp_795.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-4_ph3amp_800.rrd:ph3amp:- 
here the target line:

Code: Select all

TARGET 0.1*gauge:{map:cacti_path_rra}/pdu-a1-1_ph1amp_116.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a1-1_ph2amp_117.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a1-1_ph3amp_118.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a1-2_ph1amp_140.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a1-2_ph2amp_145.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a1-2_ph3amp_150.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a1-3_ph1amp_165.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a1-3_ph2amp_170.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a1-3_ph3amp_175.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a1-4_ph1amp_190.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a1-4_ph2amp_195.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a1-4_ph3amp_200.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a2-2_ph2amp_245.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a2-2_ph3amp_250.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a2-3_ph1amp_265.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a2-3_ph2amp_270.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a2-3_ph3amp_275.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a2-4_ph1amp_290.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a2-4_ph2amp_295.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a2-4_ph3amp_300.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-1_ph1amp_315.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-1_ph2amp_320.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-1_ph3amp_325.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-2_ph1amp_340.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-2_ph2amp_345.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-2_ph3amp_350.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-3_ph1amp_365.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-3_ph2amp_370.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-3_ph3amp_375.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-4_ph1amp_390.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-4_ph2amp_395.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a3-4_ph3amp_400.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-1_ph1amp_415.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-1_ph2amp_420.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-1_ph3amp_425.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-2_ph1amp_440.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-2_ph2amp_445.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-2_ph3amp_450.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-3_ph1amp_465.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-3_ph2amp_470.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-3_ph3amp_475.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-4_ph1amp_490.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-4_ph2amp_495.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a4-4_ph3amp_500.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-1_ph1amp_515.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-1_ph2amp_520.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-1_ph3amp_525.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-2_ph1amp_540.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-2_ph2amp_545.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-2_ph3amp_550.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-3_ph1amp_565.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-3_ph2amp_570.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-3_ph3amp_575.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-4_ph1amp_590.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-4_ph2amp_595.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a5-4_ph3amp_600.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-1_ph1amp_615.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-1_ph2amp_620.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-1_ph3amp_625.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-2_ph1amp_640.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-2_ph2amp_645.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-2_ph3amp_650.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-3_ph1amp_665.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-3_ph2amp_670.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-3_ph3amp_675.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-4_ph1amp_690.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-4_ph2amp_695.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a6-4_ph3amp_700.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-1_ph1amp_715.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-1_ph2amp_720.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-1_ph3amp_725.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-2_ph1amp_740.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-2_ph2amp_745.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-2_ph3amp_750.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-3_ph1amp_765.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-3_ph2amp_770.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-3_ph3amp_775.rrd:ph3amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-4_ph1amp_790.rrd:ph1amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-4_ph2amp_795.rrd:ph2amp:- 0.1*gauge:{map:cacti_path_rra}/pdu-a7-4_ph3amp_800.rrd:ph3amp:-
ps;
i prefer not to have custom external script.
i tried target filename.txt

Code: Select all

<name-of-the-first-node> 0.1*gauge:{map:cacti_path_rra}/pdu-a1-1_ph1amp_116.rrd 0.1*gauge:{map:cacti_path_rra}/pdu-a1-1_ph1amp_116.rrd
<name-of-the-first-node> 0.1*gauge:{map:cacti_path_rra}/pdu-a1-1_ph2amp_117.rrd 0.1*gauge:{map:cacti_path_rra}/pdu-a1-1_ph2amp_117.rrd
but this was not working.
yep, i have 3 .rra attached to a node

thanks for helping !
Last edited by duduclx on Fri Oct 07, 2016 9:43 am, edited 1 time in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: [request] limited number of characters in TARGET

Post by Howie »

That's a long line. I can't think of a better way to do it without external stuff though...

Anyway, in Weathermap.class.php, around line 1826 there is:

Code: Select all

$buffer=fgets($fd, 4096);
try changing that number.

You could win back some characters by making your own global variable for the path with a shorter name too, I guess.

The text file doesn't work because it is expecting to find numbers, not target strings, and in a particular format.
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!)
duduclx
Posts: 4
Joined: Fri Oct 07, 2016 9:19 am

Re: [request] limited number of characters in TARGET

Post by duduclx »

Thanks for quick reply !!

i have no root access, and i can't write in the Weathermap/lib folder

i ask to the root administrator to do.

about global variable, i've tested, but not worked.

i used

Code: Select all

SET path 0.1*gauge:/home/mgmt/Cacti/cacti-0.8.8h/rra

TARGET path/pdu-a1-1_ph1amp_116.rrd:ph1amp:-
not recognize as a valid value or file not found ...

I also tried:

Code: Select all

TARGET {Node:<the-node-name>:bandwidth_in}
but bandwidth is incorrect in target ...
maybe i shoul use, in my case:

Code: Select all

TARGET {Node:this:<the-node-name-1>} {Node:this:<the-node-name-2>}
and target of a node do the sum of 3 .rra

well, how to correctly set a global viariable for the target ?

cheers !
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: [request] limited number of characters in TARGET

Post by Howie »

If you add that SET command at the beginning, then you should be able to use

Code: Select all

TARGET {map:path}/pdu-a1-1_ph1amp_116.rrd:ph1amp:-
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!)
duduclx
Posts: 4
Joined: Fri Oct 07, 2016 9:19 am

Re: [request] limited number of characters in TARGET

Post by duduclx »

Yeah,

The SET with the correct {map:path} did the trick !!

Thanks you so much !

I love to play with weathermap.
But sometimes, the manual and the advanced topic don't gave me the answer.

Others topics and website does ...
If one day you intend to have a mediawiki on network-weathermap, i'd like to add some stuff, exemples and specific tricks.

cheers !!
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: [request] limited number of characters in TARGET

Post by Howie »

duduclx wrote:Yeah,

The SET with the correct {map:path} did the trick !!

Thanks you so much !

I love to play with weathermap.
But sometimes, the manual and the advanced topic don't gave me the answer.

Others topics and website does ...
If one day you intend to have a mediawiki on network-weathermap, i'd like to add some stuff, exemples and specific tricks.

cheers !!
That's a good idea. If I can figure out how to do it without having to spend my life deleting spam, then maybe!

(good example - new weathermap site is in wordpress. You have to register to comment. There are 2 comments on the whole site, but strangely there are 394 registered users, mostly with random-looking e-mail addresses)
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!)
duduclx
Posts: 4
Joined: Fri Oct 07, 2016 9:19 am

Re: [request] limited number of characters in TARGET

Post by duduclx »

I ever had this problem with wordpress.
You can find plugins about that.

In Mediawiki, i've just watched how i do ...
XD i've lock registration.
Then, i create account only for well-kowned-people.

About mediawiki, there is plenty of solution ...

captcha and email verification are still first anti-spam provided solution.

All website i got are personnal, and not indexed by bot and search engine.
No link to it ...
BTW, i don't have the issue now (but no visitors, also that's only personnal)
(subsonic, plex, wiki, wordpress and more are running on differents ports...)

maybe asking here to have an account can be a first solution ...
many people want to read, but just a few want to write documentation ...

It's up to you !

cheers !
User avatar
Pucho
Cacti User
Posts: 185
Joined: Wed Jul 20, 2016 8:00 pm

Re: [request] limited number of characters in TARGET

Post by Pucho »

duduclx wrote:I ever had this problem with wordpress.
You can find plugins about that.

In Mediawiki, i've just watched how i do ...
XD i've lock registration.
Then, i create account only for well-kowned-people.

About mediawiki, there is plenty of solution ...

captcha and email verification are still first anti-spam provided solution.

All website i got are personnal, and not indexed by bot and search engine.
No link to it ...
BTW, i don't have the issue now (but no visitors, also that's only personnal)
(subsonic, plex, wiki, wordpress and more are running on differents ports...)

maybe asking here to have an account can be a first solution ...
many people want to read, but just a few want to write documentation ...

It's up to you !

cheers !
You are right, but I think Howie shouldn't put much effor on it, wp documentation is not a 10 but it's far enough from my point of view. Projects like this has to rely on community to support it and it's not that bad.

Question for Howie, have you ever got any piece of paper from wp users? If it happens to be that a user wants to contribute a paper how would that be?
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: [request] limited number of characters in TARGET

Post by Howie »

paper = manual? No I haven't.

The source for the manual is all in github, and patches can be created the same as for the code... I should probably write something to explain how to compile the manual - the reference section is written in lots of small pieces of XML. It isn't complex, but needs a unix system.

For website articles - I would definitely be interested in guest articles. I'm sure we can set up Wordpress so you can create a draft ready for approval/editing before publishing.
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 0 guests