anomalies.conf 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. # netdata python.d.plugin configuration for anomalies
  2. #
  3. # This file is in YaML format. Generally the format is:
  4. #
  5. # name: value
  6. #
  7. # There are 2 sections:
  8. # - global variables
  9. # - one or more JOBS
  10. #
  11. # JOBS allow you to collect values from multiple sources.
  12. # Each source will have its own set of charts.
  13. #
  14. # JOB parameters have to be indented (using spaces only, example below).
  15. # ----------------------------------------------------------------------
  16. # Global Variables
  17. # These variables set the defaults for all JOBs, however each JOB
  18. # may define its own, overriding the defaults.
  19. # update_every sets the default data collection frequency.
  20. # If unset, the python.d.plugin default is used.
  21. # update_every: 2
  22. # priority controls the order of charts at the netdata dashboard.
  23. # Lower numbers move the charts towards the top of the page.
  24. # If unset, the default for python.d.plugin is used.
  25. # priority: 60000
  26. # ----------------------------------------------------------------------
  27. # JOBS (data collection sources)
  28. # Pull data from local Netdata node.
  29. local:
  30. name: 'local'
  31. # Host to pull data from.
  32. host: '127.0.0.1:19999'
  33. # Username and Password for Netdata if using basic auth.
  34. # username: '???'
  35. # password: '???'
  36. # Use http or https to pull data
  37. protocol: 'http'
  38. # What charts to pull data for - A regex like 'system\..*|' or 'system\..*|apps.cpu|apps.mem' etc.
  39. charts_regex: 'system\..*'
  40. # Charts to exclude, useful if you would like to exclude some specific charts.
  41. # Note: should be a ',' separated string like 'chart.name,chart.name'.
  42. charts_to_exclude: 'system.uptime,system.entropy'
  43. # What model to use - can be one of 'pca', 'hbos', 'iforest', 'cblof', 'loda', 'copod' or 'feature_bagging'.
  44. # More details here: https://pyod.readthedocs.io/en/latest/pyod.models.html.
  45. model: 'pca'
  46. # Max number of observations to train on, to help cap compute cost of training model if you set a very large train_n_secs.
  47. train_max_n: 100000
  48. # How often to re-train the model (assuming update_every=1 then train_every_n=1800 represents (re)training every 30 minutes).
  49. # Note: If you want to turn off re-training set train_every_n=0 and after initial training the models will not be retrained.
  50. train_every_n: 1800
  51. # The length of the window of data to train on (14400 = last 4 hours).
  52. train_n_secs: 14400
  53. # How many prediction steps after a train event to just use previous prediction value for.
  54. # Used to reduce possibility of the training step itself appearing as an anomaly on the charts.
  55. train_no_prediction_n: 10
  56. # If you would like to train the model for the first time on a specific window then you can define it using the below two variables.
  57. # Start of training data for initial model.
  58. # initial_train_data_after: 1604578857
  59. # End of training data for initial model.
  60. # initial_train_data_before: 1604593257
  61. # If you would like to ignore recent data in training then you can offset it by offset_n_secs.
  62. offset_n_secs: 0
  63. # How many lagged values of each dimension to include in the 'feature vector' each model is trained on.
  64. lags_n: 5
  65. # How much smoothing to apply to each dimension in the 'feature vector' each model is trained on.
  66. smooth_n: 3
  67. # How many differences to take in preprocessing your data.
  68. # More info on differencing here: https://en.wikipedia.org/wiki/Autoregressive_integrated_moving_average#Differencing
  69. # diffs_n=0 would mean training models on the raw values of each dimension.
  70. # diffs_n=1 means everything is done in terms of differences.
  71. diffs_n: 1
  72. # What is the typical proportion of anomalies in your data on average?
  73. # This parameter can control the sensitivity of your models to anomalies.
  74. # Some discussion here: https://github.com/yzhao062/pyod/issues/144
  75. contamination: 0.001
  76. # Set to true to include an "average_prob" dimension on anomalies probability chart which is
  77. # just the average of all anomaly probabilities at each time step
  78. include_average_prob: true
  79. # Define any custom models you would like to create anomaly probabilities for, some examples below to show how.
  80. # For example below example creates two custom models, one to run anomaly detection user and system cpu for our demo servers
  81. # and one on the cpu and mem apps metrics for the python.d.plugin.
  82. # custom_models:
  83. # - name: 'demos_cpu'
  84. # dimensions: 'london.my-netdata.io::system.cpu|user,london.my-netdata.io::system.cpu|system,newyork.my-netdata.io::system.cpu|user,newyork.my-netdata.io::system.cpu|system'
  85. # - name: 'apps_python_d_plugin'
  86. # dimensions: 'apps.cpu|python.d.plugin,apps.mem|python.d.plugin'
  87. # Set to true to normalize, using min-max standardization, features used for the custom models.
  88. # Useful if your custom models contain dimensions on very different scales an model you use does
  89. # not internally do its own normalization. Usually best to leave as false.
  90. # custom_models_normalize: false
  91. # Standalone Custom models example as an additional collector job.
  92. # custom:
  93. # name: 'custom'
  94. # host: '127.0.0.1:19999'
  95. # protocol: 'http'
  96. # charts_regex: 'None'
  97. # charts_to_exclude: 'None'
  98. # model: 'pca'
  99. # train_max_n: 100000
  100. # train_every_n: 1800
  101. # train_n_secs: 14400
  102. # offset_n_secs: 0
  103. # lags_n: 5
  104. # smooth_n: 3
  105. # diffs_n: 1
  106. # contamination: 0.001
  107. # custom_models:
  108. # - name: 'user_netdata'
  109. # dimensions: 'users.cpu|netdata,users.mem|netdata,users.threads|netdata,users.processes|netdata,users.sockets|netdata'
  110. # - name: 'apps_python_d_plugin'
  111. # dimensions: 'apps.cpu|python.d.plugin,apps.mem|python.d.plugin,apps.threads|python.d.plugin,apps.processes|python.d.plugin,apps.sockets|python.d.plugin'
  112. # Pull data from some demo nodes for cross node custom models.
  113. # demos:
  114. # name: 'demos'
  115. # host: '127.0.0.1:19999'
  116. # protocol: 'http'
  117. # charts_regex: 'None'
  118. # charts_to_exclude: 'None'
  119. # model: 'pca'
  120. # train_max_n: 100000
  121. # train_every_n: 1800
  122. # train_n_secs: 14400
  123. # offset_n_secs: 0
  124. # lags_n: 5
  125. # smooth_n: 3
  126. # diffs_n: 1
  127. # contamination: 0.001
  128. # custom_models:
  129. # - name: 'system.cpu'
  130. # dimensions: 'london.my-netdata.io::system.cpu|user,london.my-netdata.io::system.cpu|system,newyork.my-netdata.io::system.cpu|user,newyork.my-netdata.io::system.cpu|system'
  131. # - name: 'system.ip'
  132. # dimensions: 'london.my-netdata.io::system.ip|received,london.my-netdata.io::system.ip|sent,newyork.my-netdata.io::system.ip|received,newyork.my-netdata.io::system.ip|sent'
  133. # - name: 'system.net'
  134. # dimensions: 'london.my-netdata.io::system.net|received,london.my-netdata.io::system.net|sent,newyork.my-netdata.io::system.net|received,newyork.my-netdata.io::system.net|sent'
  135. # - name: 'system.io'
  136. # dimensions: 'london.my-netdata.io::system.io|in,london.my-netdata.io::system.io|out,newyork.my-netdata.io::system.io|in,newyork.my-netdata.io::system.io|out'
  137. # Example additional job if you want to also pull data from a child streaming to your
  138. # local parent or even a remote node so long as the Netdata REST API is accessible.
  139. # mychildnode1:
  140. # name: 'mychildnode1'
  141. # host: '127.0.0.1:19999/host/mychildnode1'
  142. # protocol: 'http'
  143. # charts_regex: 'system\..*'
  144. # charts_to_exclude: 'None'
  145. # model: 'pca'
  146. # train_max_n: 100000
  147. # train_every_n: 1800
  148. # train_n_secs: 14400
  149. # offset_n_secs: 0
  150. # lags_n: 5
  151. # smooth_n: 3
  152. # diffs_n: 1
  153. # contamination: 0.001