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
Missing table dependency ?!?
Moderators: Developers, Moderators
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:
-Ian
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)
Who is online
Users browsing this forum: No registered users and 3 guests