Skip to content

andrewm4894/netdata-ml-app

Repository files navigation

logo
Experimental Machine Learning Application

netdata-ml-app

Netdata ML App - A collection of dash based python apps that will take in a netdata host ip and some input parameters, pull the data from the host, crunch it, and display some results.

This is all experimental and nowhere near stable yet, but you might find something interesting in your data so why not play around and see :)

Click below to play with the latest version of the app, deployed to Heroku and configured to use data from our demo servers:

https://netdata-ml-app.herokuapp.com/

https://netdata-ml-app-develop.herokuapp.com/

Streamlit Apps

  • AR TOC: streamlit_app_ar_toc.py - Anomaly Rates in netdata menu - try it here.
  • MC PCA: streamlit_app_mc_pca.py - PCA based Metric Correlations - try it here.

Apps

Each app focuses on a particular use case:

  • Metrics Explorer: You give it a list of metrics you are interested in, and it will plot them together in various ways.
  • Changepoint Detection: Look over a subset of charts to find which metrics have obvious 'changepoints' within a window of interest.
  • Clustered Heatmap: A heatmap of your metrics from netdata, overed by a clustering algorithm to group similar 'looking' metrics together.
  • Metric Percentiles: Overlay percentiles on your plots based on a window of interest and a reference window. Results will be ordered by those with the higher 'crossover' percentage.
  • Alarms Affinity: Perform some market basket analysis on your alarms to see which ones "co-occur" together.
  • Time Series Clustering: User clustering to 'group' similar 'looking' metrics together.
  • Correlations: Some correlation plots and exploration of recent correlation changes between metrics.
  • Anomalies: Given a reference window to train on, build some anomaly detection models to find any hotspots for anomalies within a window of interest.
  • Matrix Profile Anomalies: Use a matrix profile driven approach to detect which metrics might be most anomalous.
  • Metric Model: Given a metric of interest, build a predictive model of that metric - how good is that model and what other metrics are important to it? This could be another way to find some evidence of what other metrics might be 'driving' some metric you are interested in.
  • Metric Similarity: Given a metric of interest, find the other most similar 'looking' metrics.
  • Anomaly Bit: Find the most anomalous dimensions given a window of interest.
  • Anomaly Events: Explore individual anomaly events detected by Netdata.

Using Docker

Docker pull command:

docker image pull andrewm4894/netdata-ml-app:latest

Docker run command:

docker run -d --network="host" --name=netdata-ml-app \
  -p 29999:29999 \
  --env NETDATAMLAPP_HOSTS=127.0.0.1:19999 \
  --restart unless-stopped \
  andrewm4894/netdata-ml-app:latest

Stop all running containers:

docker stop $(docker ps -a -q)

Delete all stopped containers:

docker rm $(docker ps -a -q)

To get logs:

docker logs netdata-ml-app

Running locally

# clone the repo
git clone https://github.com/andrewm4894/netdata-ml-app.git
# cd into folder
cd netdata-ml-app
# create a virtual env using something like pipenv
pipenv install
# activate the virtual env
pipenv shell
# launch the app
python index.py

The app should now be running on port 29999.

Configuration

Environment Variables

Main way to define various config options is via environment variables you can define locally or pass into the docker container when running it.

  • NETDATAMLAPP_HOSTS: A string list of hosts you would like the app to pull data from. Default is a local netdata 127.0.0.1:19999. But for example if you wanted to tell the ml app to look at our two demo netdata hosts you could do london.my-netdata.io,newyork.my-netdata.io.
  • NETDATAMLAPP_SCRAPE_CHILDREN: yes to also include any child netdata in the hosts list for the app, default is no.
  • NETDATAMLAPP_LOG_LEVEL: Default is info, set to debug for debug level.