Trouble adding new devices

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

Moderators: Developers, Moderators

tchiverton
Posts: 17
Joined: Wed Aug 04, 2004 11:43 am

Trouble adding new devices

Post by tchiverton »

When ever I add a new device to our Cacti install, it fails to be spotted as 'Up' and graphs all fail. I have tracked this down to no data source being created (even when going through the sort-of wizard.
So, i've tried to add a datasource manualy, and the 'data source debug' area is empty !

Any ideas where to start looking for errors ? There is nothing unusaly in the DEBUG level log output.

We are running the latest version, the only oddness I can see is that there are only two things in the Data Templates page, is that normal ?
tchiverton
Posts: 17
Joined: Wed Aug 04, 2004 11:43 am

Data Template oddness

Post by tchiverton »

Odly, when I go to create a datasource, all the remplates are listed in the drop down.

Create a data source without a template seems to work ok apart from
Warning: Undefined index: in /var/www/html/cacti-0.8.6e/lib/rrd.php on line 207
/usr/local/rrdtool/bin/rrdtool create \
/var/www/html/cacti-0.8.6e/rra/sadc_server_ds_252.rrd \
--step 300 \
DS:status:GAUGE:600:0:100 \
RRA::0.5:6:700 \
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:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \

Running that command as cactiuser says:
ERROR: can't parse argument 'RRA::0.5:6:700'


Where/what are the two queries ? Is a join or something breaking somewhere ?

I notice a template import menu item, could I use this to re-import the missing templates ( I am missing some, yes ?)
tchiverton
Posts: 17
Joined: Wed Aug 04, 2004 11:43 am

Data templates in error ?

Post by tchiverton »

The problem appears to be the
select
data_template.id,
data_template.name,
data_input.name as data_input_method,
data_template_data.active as active
from data_template,data_template_data
left join data_input on data_template_data.data_input_id = data_input.id
where data_template.id = data_template_data.data_template_id
and data_template_data.local_data_id = 0
order by data_template.name
query in data_template.php. If I remove the data_template_data.local_data_id=0 clause, I get a bit long list back as expected, other wise I get a much shorter list (just ones I've created today for debugging, basicaly).

Now, as far as I can tell, this =0 is used to indicate something like the next free 'slot' for that template, as ones that do show up have several entries, for various other integer values of local_data_id, as well as a '0' one.

So, this should be easy to fix, right ? Am I on the right lines (developers !) ?
tchiverton
Posts: 17
Joined: Wed Aug 04, 2004 11:43 am

Hello, developers ?

Post by tchiverton »

Anyone here who knows how the databse schema is meant to look ?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Don't alter the select statements in the PHP code. Please run a database repair. Looks like your database is damaged. Hopefully it's just damaged indexes.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
tchiverton
Posts: 17
Joined: Wed Aug 04, 2004 11:43 am

Post by tchiverton »

Thanks for the reply !
TheWitness wrote:Don't alter the select statements in the PHP code.
I had come to the conclusion MySQL/Cacti/PHP must have had an accident at some point, which may have lead to entries in the table being wrong.
Or something :-)
TheWitness wrote: Please run a database repair.
Looks like your database is damaged. Hopefully it's just damaged indexes.

TheWitness
Where is this repair option ? Is it a Cacti or MySQL thing ?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

It's a MySQL thing. Check the documentation on how to repair a damaged MyISAM database.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
tchiverton
Posts: 17
Joined: Wed Aug 04, 2004 11:43 am

Post by tchiverton »

TheWitness wrote:It's a MySQL thing. Check the documentation on how to repair a damaged MyISAM database.

TheWitness
OK, I have done this (it was only connection count errors).

Stil the problem occurs (no data sources for new hosts, few things in data templates page), and in the data_template_data table :

Code: Select all

+-----+-----------------------------+---------------+------------------+
| id  | local_data_template_data_id | local_data_id | data_template_id |
+-----+-----------------------------+---------------+------------------+
| 336 |                         334 |           259 |               67 |
| 334 |                           0 |             0 |               67 |
| 337 |                         333 |           260 |               66 |
| 333 |                           0 |             0 |               66 |
| 335 |                         159 |           258 |               65 |
| 332 |                         159 |           257 |               65 |
| 159 |                           0 |             0 |               65 |
| 194 |                           0 |             0 |               64 |
| 319 |                           0 |             0 |               63 |
| 322 |                         319 |           247 |               63 |
| 321 |                         319 |           246 |               63 |
| 308 |                           0 |             0 |               61 |
| 301 |                           0 |             0 |               58 |
+-----+-----------------------------+---------------+------------------+
.
.
.
+-----+-----------------------------+---------------+------------------+
| id  | local_data_template_data_id | local_data_id | data_template_id |
+-----+-----------------------------+---------------+------------------+
| 181 |                          33 |           117 |               33 |
| 144 |                          33 |            80 |               33 |
|  94 |                          33 |            31 |               33 |
|  76 |                          33 |            14 |               33 |
| 161 |                          32 |            97 |               32 |
| 142 |                          32 |            78 |               32 |
|  92 |                          32 |            29 |               32 |
|  74 |                          32 |            12 |               32 |
| 160 |                          31 |            96 |               31 |
| 143 |                          31 |            79 |               31 |
|  93 |                          31 |            30 |               31 |
|  75 |                          31 |            13 |               31 |
+-----+-----------------------------+---------------+------------------+
This is ordered by data_template_id, and as you can see some have no 0 in local_data_id (still).
Is that normal ? The query makes me thing it isn't...
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Tony,

Can you take this one...

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Please dump and email me your database.

What version of cacti?

:D

Yo, Larry, stop trolling the boards on your vacation.. :P
[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]
tchiverton
Posts: 17
Joined: Wed Aug 04, 2004 11:43 am

Post by tchiverton »

Sure, I'd be happy to email it to you, if you let me have your email address :-)
Mine is tom.chiverton@bluefinger.com

It is the most very recent version of cacti. It started of as a .86, and has been upgraded several times since as new Cacti versions come out.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

My email address is in the linky buttons under every post I make. :D
[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]
tchiverton
Posts: 17
Joined: Wed Aug 04, 2004 11:43 am

Post by tchiverton »

rony wrote:My email address is in the linky buttons under every post I make. :D
I feel a bit silly now :oops:

Email on way.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Wow, well, finally had a free moment to look at you database....

You are missing most of you data templates that are associated with Data queries and graphs on your system.

I would suggest installing 0.8.6e on another system and exporting the working templates and then import those working templates into your corrupted installation.
[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]
tchiverton
Posts: 17
Joined: Wed Aug 04, 2004 11:43 am

Post by tchiverton »

rony wrote: I would suggest installing 0.8.6e on another system and exporting the working templates and then import those working templates into your corrupted installation.
When I try that (file attached), the page refreshes itself and says "Error: XML: Hash version does not exist."
Attachments
cacti_data_template_host_mib_cpu_utilization.xml
(4.34 KiB) Downloaded 209 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests