Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Jul 20, 2019 2:31 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 142 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10
Author Message
 Post subject: Re: MIB Protocol Statistics (RFC1213) [v2.1 - 2009-05-10]
PostPosted: Sat May 24, 2014 12:48 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12160
Location: USA
Not sure, never used it with net-snmp.

click the verbose query output next to the data query to see if any valid data is returned.

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject: Re: MIB Protocol Statistics (RFC1213) [v2.1 - 2009-05-10]
PostPosted: Tue Apr 12, 2016 8:56 pm 
Offline

Joined: Tue Apr 12, 2016 8:45 pm
Posts: 13
This template doesn't properly work any more with recent cacti.

I've created MIB Protocol Statistics graphs with cacti-0.8.8e or 0.8.8f, now that I upgraded my cacti to 0.8.8g they still work okay.
But lately when I tried to add some servers and create graphs for them I was stuck with such message at graph creation:
Code:
Data Query [RFC1213 Statistics]    
This data query returned 0 rows, perhaps there was a problem executing this data query. You can run this data query in debug mode to get more information.

When I added the data query on the host I couldn't see any problem
Code:
Associated Data Queries
Data Query Name    Debugging    Re-Index Method    Status
1) RFC1213 Statistics    (Verbose Query)    Uptime Goes Backwards    Success [1 Item, 1 Row]

Running the Debug Mode
Code:
Data Query Debug Information
+ Running data query [14].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/RFC1213.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.7.2' Index Count: 1
+ Index found at OID: 'udpNoPorts.0' value: '151'
+ index_parse at OID: 'udpNoPorts.0' results: '0'
+ Inserting index data for field 'Index' [value='0']


I would have fixed it myself if I could understand where the trouble comes from...
This is very uncool since this template is a really great and useful one

For the record, my cacti running machine is a Fedora core 23 x86_64

<edit>

I just found something, when I try to generate the graph I get the following in the logs

Code:
04/13/2016 03:32:43 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT * FROM (SELECT host_id, snmp_query_id, snmp_index, MAX(CASE WHEN field_name='Index' THEN field_value ELSE NULL END) AS 'Index' FROM host_snmp_cache WHERE host_id=10 AND snmp_query_id=14 GROUP BY host_id, snmp_query_id, snmp_index ) AS results ORDER BY Index LIMIT 0,1000"
04/13/2016 03:32:40 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT * FROM (SELECT host_id, snmp_query_id, snmp_index, MAX(CASE WHEN field_name='Index' THEN field_value ELSE NULL END) AS 'Index' FROM host_snmp_cache WHERE host_id=10 AND snmp_query_id=14 GROUP BY host_id, snmp_query_id, snmp_index ) AS results ORDER BY Index LIMIT 0,1000"


And this doesn't sound nice does it ?

Code:
$ sudo php repair_database.php
Repairing All Cacti Database Tables
Repairing Table -> 'cdef' Successful
Repairing Table -> 'cdef_items' Successful
Repairing Table -> 'colors' Successful
Repairing Table -> 'data_input' Successful
Repairing Table -> 'data_input_data' Successful
Repairing Table -> 'data_input_fields' Successful
Repairing Table -> 'data_local' Successful
Repairing Table -> 'data_template' Successful
Repairing Table -> 'data_template_data' Successful
Repairing Table -> 'data_template_data_rra' Successful
Repairing Table -> 'data_template_rrd' Successful
Repairing Table -> 'graph_local' Successful
Repairing Table -> 'graph_template_input' Successful
Repairing Table -> 'graph_template_input_defs' Successful
Repairing Table -> 'graph_templates' Successful
Repairing Table -> 'graph_templates_gprint' Successful
Repairing Table -> 'graph_templates_graph' Successful
Repairing Table -> 'graph_templates_item' Successful
Repairing Table -> 'graph_tree' Successful
Repairing Table -> 'graph_tree_items' Successful
Repairing Table -> 'host' Successful
Repairing Table -> 'host_graph' Successful
Repairing Table -> 'host_snmp_cache' Successful
Repairing Table -> 'host_snmp_query' Successful
Repairing Table -> 'host_template' Successful
Repairing Table -> 'host_template_graph' Successful
Repairing Table -> 'host_template_snmp_query' Successful
Repairing Table -> 'plugin_config' Successful
Repairing Table -> 'plugin_db_changes' Successful
Repairing Table -> 'plugin_hooks' Successful
Repairing Table -> 'plugin_realms' Successful
Repairing Table -> 'poller' Successful
Repairing Table -> 'poller_command' Successful
Repairing Table -> 'poller_item' Successful
Repairing Table -> 'poller_output' Successful
Repairing Table -> 'poller_reindex' Successful
Repairing Table -> 'poller_time' Successful
Repairing Table -> 'rra' Successful
Repairing Table -> 'rra_cf' Successful
Repairing Table -> 'settings' Successful
Repairing Table -> 'settings_graphs' Successful
Repairing Table -> 'settings_tree' Successful
Repairing Table -> 'snmp_query' Successful
Repairing Table -> 'snmp_query_graph' Successful
Repairing Table -> 'snmp_query_graph_rrd' Successful
Repairing Table -> 'snmp_query_graph_rrd_sv' Successful
Repairing Table -> 'snmp_query_graph_sv' Successful
Repairing Table -> 'user_auth' Successful
Repairing Table -> 'user_auth_perms' Successful
Repairing Table -> 'user_auth_realm' Successful
Repairing Table -> 'user_log' Successful
Repairing Table -> 'version' Successful

NOTE: Checking for Invalid Cacti Templates
NOTE: 1201 Invalid Data Input Data Rows 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.


repairing the DB did not fix

Code:
$ sudo mysqlcheck -u cacti -p --auto-repair --optimize --all-databases
Enter password:
cacti.cdef                                         Table is already up to date
cacti.cdef_items                                   Table is already up to date
cacti.colors                                       Table is already up to date
cacti.data_input                                   Table is already up to date
cacti.data_input_data                              Table is already up to date
cacti.data_input_fields                            Table is already up to date
cacti.data_local                                   Table is already up to date
cacti.data_template                                Table is already up to date
cacti.data_template_data                           Table is already up to date
cacti.data_template_data_rra                       Table is already up to date
cacti.data_template_rrd                            Table is already up to date
cacti.graph_local                                  Table is already up to date
cacti.graph_template_input                         Table is already up to date
cacti.graph_template_input_defs                    Table is already up to date
cacti.graph_templates                              Table is already up to date
cacti.graph_templates_gprint                       Table is already up to date
cacti.graph_templates_graph                        Table is already up to date
cacti.graph_templates_item                         Table is already up to date
cacti.graph_tree                                   Table is already up to date
cacti.graph_tree_items                             Table is already up to date
cacti.host                                         OK
cacti.host_graph                                   Table is already up to date
cacti.host_snmp_cache                              OK
cacti.host_snmp_query                              Table is already up to date
cacti.host_template                                Table is already up to date
cacti.host_template_graph                          Table is already up to date
cacti.host_template_snmp_query                     Table is already up to date
cacti.plugin_config                                Table is already up to date
cacti.plugin_db_changes                            Table is already up to date
cacti.plugin_hooks                                 Table is already up to date
cacti.plugin_realms                                Table is already up to date
cacti.poller                                       Table is already up to date
cacti.poller_command                               Table is already up to date
cacti.poller_item                                  Table is already up to date
cacti.poller_output                                OK
cacti.poller_reindex                               OK
cacti.poller_time                                  OK
cacti.rra                                          Table is already up to date
cacti.rra_cf                                       Table is already up to date
cacti.settings                                     OK
cacti.settings_graphs                              Table is already up to date
cacti.settings_tree                                Table is already up to date
cacti.snmp_query                                   Table is already up to date
cacti.snmp_query_graph                             Table is already up to date
cacti.snmp_query_graph_rrd                         Table is already up to date
cacti.snmp_query_graph_rrd_sv                      Table is already up to date
cacti.snmp_query_graph_sv                          Table is already up to date
cacti.user_auth                                    Table is already up to date
cacti.user_auth_perms                              Table is already up to date
cacti.user_auth_realm                              Table is already up to date
cacti.user_log                                     Table is already up to date
cacti.version                                      Table is already up to date


Even after repair problem remains
Code:
$ sudo php repair_templates.php NOTE: Performing Check of Templates
NOTE: Performing Check of Data Templates
NOTE: No Damaged Data Templates Found
NOTE: Performing Check of Graph Templates
NOTE: No Damaged Graph Templates Found

$ sudo php repair_database.php
Repairing All Cacti Database Tables
Repairing Table -> 'cdef' Successful
Repairing Table -> 'cdef_items' Successful
Repairing Table -> 'colors' Successful
Repairing Table -> 'data_input' Successful
Repairing Table -> 'data_input_data' Successful
Repairing Table -> 'data_input_fields' Successful
Repairing Table -> 'data_local' Successful
Repairing Table -> 'data_template' Successful
Repairing Table -> 'data_template_data' Successful
Repairing Table -> 'data_template_data_rra' Successful
Repairing Table -> 'data_template_rrd' Successful
Repairing Table -> 'graph_local' Successful
Repairing Table -> 'graph_template_input' Successful
Repairing Table -> 'graph_template_input_defs' Successful
Repairing Table -> 'graph_templates' Successful
Repairing Table -> 'graph_templates_gprint' Successful
Repairing Table -> 'graph_templates_graph' Successful
Repairing Table -> 'graph_templates_item' Successful
Repairing Table -> 'graph_tree' Successful
Repairing Table -> 'graph_tree_items' Successful
Repairing Table -> 'host' Successful
Repairing Table -> 'host_graph' Successful
Repairing Table -> 'host_snmp_cache' Successful
Repairing Table -> 'host_snmp_query' Successful
Repairing Table -> 'host_template' Successful
Repairing Table -> 'host_template_graph' Successful
Repairing Table -> 'host_template_snmp_query' Successful
Repairing Table -> 'plugin_config' Successful
Repairing Table -> 'plugin_db_changes' Successful
Repairing Table -> 'plugin_hooks' Successful
Repairing Table -> 'plugin_realms' Successful
Repairing Table -> 'poller' Successful
Repairing Table -> 'poller_command' Successful
Repairing Table -> 'poller_item' Successful
Repairing Table -> 'poller_output' Successful
Repairing Table -> 'poller_reindex' Successful
Repairing Table -> 'poller_time' Successful
Repairing Table -> 'rra' Successful
Repairing Table -> 'rra_cf' Successful
Repairing Table -> 'settings' Successful
Repairing Table -> 'settings_graphs' Successful
Repairing Table -> 'settings_tree' Successful
Repairing Table -> 'snmp_query' Successful
Repairing Table -> 'snmp_query_graph' Successful
Repairing Table -> 'snmp_query_graph_rrd' Successful
Repairing Table -> 'snmp_query_graph_rrd_sv' Successful
Repairing Table -> 'snmp_query_graph_sv' Successful
Repairing Table -> 'user_auth' Successful
Repairing Table -> 'user_auth_perms' Successful
Repairing Table -> 'user_auth_realm' Successful
Repairing Table -> 'user_log' Successful
Repairing Table -> 'version' Successful

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


Top
 Profile  
 
 Post subject: Re: MIB Protocol Statistics (RFC1213) [v2.1 - 2009-05-10]
PostPosted: Thu Apr 14, 2016 9:03 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12160
Location: USA
Thanks for reporting a bug in Cacti. your issue has been recorded in http://bugs.cacti.net/view.php?id=2677

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject: Re: MIB Protocol Statistics (RFC1213) [v2.1 - 2009-05-10]
PostPosted: Thu Apr 14, 2016 9:22 pm 
Offline

Joined: Tue Apr 12, 2016 8:45 pm
Posts: 13
>BSOD2600

Thanks for your concern, I just saw the bug report, quite nasty thing...

Is there a possible quick fix, like editing the XML query file and putting the word index in single quotes ?

from RFC12313.xml
Code:
   <fields>
      <Index>
                        <name>Index</name>
                        <source>index</source>
                        <direction>input</direction>
      </Index>


Top
 Profile  
 
 Post subject: Re: MIB Protocol Statistics (RFC1213) [v2.1 - 2009-05-10]
PostPosted: Mon Apr 25, 2016 9:28 pm 
Offline

Joined: Tue Apr 12, 2016 8:45 pm
Posts: 13
>BSOD2600

Hello?

Really nothing to do ? :cry:


Top
 Profile  
 
 Post subject: Re: MIB Protocol Statistics (RFC1213) [v2.1 - 2009-05-10]
PostPosted: Wed Apr 27, 2016 9:27 am 
Offline

Joined: Wed Apr 27, 2016 9:18 am
Posts: 1
This is what I did to get it working.

I changed the word Index to Sort

Code:
        <index_order>Sort</index_order>
       
        <fields>
                <Sort>
                        <name>Index</name>
                        <source>index</source>
                        <direction>input</direction>
                </Sort>


Top
 Profile  
 
 Post subject: Re: MIB Protocol Statistics (RFC1213) [v2.1 - 2009-05-10]
PostPosted: Wed Apr 27, 2016 11:38 am 
Offline

Joined: Tue Apr 12, 2016 8:45 pm
Posts: 13
eightwiretech wrote:
This is what I did to get it working.

I changed the word Index to Sort


It works!
Thanks a lots :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 142 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group