Yes, you can mark it as resolved. Iāll stick with setting the global python version for now.
@andrewm4894
Iāll let you know if I gain some useful insights using anomalies, for know it is producing a lot of alerts from time to time, getting som burst sometimes. Iām not sure what it all is or if it is useful. I guess it has to run for a while to learn the patterns of a ānormalā state.
@ilyam8
I tried setting the command option but couldnāt get the anomalies to work, seems it starts up but then gets killed.
/var/log/netdata/.local/lib/python3.6/site-packages/pyod/models/pca.py:269: RuntimeWarning: divide by zero encountered in true_divide
/var/log/netdata/.local/lib/python3.6/site-packages/numpy/core/_methods.py:202: RuntimeWarning: invalid value encountered in subtract
2020-12-08 11:58:03: python.d INFO: anomalies[local] : training complete in 0.72 seconds (runs_counter=1, model=pca, train_n_secs=14400, models=22, n_fit_success=22, n_fit_fails=0, after=1607410682, before=1607425082).
2020-12-08 11:58:15: netdata ERROR : PLUGINSD[python.d] : requested a BEGIN on chart 'netdata.runtime_alarms_local', which does not exist on host 'localhost.localdomain'. Disabling it.
2020-12-08 11:58:15: netdata INFO : PLUGINSD[python.d] : PARSER ended
2020-12-08 11:58:15: netdata ERROR : PLUGINSD[python.d] : '/usr/libexec/netdata/plugins.d/python.d.plugin' (pid 5284) disconnected after 379 successful data collections (ENDs).
2020-12-08 11:58:15: netdata ERROR : PLUGINSD[python.d] : child pid 5284 killed by signal 15.
2020-12-08 11:58:15: netdata INFO : PLUGINSD[python.d] : '/usr/libexec/netdata/plugins.d/python.d.plugin' (pid 5284) was killed with SIGTERM. Disabling it.
2020-12-08 11:58:15: netdata INFO : PLUGINSD[python.d] : thread with task id 5271 finished
Running the plugin in debug mode with the python3 option as netdata user yields
bash-4.4$ /usr/libexec/netdata/plugins.d/python.d.plugin -ppython3 anomalies debug trace nolock
2020-12-08 12:04:05: python.d INFO: plugin[main] : using python v3
2020-12-08 12:04:05: python.d DEBUG: plugin[main] : looking for 'python.d.conf' in ['/etc/netdata', '/usr/lib/netdata/conf.d']
2020-12-08 12:04:05: python.d DEBUG: plugin[main] : loading '/etc/netdata/python.d.conf'
2020-12-08 12:04:05: python.d DEBUG: plugin[main] : '/etc/netdata/python.d.conf' is loaded
2020-12-08 12:04:05: python.d DEBUG: plugin[main] : looking for 'pythond-jobs-statuses.json' in /var/lib/netdata
2020-12-08 12:04:05: python.d DEBUG: plugin[main] : loading '/var/lib/netdata/pythond-jobs-statuses.json'
2020-12-08 12:04:05: python.d DEBUG: plugin[main] : '/var/lib/netdata/pythond-jobs-statuses.json' is loaded
/var/log/netdata/.local/lib/python3.6/site-packages/sklearn/utils/deprecation.py:143: FutureWarning: The sklearn.utils.testing module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.utils. Anything that cannot be imported from sklearn.utils is now part of the private API.
warnings.warn(message, FutureWarning)
2020-12-08 12:04:06: python.d DEBUG: plugin[main] : [anomalies] looking for 'anomalies.conf' in ['/etc/netdata/python.d', '/usr/lib/netdata/conf.d/python.d']
2020-12-08 12:04:06: python.d DEBUG: plugin[main] : [anomalies] loading '/usr/lib/netdata/conf.d/python.d/anomalies.conf'
2020-12-08 12:04:06: python.d DEBUG: plugin[main] : [anomalies] '/usr/lib/netdata/conf.d/python.d/anomalies.conf' is loaded
2020-12-08 12:04:06: python.d INFO: plugin[main] : [anomalies] built 1 job(s) configs
2020-12-08 12:04:06: python.d DEBUG: plugin[main] : anomalies[local] was previously active, applying recovering settings
2020-12-08 12:04:06: python.d INFO: plugin[main] : anomalies[local] : check success
CHART netdata.runtime_anomalies_local '' 'Execution time for anomalies_local' 'ms' 'python.d' netdata.pythond_runtime line 145000 1
DIMENSION run_time 'run time' absolute 1 1
2020-12-08 12:04:06: python.d DEBUG: anomalies[local] : started, update frequency: 1
/var/log/netdata/.local/lib/python3.6/site-packages/pyod/models/pca.py:269: RuntimeWarning: divide by zero encountered in true_divide
cdist(X, self.selected_components_) / self.selected_w_components_,
/var/log/netdata/.local/lib/python3.6/site-packages/numpy/core/_methods.py:202: RuntimeWarning: invalid value encountered in subtract
x = asanyarray(arr - arrmean)
2020-12-08 12:04:07: python.d INFO: anomalies[local] : training complete in 0.69 seconds (runs_counter=1, model=pca, train_n_secs=14400, models=22, n_fit_success=22, n_fit_fails=0, after=1607411046, before=1607425446).
2020-12-08 12:04:07: python.d DEBUG: anomalies[local] : get_data() returned no data
2020-12-08 12:04:07: python.d DEBUG: anomalies[local] : update => [FAILED] (elapsed time: -, failed retries in a row: 1)
2020-12-08 12:04:07: python.d DEBUG: anomalies[local] : get_data() returned no data
2020-12-08 12:04:07: python.d DEBUG: anomalies[local] : update => [FAILED] (elapsed time: -, failed retries in a row: 2)
2020-12-08 12:04:08: python.d DEBUG: anomalies[local] : get_data() returned no data
2020-12-08 12:04:08: python.d DEBUG: anomalies[local] : update => [FAILED] (elapsed time: -, failed retries in a row: 3)
2020-12-08 12:04:09: python.d DEBUG: anomalies[local] : get_data() returned no data
2020-12-08 12:04:09: python.d DEBUG: anomalies[local] : update => [FAILED] (elapsed time: -, failed retries in a row: 4)
2020-12-08 12:04:10: python.d DEBUG: anomalies[local] : get_data() returned no data
2020-12-08 12:04:10: python.d DEBUG: anomalies[local] : update => [FAILED] (elapsed time: -, failed retries in a row: 5)
2020-12-08 12:04:13: python.d DEBUG: anomalies[local] : get_data() returned no data
2020-12-08 12:04:13: python.d DEBUG: anomalies[local] : update => [FAILED] (elapsed time: -, failed retries in a row: 6)
2020-12-08 12:04:16: python.d DEBUG: anomalies[local] : get_data() returned no data
2020-12-08 12:04:16: python.d DEBUG: anomalies[local] : update => [FAILED] (elapsed time: -, failed retries in a row: 7)
Thanks for the help