maxs outputs for input method?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Holland
Posts: 12
Joined: Fri Nov 20, 2009 11:24 pm

maxs outputs for input method?

Post by Holland »

I'm having issues with my cacti graphs. They used to work fine. I've since added outputs to my data input method, added a few new data sources, and a few new graphs. This worked fine as well. Then I added even more of the above (all using the same data input method) and now nothing works at all. We have graphs, but rrd files aren't creating or anything. There are no errors or warnings in the logs.

Did I reach some maximum something? The only thing I can assume I would have maxed out are the outputs for the data input method. There are hundreds of them at this point. However, the perl script I have the cmd.php calling will only return some sub-set of the possible outputs.

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

Post by BSOD2600 »

A single script is returning hundreds of values?? IMO, you seriously need to rethink how the script is working and break down/aggregate the data.

With the cacti.log in debugging logging, do you see the script run? return all the fields? multi-field parsing? rrdtool update commands?
Holland
Posts: 12
Joined: Fri Nov 20, 2009 11:24 pm

Post by Holland »

Not quite like that. A single script has potential to return hundreds of values, but each graph depends on different arguments for the script. So running the script any 1 time will only return about 20 values.

example:

Code: Select all

[user@server scripts]# perl myscript.pl vegetableCount

carrot:1 potato:5 sprout:3

[user@server scripts]# perl myscript.pl fruitCount

apple:3 banana:2 richardsimmons:1
so these are all using 1 single data input method. with 6 different outputs, but calling the script with the different arguments only provides 3 at a time.


So, should I split my data input method into multiple input methods? or is this an okay way to design my cacti stuff?[/code]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Ah. Well, a graph template (front end) is tied to the data template (back end) which has the fields (aka data sources) defined. The data template layout is what is used when the rrdtool rrd file(s) are created. As you can see, this process isn't flexible in terms of dynamic number of data entry points.

That all being said, sounds like you're going to need to rethink how the script/query works.
Holland
Posts: 12
Joined: Fri Nov 20, 2009 11:24 pm

Post by Holland »

So what I'm trying now is creating a separate Data Input Method for each version of the script.

For example, if I was going to run the same script that I used before with the vegetableCount option then I would have a single Data Input Method for calling the script in that way. Then a second Data Input Method for calling the script with the fruitCount option. This way the Data Input Method is only being referenced by a single Data Template.

Hopefully this will solve the issue. If it doesn't them I'm afraid I don't know what's wrong with these graphs. They used to work, I added some more outputs to my input method, a couple more graphs, then they just stopped working.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Holland wrote: They used to work, I added some more outputs to my input method, a couple more graphs, then they just stopped working.
Find out why: http://docs.cacti.net/manual:087:4_help ... #debugging

The cacti.log in debug mode is the key.
Holland
Posts: 12
Joined: Fri Nov 20, 2009 11:24 pm

Post by Holland »

Update: So I got as far as running the rrdtool info <rrd file> and noticed it's full of this

Code: Select all

rra[7].rows = 700
rra[7].cur_row = 491
rra[7].pdp_per_row = 10
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = NaN
rra[7].cdp_prep[0].unknown_datapoints = 0
rra[7].cdp_prep[1].value = NaN
rra[7].cdp_prep[1].unknown_datapoints = 0
rra[7].cdp_prep[2].value = NaN
rra[7].cdp_prep[2].unknown_datapoints = 0
rra[7].cdp_prep[3].value = NaN
rra[7].cdp_prep[3].unknown_datapoints = 0
rra[7].cdp_prep[4].value = NaN
rra[7].cdp_prep[4].unknown_datapoints = 0
rra[7].cdp_prep[5].value = NaN
rra[7].cdp_prep[5].unknown_datapoints = 0
rra[7].cdp_prep[6].value = NaN
rra[7].cdp_prep[6].unknown_datapoints = 0
rra[7].cdp_prep[7].value = NaN
rra[7].cdp_prep[7].unknown_datapoints = 0
rra[7].cdp_prep[8].value = NaN
rra[7].cdp_prep[8].unknown_datapoints = 0
rra[7].cdp_prep[9].value = NaN
rra[7].cdp_prep[9].unknown_datapoints = 0
rra[7].cdp_prep[10].value = NaN
rra[7].cdp_prep[10].unknown_datapoints = 0
rra[7].cdp_prep[11].value = NaN
rra[7].cdp_prep[11].unknown_datapoints = 0
rra[7].cdp_prep[12].value = NaN
rra[7].cdp_prep[12].unknown_datapoints = 0
rra[7].cdp_prep[13].value = NaN
rra[7].cdp_prep[13].unknown_datapoints = 0
rra[7].cdp_prep[14].value = NaN
rra[7].cdp_prep[14].unknown_datapoints = 0
rra[7].cdp_prep[15].value = NaN
rra[7].cdp_prep[15].unknown_datapoints = 0
rra[8].cf = "MAX"
rra[8].rows = 775
rra[8].cur_row = 117
rra[8].pdp_per_row = 20
rra[8].xff = 5.0000000000e-01
So now I'm left assuming my perl script is taking too long to return. This script taps a server multiple times before it spits out the output values.

Could the scripts taking too long cause this? If so, is there a way to increase the timeout or whatever on that? Because there is no way to speed up the script. It sends HTTP requests to servers, waits for a response, and loops through 3 more times...so I can't speed that up at all.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Holland wrote: It sends HTTP requests to servers, waits for a response, and loops through 3 more times...so I can't speed that up at all.
This could be done asynchronously by something else. Then your script would then only have to read in the file the data was previously written to.
Holland
Posts: 12
Joined: Fri Nov 20, 2009 11:24 pm

Post by Holland »

BSOD2600 wrote:
Holland wrote: It sends HTTP requests to servers, waits for a response, and loops through 3 more times...so I can't speed that up at all.
This could be done asynchronously by something else. Then your script would then only have to read in the file the data was previously written to.
If the script taking a while is the cause of the issue, then I can change it to work like that no problem. I just didn't know there was going to be some timeout or something. I didn't know the script had to return immediately, I just assumed it had to eventually return something.

I don't mind changing it to work asynchronously, but do you suspect that to be the actual cause of the graphs not working?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Holland wrote:I don't mind changing it to work asynchronously, but do you suspect that to be the actual cause of the graphs not working?
Not yet.

When you followed the debugging guide, was your script running and returning data at all? Sometimes returning data? You need to trace the flow of data and where it's breaking down in the process.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests