Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.63k stars 403 forks source link

Unable to create a gaph Cacti 1.1.36 #1485

Closed tangosan closed 6 years ago

tangosan commented 6 years ago

Hello,

I'm trying to install Cacti 1.1.36 on windows server 2016, with server IIS 10.0, PHP7 and MySql 8.0.

Everything seems to be fine but i can't create graphe and I find this log on my cacti log :

CMDPHP PHP ERROR NOTICE Backtrace: (C:\inetpub\wwwroot\cacti\graphs_new.php: 37 form_save)(C:\inetpub\wwwroot\cacti\graphs_new.php: 123 host_new_graphs)(C:\inetpub\wwwroot\cacti\graphs_new.php: 362 CactiErrorHandler)(C:\inetpub\wwwroot\cacti\lib\functions.php: 4591 cacti_debug_backtrace)

2018/03/20 18:20:42 - ERROR PHP NOTICE: Undefined index: graph_template_name in file: C:\inetpub\wwwroot\cacti\graphs_new.php on line: 362

I search how to fix it on the Internet but don't find anything about graphs_new.php error. I replace cacti install with another, the problem is not fix, same error.

Regards,

netniV commented 6 years ago

That would suggest that for the given template ID it failed to find the template. I presume this is only happening on one type of graph template, or is it all of them?

tangosan commented 6 years ago

Thanks for answer, is it for all of them

cigamit commented 6 years ago

Very odd. I can not imaging that variable not being set unless maybe you have a damaged table. You should run the cli script to repair your tables, and also the convert_innodb.php cli script to move to a more stable db format. Don't do this unless you followed the recommendations that you were afforded during install time. I've also made a few tweaks to the graphs_new.php interface, but none of that should effect your outcome.

tangosan commented 6 years ago

Hello,

I check my database using php C:\inetpub\wwwroot\cacti\cli\repair_database.php

OTE: Checking for Invalid Cacti Templates NOTE: 3 Invalid CDEF Item Rows found in Graph Templates NOTE: 41 Invalid Data Input Data Rows based upon template mappings found in Data Templates

WARNING: Cacti Template Problems found in your Database. Using the '--force' option will remove the invalid records. However, these changes can be catastrophic to existing data sources. Therefore, you should contact your support organization prior to proceeding with that repair.

I repair it using --force option

result : OTE: Checking for Invalid Cacti Templates NOTE: 3 Invalid CDEF Item Rows removed from Graph Templates NOTE: 41 Invalid Data Input Data Rows based upon template mappings removed from Data Templates

i fix it by using form option :

result 👍 OTE: Checking for Invalid Cacti Templates NOTE: No Invalid Cacti Template Records found in your Database

But i still have my error when i want to create graph.

Here my database tables

+-------------------------------------+ | Tables_in_cacti | +-------------------------------------+ | aggregate_graph_templates | | aggregate_graph_templates_graph | | aggregate_graph_templates_item | | aggregate_graphs | | aggregate_graphs_graph_item | | aggregate_graphs_items | | automation_devices | | automation_graph_rule_items | | automation_graph_rules | | automation_ips | | automation_match_rule_items | | automation_networks | | automation_processes | | automation_snmp | | automation_snmp_items | | automation_templates | | automation_tree_rule_items | | automation_tree_rules | | cdef | | cdef_items | | color_template_items | | color_templates | | colors | | data_input | | data_input_data | | data_input_fields | | data_local | | data_source_profiles | | data_source_profiles_cf | | data_source_profiles_rra | | data_source_purge_action | | data_source_purge_temp | | data_source_stats_daily | | data_source_stats_hourly | | data_source_stats_hourly_cache | | data_source_stats_hourly_last | | data_source_stats_monthly | | data_source_stats_weekly | | data_source_stats_yearly | | data_template | | data_template_data | | data_template_rrd | | external_links | | graph_local | | graph_template_input | | graph_template_input_defs | | graph_templates | | graph_templates_gprint | | graph_templates_graph | | graph_templates_item | | graph_tree | | graph_tree_items | | host | | host_graph | | host_snmp_cache | | host_snmp_query | | host_template | | host_template_graph | | host_template_snmp_query | | plugin_config | | plugin_db_changes | | plugin_hooks | | plugin_realms | | poller | | poller_command | | poller_data_template_field_mappings | | poller_item | | poller_output | | poller_output_boost | | poller_output_boost_processes | | poller_output_realtime | | poller_reindex | | poller_resource_cache | | poller_time | | reports | | reports_items | | sessions | | settings | | settings_tree | | settings_user | | settings_user_group | | sites | | snmp_query | | snmp_query_graph | | snmp_query_graph_rrd | | snmp_query_graph_rrd_sv | | snmp_query_graph_sv | | snmpagent_cache | | snmpagent_cache_notifications | | snmpagent_cache_textual_conventions | | snmpagent_managers | | snmpagent_managers_notifications | | snmpagent_mibs | | snmpagent_notifications_log | | user_auth | | user_auth_cache | | user_auth_group | | user_auth_group_members | | user_auth_group_perms | | user_auth_group_realm | | user_auth_perms | | user_auth_realm | | user_domains | | user_domains_ldap | | user_log | | vdef | | vdef_items | | version | +-------------------------------------+ 108 rows in set (0.01 sec)

I read again your first post to understand this error, and i don't find any graph template in my cacti web interface : console / graph template : No Graph Templates Found

When i try to import a new template, i have this error in my cacti log :
( https://docs.cacti.net/template:package:localhost )

IMPORT parse_xml_hash ERROR wrong hash format for hash: info

Regards,

tangosan commented 6 years ago

Plop,

When i import a template from my ubuntu cacti 0.8.8b to my windows cacti 1.1.36 the import works, i have no graph, RDD tool say Unknown RDD error, and no RRA appears in cacti/rra folder. But the plugin REALTIME works, i have a graph on that :-) I don't understand, the template on cacti website for package 1.X are not compatible with windows cacti 1.1.36 ?

Thanks for your advice

Regards

netniV commented 6 years ago

There was a problem a while ago with standard template imports. If it is the basic templates that come with cacti, these are imported using the CLI import_package.php command. Not just the standard import/export features.

cigamit commented 6 years ago

Please upload your problem template.

tangosan commented 6 years ago

Hello,

I try to import template with import_package.php command and it works perfectly :-)

Problem solved, thank you for your time !

Regards,

netniV commented 6 years ago

Cool. Go ahead and hit the close button unless @cigamit beats you to