Missing table dependency ?!?

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

Moderators: Developers, Moderators

Post Reply
Guest

Missing table dependency ?!?

Post by Guest »

Hi guys!

I´ve got a wired problem after migration a script to 'Script - Script Server (PHP)'. I have taken the MySQL Monitoring found here in the board and made it working with the 'Script Server'. The script seems to work according to the manual and I get the results I want (testing from console). But I am unable to graph the data because of a missing dependency from the table 'data_template_rrd.data_input_field_id' to table 'data_input_fields'. The field 'data_template_rrd.data_input_field_id' is '0' for that data template. The coresponding records in 'data_input_fields' exist but are not updated :-/

Here is what I have done

Created Data Input Method:

Data Input Methods [edit: MySQL - Command statistics]

Name: MySQL - Command statistics
Input Type: Script - Script Server (PHP)
Input String: <path_cacti>/scripts/ss_mysql.php ss_mysql <hostname> <user> <password> <status>


Input Fields Add

Name Field Order Friendly Name
hostname 1 MySQL Hostname
user 2 MySQL User
password 3 MySQL Password
status 4 MySQL Status

Output Fields Add

Name Field Order Friendly Name Update RRA
select 0 (Not In Use) select Selected
update 0 (Not In Use) update Selected
insert 0 (Not In Use) insert Selected
delete 0 (Not In Use) delete Selected
change_db 0 (Not In Use) change_db Selected


Created Data Template:

Name: MySQL - Command statistics
Data Input Method: MySQL - Command statistics

1: change_db 2: delete 3: insert 4: select 5: update

Custom Data [data input: MySQL - Command statistics]

MySQL Hostname
MySQL Password
MySQL Status
MySQL User

Created Graph Template:

Now I look in the database an see that there is no relation from 'data_template_rrd.data_input_field_id' to the corresponding 'data_input_fields' records.

Any suggestions what went wrong? If I overwrite 'data_template_rrd.data_input_field_id' with the correespondig record in 'data_input_fields' and open and save the data template in the gui the records from 'data_template_rrd.data_input_field_id' are '0' again :/

Thanks for your help!

Regards

Ingo
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Under your "create data template" step, are you making sure to select the appropriate field for "Output Field" for each data source item?

For instance, for this data template you have five items (change_db, delete, insert, select, and update). Each one has an "Output Field" that you much associate with the corresponding data input field.

Just to test, I did this through the UI with the "Unix - Get Load Average" data input method and got the following results:

Code: Select all

mysql> select id,data_input_field_id from data_template_rrd where data_template_id = 64;
+-----+---------------------+
| id  | data_input_field_id |
+-----+---------------------+
| 196 |                  19 |
| 195 |                  18 |
| 194 |                  17 |
+-----+---------------------+
3 rows in set (0.01 sec)
-Ian
Cthulhu
Posts: 1
Joined: Tue Nov 16, 2004 7:22 am

Post by Cthulhu »

Thank you for your reply raX!

Ok seems I made an other mistake somewhere else, because there is no "Output Field" option in my Data Template ;-/

Hope I find out whats missing...

Regards,

Ingo
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests