Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Orphaned Data Source options and display #5371

Closed
anarkia1976 opened this issue Jun 12, 2023 · 21 comments
Closed

Improve Orphaned Data Source options and display #5371

anarkia1976 opened this issue Jun 12, 2023 · 21 comments
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team porting required Requires porting to develop resolved A fixed issue
Milestone

Comments

@anarkia1976
Copy link

Hi Support,

unfortunately the flag relating to the search for orphaned data sources didn't work:
image

there is also the possibility to have a filter to select "deletable - yes" in order to identify quickly.
Possibly also the possibility to filter the "Graphs" value with "0 / 0" value.

thanks a lot as always. stefano.

@anarkia1976 anarkia1976 added bug Undesired behaviour unverified Some days we don't have a clue labels Jun 12, 2023
@netniV
Copy link
Member

netniV commented Jun 12, 2023

Orphans tends to find SNMP related queries that have no index or no rrd associated with the graph. Right now, there will be a data_template_rrd associated with each of those data sources that have no graphs, et.c

@netniV
Copy link
Member

netniV commented Jun 12, 2023

By the way, the graph numbers are for graphs and aggregate graphs. There's still a data template using those sources.

@anarkia1976
Copy link
Author

anarkia1976 commented Jun 12, 2023

What I've seen is that data sources with values "0 / 0" have no associated graphs and should come out as orphans correct?

It would be possible to arrange also the "Graphs" column in order to have in the head the data sources with value "0 / 0" which are those that are reported in the ds stats logs as not associated with any RRD graph?

thanks.

@netniV
Copy link
Member

netniV commented Jun 12, 2023

There appears to be a difference between Graphs/Agg Graphs of 0/0, and oprhaned data sources which are data sources not associated with any template

@TheWitness
Copy link
Member

It's more than that. We introduced an orphan column a while ago, but did not make this query take advantage of it. I'm looking into it right now.

@TheWitness TheWitness added confirmed Bug is confirm by dev team and removed unverified Some days we don't have a clue labels Jun 19, 2023
@TheWitness TheWitness added this to the v1.2.25 milestone Jun 19, 2023
@TheWitness TheWitness changed the title [CACTI 1.2.25 latest source] orphaned data source didn't work Orphaned Data Source Link not Working Jun 19, 2023
TheWitness added a commit that referenced this issue Jun 19, 2023
* Orphaned Data Source Link not Working
* Once a Data Source is orphaned there are cases where it will not become un-orphaned upon reindex
TheWitness added a commit that referenced this issue Jun 19, 2023
* Orphaned Data Source Link not Working
* Once a Data Source is orphaned there are cases where it will not become un-orphaned upon reindex
@TheWitness TheWitness added the resolved A fixed issue label Jun 19, 2023
@TheWitness
Copy link
Member

This should be fixed now.

@TheWitness TheWitness added the porting required Requires porting to develop label Jun 19, 2023
@anarkia1976
Copy link
Author

@TheWitness now it works, but i see also data sources marked as orphaned but with working graphs:
image

@TheWitness
Copy link
Member

Re-index the device in question and see if they go away. There was a flaw that kept them orphaned even after the device recovered. Let us know.

@anarkia1976
Copy link
Author

i have made a reindex but with no success, data source are marked as orphaned but in reality they are not.

@anarkia1976
Copy link
Author

Can you think possible to add "sort" button for "deletable"colum?
image

@TheWitness
Copy link
Member

Log a feature request. It should be fairly easy, but before we added the orphan column, too expensive of a query. Now it's easy.

@TheWitness
Copy link
Member

i have made a reindex but with no success, data source are marked as orphaned but in reality they are not.

Post the output of the verbose query...

@anarkia1976
Copy link
Author

anarkia1976 commented Jun 20, 2023

Data Query Debug Information 
Total: 0.000000, Delta: 0.000000, Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/interface.xml'
Total: 0.000000, Delta: 0.000000, Running Data Query [1].
Total: 0.000000, Delta: 0.000000, Found Type = '3' [SNMP Query].
Total: 0.000000, Delta: 0.000000, XML file parsed ok.
Total: 0.000000, Delta: 0.000000, Auto Bulk Walk Size Selected.
Total: 0.970000, Delta: 0.970000, Tested Bulk Walk Size 1 with a response of 0.9659.
Total: 1.210000, Delta: 0.250000, Tested Bulk Walk Size 5 with a response of 0.2464.
Total: 1.380000, Delta: 0.160000, Tested Bulk Walk Size 10 with a response of 0.1630.
Total: 1.520000, Delta: 0.140000, Tested Bulk Walk Size 15 with a response of 0.1377.
Total: 1.610000, Delta: 0.090000, Tested Bulk Walk Size 20 with a response of 0.0904.
Total: 1.700000, Delta: 0.100000, Tested Bulk Walk Size 25 with a response of 0.0959.
Total: 1.700000, Delta: 0.000000, Bulk Walk Size selected was 20.
Total: 1.760000, Delta: 0.060000, Executing SNMP get for num of indexes @ '.1.3.6.1.2.1.2.1.0' Index Count: 34
Total: 1.760000, Delta: 0.000000, Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1' Index Count: 34
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.1' value: '1'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.2' value: '2'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.3' value: '3'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.4' value: '4'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.5' value: '5'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.6' value: '6'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.7' value: '7'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.8' value: '8'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.9' value: '9'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.10' value: '10'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.11' value: '11'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.12' value: '12'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.13' value: '13'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.14' value: '14'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.15' value: '15'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.16' value: '16'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.17' value: '17'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.18' value: '18'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.19' value: '19'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.20' value: '20'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.21' value: '21'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.22' value: '22'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.23' value: '23'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.24' value: '24'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.25' value: '25'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.26' value: '26'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.27' value: '27'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.28' value: '28'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.29' value: '29'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.30' value: '30'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.31' value: '31'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.32' value: '32'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.33' value: '33'
Total: 1.760000, Delta: 0.000000, Index found at OID: '.1.3.6.1.2.1.2.2.1.1.34' value: '34'
Click to show Data Query output for field 'ifIndex'
Click to show Data Query output for field 'ifOperStatus'
Click to show Data Query output for field 'ifAdminStatus'
Click to show Data Query output for field 'ifDescr'
Click to show Data Query output for field 'ifName'
Click to show Data Query output for field 'ifAlias'
Click to show Data Query output for field 'ifType'
Click to show Data Query output for field 'ifSpeed'
Click to show Data Query output for field 'ifHighSpeed'
Click to show Data Query output for field 'ifHwAddr'
Click to show Data Query output for field 'ifIP'
Click to show Data Query output for field 'ifIPv6'
Total: 2.920000, Delta: 0.030000, Checking for Sort Field change. No changes detected.
Total: 2.920000, Delta: 0.000000, Update Data Query Sort Cache complete
Total: 2.920000, Delta: 0.000000, Found 10 Local Data ID's to Verify
Total: 2.930000, Delta: 0.000000, Verification of 10 Local Data ID's Complete
Total: 2.930000, Delta: 0.000000, Index Association with Local Data complete
Total: 2.990000, Delta: 0.060000, No Index Changes Detected, Skipping Re-Index and Poller Cache Re-population
Total: 2.990000, Delta: 0.010000, Automation Executing for Data Query complete
Total: 2.990000, Delta: 0.000000, Plugin hooks complete

it say:
--> Total: 2.990000, Delta: 0.060000, No Index Changes Detected, Skipping Re-Index and Poller Cache Re-population

image

@TheWitness
Copy link
Member

Can you grab the details from the ifName, ifDesc, and ifAlias columns and post that to? Also, dump the data_local table for this host:

SELECT * FROM data_local WHERE orphan=1 AND host_id=?;

@TheWitness
Copy link
Member

I may have to do something a bit more dramatic. But those errors should point to the solution once I have the rest of the output requested above.

@TheWitness TheWitness reopened this Jun 20, 2023
@anarkia1976
Copy link
Author

MariaDB [cacti]> SELECT * FROM data_local WHERE orphan=1 AND host_id=573;
+-------+------------------+---------+---------------+------------+--------+
| id | data_template_id | host_id | snmp_query_id | snmp_index | orphan |
+-------+------------------+---------+---------------+------------+--------+
| 22767 | 2 | 573 | 1 | 10 | 1 |
| 22768 | 2 | 573 | 1 | 2 | 1 |
| 22769 | 2 | 573 | 1 | 23 | 1 |
| 22771 | 2 | 573 | 1 | 9 | 1 |
+-------+------------------+---------+---------------+------------+--------+
4 rows in set (0.000 sec)

@TheWitness
Copy link
Member

Sorry, one more question. What's the reindex method?

@anarkia1976
Copy link
Author

Sorry, one more question. What's the reindex method?

image
verbose.

TheWitness added a commit that referenced this issue Jun 22, 2023
If a device did not re-index properly and things were marked orphan, unmark them and restore poller items if those items were removed.
@TheWitness
Copy link
Member

Okay, pull the latest lib/data_query.php and re-index. Problem should be solved now.

@anarkia1976
Copy link
Author

anarkia1976 commented Jun 22, 2023

Okay, pull the latest lib/data_query.php and re-index. Problem should be solved now.

it works now, thanks a lot. very good.

@TheWitness
Copy link
Member

Cool. Thanks for all the QA!

TheWitness added a commit that referenced this issue Jun 24, 2023
If a device did not re-index properly and things were marked orphan, unmark them and restore poller items if those items were removed.
@netniV netniV changed the title Orphaned Data Source Link not Working Improve Orphaned Data Source options and display Sep 3, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team porting required Requires porting to develop resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants