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

Data Source Statistics incorrectly reports that a data source does not exist #1414

Closed
netniV opened this issue Feb 27, 2018 · 5 comments
Closed

Comments

@netniV
Copy link
Member

netniV commented Feb 27, 2018

I have just seen a large number of warnings from DSSTATS have appeared in my log files. When I took one of the filenames and looked for it, it was present. Therefore, this warning appears to be in error. When I used the debug plugin to verify the datasource, no issues were found.

@netniV
Copy link
Member Author

netniV commented Feb 27, 2018

The path is probably the <path_rra> which usually corresponds to /rra/

@k4y53r
Copy link

k4y53r commented Feb 27, 2018

Hi,

I've also get this error after upgrade to 1.1.36, checked path and permission with no error detected on them

Update: no structured RRA used

netniV added a commit to netniV/cacti that referenced this issue Mar 2, 2018
@netniV
Copy link
Member Author

netniV commented Mar 2, 2018

I have create a patch for 1.2 that should fix this. For now, you may wish to apply the PR #1434 to your 1.1.36 system.

@MarcHagen
Copy link

MarcHagen commented Mar 11, 2018

After changing that line i got stuck polling processes loop infinitely and producing big log files.

11-Mar-2018 13:36:17 - CMDPHP PHP ERROR WARNING Backtrace: (/poller_boost.php: 166 dsstats_boost_bottom)(/lib/dsstats.php: 708 dsstats_get_and_store_ds_avgpeak_values)(/lib/dsstats.php: 71 dsstats_obtain_data_source_avgpeak_values)(/lib/dsstats.php: 173 dsstats_rrdtool_execute)(/lib/dsstats.php: 808 feof)(CactiErrorHandler)(/lib/functions.php: 4586 cacti_debug_backtrace)
11-Mar-2018 13:36:17 - ERROR PHP WARNING: feof() expects parameter 1 to be resource, null given in file: /usr/share/cacti/lib/dsstats.php on line: 808
11-Mar-2018 13:36:17 - CMDPHP PHP ERROR WARNING Backtrace: (/poller_boost.php: 166 dsstats_boost_bottom)(/lib/dsstats.php: 708 dsstats_get_and_store_ds_avgpeak_values)(/lib/dsstats.php: 71 dsstats_obtain_data_source_avgpeak_values)(/lib/dsstats.php: 173 dsstats_rrdtool_execute)(/lib/dsstats.php: 809 fgets)(CactiErrorHandler)(/lib/functions.php: 4586 cacti_debug_backtrace)
11-Mar-2018 13:36:17 - ERROR PHP WARNING: fgets() expects parameter 1 to be resource, null given in file: /usr/share/cacti/lib/dsstats.php on line: 809

In my case $use_proxy is false and file_exists() true.
This is due to

$use_proxy = (read_config_option('storage_location') != '' ? true:false);
uses the same wrong usage of comparing a string to an integer

Because of that the $process_pipes are not populated correctly

@netniV
Copy link
Member Author

netniV commented Mar 11, 2018

Can you open that as a separate issue so that it can be patched too.

netniV added a commit to netniV/cacti that referenced this issue Mar 11, 2018
This fix also incorporates the Cacti#1414 fix that was applied to the
feature branch already.  Therefore, there may be a conflict when
develop is reapplied to the feature branch but needs to be applied
here for 1.1.37 release.

Issue Cacti#1414: DSSTATS reports incorrectly that a data source does not exist
cigamit pushed a commit that referenced this issue Mar 11, 2018
This fix also incorporates the #1414 fix that was applied to the
feature branch already.  Therefore, there may be a conflict when
develop is reapplied to the feature branch but needs to be applied
here for 1.1.37 release.

Issue #1414: DSSTATS reports incorrectly that a data source does not exist
@ronytomen ronytomen changed the title DSSTATS WARNING: File '<cacti>/rra/<folder>/<ds>.rrd' Does Not Exist DSSTATS reports incorrectly that a data source does not exist Mar 26, 2018
@netniV netniV changed the title DSSTATS reports incorrectly that a data source does not exist Data Source Statistics incorrectly reports that a data source does not exist Jan 2, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants