Cacti2RRD Only Updating One DS

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
jmadrid2
Posts: 43
Joined: Thu May 04, 2006 9:32 am
Location: Bayonne, NJ

Cacti2RRD Only Updating One DS

Post by jmadrid2 »

I have a data template with two DS's called receth0 and transeth0. The RRD gets created correctly and has two DS's initialized within it. I run my script and it gets the correct output, its just that when Cacti2RRD goes to update my RRD it only ever updates one field and not both. It will always update receth0 but never transeth0. Here are copies of my logs. Any ideas?

---------------------------------------------------------------------------------------------------------
05/12/2006 01:40:41 PM - CACTID: Poller[0] Host[238] DS[1756] SCRIPT: /opt/cacti/scripts/ns_eth0.pl cacti, output: transeth0:1242833406 receth0:4277888337 <------------------GETS BOTH DS's from script

05/12/2006 01:40:42 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/cacti_receth0_1756.rrd --template receth0 1147441202:4277888337 <----UPDATES only receth0 and not both
---------------------------------------------------------------------------------------------------------
05/12/2006 01:40:41 PM - CACTID: Poller[0] Host[238] DS[1756] SCRIPT: /opt/cacti/scripts/ns_eth0.pl cacti, output: transeth0:1242833406 receth0:4277888337

05/12/2006 01:40:42 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/cacti_receth0_1756.rrd --template receth0 1147441202:4277888337
---------------------------------------------------------------------------------------------------------
05/12/2006 01:45:37 PM - CACTID: Poller[0] Host[238] DS[1756] SCRIPT: /opt/cacti/scripts/ns_eth0.pl cacti, output: transeth0:1245841232 receth0:4279033239

05/12/2006 01:45:37 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/cacti_receth0_1756.rrd --template receth0 1147441501:4279033239
---------------------------------------------------------------------------------------------------------
05/12/2006 01:50:43 PM - CACTID: Poller[0] Host[238] DS[1756] SCRIPT: /opt/cacti/scripts/ns_eth0.pl cacti, output: transeth0:1249323911 receth0:4280243836

05/12/2006 01:50:43 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/cacti_receth0_1756.rrd --template receth0 1147441801:4280243836
---------------------------------------------------------------------------------------------------------
05/12/2006 01:55:40 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/cacti_receth0_1756.rrd --template receth0 1147442102:4281424014

05/12/2006 01:55:39 PM - CACTID: Poller[0] Host[238] DS[1756] SCRIPT: /opt/cacti/scripts/ns_eth0.pl cacti, output: transeth0:1251802678 receth0:4281424014
---------------------------------------------------------------------------------------------------------
05/12/2006 02:00:38 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/cacti_receth0_1756.rrd --template receth0 1147442401:4282459735

05/12/2006 02:00:38 PM - CACTID: Poller[0] Host[238] DS[1756] SCRIPT: /opt/cacti/scripts/ns_eth0.pl cacti, output: transeth0:1254107431 receth0:4282459735
---------------------------------------------------------------------------------------------------------
05/12/2006 02:05:36 PM - CACTID: Poller[0] Host[238] DS[1756] SCRIPT: /opt/cacti/scripts/ns_eth0.pl cacti, output: transeth0:1256551470 receth0:4283645670

05/12/2006 02:00:38 PM - CACTID: Poller[0] Host[238] DS[1756] SCRIPT: /opt/cacti/scripts/ns_eth0.pl cacti, output: transeth0:1254107431 receth0:4282459735
---------------------------------------------------------------------------------------------------------
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

lately, there was some other user with a similar problem. I redirected him to post a bug at http://bugs.cacti.net as I'm not aware of a solution at the time of writing
Reinhard
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

I typically see this when someone doesn't double check spellings in Data Sources.. :)
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
jmadrid2
Posts: 43
Joined: Thu May 04, 2006 9:32 am
Location: Bayonne, NJ

Post by jmadrid2 »

Here is where I am on this issue now. Its clear that the script runs correctly and the output is given in the right format. What I am trying to find now is where in the DB the parameters given to the rrdtool update command are stored. Somewhere in the DB its telling the "rrdtool update" command to only take in 1 DS instead of both. Any ideas? If anyone has a Visio diagram of the DB architecture it would be greatly appreciated or any suggestions would be helpful. Thanks.

/usr/bin/rrdtool update /usr/share/cacti/site/rra/cacti_receth0_1756.rrd --template receth0 1147441501:4279033239
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Are you using a data query for this?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
jmadrid2
Posts: 43
Joined: Thu May 04, 2006 9:32 am
Location: Bayonne, NJ

Post by jmadrid2 »

No I dont use data queries. I am using an external script that gathers the interface info from netsaint statd.
jmadrid2
Posts: 43
Joined: Thu May 04, 2006 9:32 am
Location: Bayonne, NJ

Post by jmadrid2 »

Does anyone know where the rrdtool update command pulls its parameters from?? If I can find this in the Cacti DB and try to change it manually I think I can fix this problem. I just need to know where cacti reads the parameters its passing in the following line:
/usr/bin/rrdtool update /usr/share/cacti/site/rra/cacti_receth0_1756.rrd --template receth0 1147441501:4279033239

Anybody? Any ideas?
guido90210
Posts: 14
Joined: Sun May 07, 2006 10:45 pm
Location: About 70cms from my screen

Post by guido90210 »

Hi there,

Sorry, can't exactly help you with what you're asking for, but this sounds very similar to what I'm experiencing at the moment as well (http://forums.cacti.net/about13395.html).

My shell script outputs 4 variables, but the last one doesn't seem to be picked up when the poller runs. After I read your post, I had another look at my cacti log, and noticed that the RRA file is created correctly with the 4 fields, but when the poller runs the script, it only ever gets values for the first 3 fields:

05/18/2006 04:25:05 PM - CMDPHP: Poller[0] Host[2] DS[22] CMD: sh /usr/local/inst/cacti-0.8.6h/scripts/memory_paging.sh, output: paged_in:134.82 paged_out:0.00 page_faults:0.00

Given your problem and mine, it is starting to sound like an upper loop boundary mishandling problem in the code somewhere, perhaps.

I wish I had time to trace the processing through, but I don't 8-(

Anyway, later...
G.
jmadrid2
Posts: 43
Joined: Thu May 04, 2006 9:32 am
Location: Bayonne, NJ

Post by jmadrid2 »

Sounds plausible but our issues are in 2 different areas. My script executes normally and the output is grabbed correctly. Its when cactid goes to update the RRD that the problem comes in. Although both values where grabbed by the script execution, only one DS is updated.
guido90210
Posts: 14
Joined: Sun May 07, 2006 10:45 pm
Location: About 70cms from my screen

Post by guido90210 »

Right... sorry, probably unrelated.

Ciao,
G.
m1z4rk
Posts: 13
Joined: Mon Aug 29, 2005 7:09 pm
Location: Cayman Islands

Same problem - fixed

Post by m1z4rk »

Guys -

I had the same problem. A script returned 6 values, which all went on the same graph. The first two values returned "NAN".

Rony hit this one on the head (at least in my case) with his post above. I had the names spelled slightly wrong in the two data sources in question.

Make sure the 'output field names' in your data input method exactly match the data source names in your data template.

Hope this helps.

Cheers,
Mark
***
Please note: your dreams may vary from those of the Globex corporation, its subsidiaries and stockholders
***
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests