{"id":24979734,"url":"https://github.com/xmigrate/xforecast","last_synced_at":"2025-07-18T15:37:56.962Z","repository":{"id":108179658,"uuid":"512142547","full_name":"xmigrate/xforecast","owner":"xmigrate","description":"A light weight plug and play tool which can fit right in your observability stack and give valuable predictions on any of the metrics","archived":false,"fork":false,"pushed_at":"2022-12-14T06:11:01.000Z","size":3939,"stargazers_count":17,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-07T20:42:53.005Z","etag":null,"topics":["aiops","kubernetes-monitoring","predictive-analytics","proactive-remediations"],"latest_commit_sha":null,"homepage":"https://docs.xforecast.cloud/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmigrate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-09T09:14:09.000Z","updated_at":"2025-01-14T13:15:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"bcb5cef5-e39e-4cba-b365-c020dcbf1d50","html_url":"https://github.com/xmigrate/xforecast","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/xmigrate/xforecast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmigrate%2Fxforecast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmigrate%2Fxforecast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmigrate%2Fxforecast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmigrate%2Fxforecast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmigrate","download_url":"https://codeload.github.com/xmigrate/xforecast/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmigrate%2Fxforecast/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265787184,"owners_count":23828378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiops","kubernetes-monitoring","predictive-analytics","proactive-remediations"],"created_at":"2025-02-04T02:17:00.190Z","updated_at":"2025-07-18T15:37:56.955Z","avatar_url":"https://github.com/xmigrate.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://xforecast.readthedocs.io/en/latest/\"\u003e\u003cimg src=\"./images/xforecast.png\" alt=\"xforecast\" width=60%\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eXforecast, a light weight realtime plug and play tool for predictive analytics\u003c/em\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/xmigrate/xforecast/actions/workflows/test.yml\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/xmigrate/xforecast/actions/workflows/test.yml/badge.svg\" alt=\"Test\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/xmigrate/xforecast\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/xmigrate/xforecast/branch/main/graph/badge.svg?token=R3M0MPSVRT\" alt=\"Coverage\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/xmigrate/xforecast/actions/workflows/main.yml\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/xmigrate/xforecast/actions/workflows/main.yml/badge.svg?branch=main\" alt=\"Build\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Overview\nxforecast is realtime predictive tool which could be used for short term data predictions. \nxforecast can be easily configured to learn multiple data streams for shorter time period(less than 24 hrs) and predict the data points in future.\n\n## How it works?\nxforecast is an application written in Python. It can be run in a container and connect to your timeseries database to read the data points and write back the predicted data points. Currently xforecast supports prometheus and influxdb.\n\n## How to run?\nYou can start the application in 2 ways, either from source code or with docker and docker-compose. Running xforecast is easier with docker to get you started.\nFirst we need to edit the configuration. Below is a sample config which predict `mem_usage` of linux server.\n\n```\nmetrics:\n- name: memory_usage  #metric name in prometheus\n  data_store : \n    name : prometheus  \n    url: http://host.docker.internal:9000\n  start_time: '2022-09-09T12:49:00.000Z'\n  end_time: '2022-09-09T12:50:00.000Z'\n  query: 100 - ((node_memory_MemAvailable_bytes{instance=\"node-exporter:9100\"} * 100) / node_memory_MemTotal_bytes{instance=\"node-exporter:9100\"})\n  forecast_every: 60 #At what interval the app do the predictions \n  forecast_basedon: 60 #Forecast based on past how many data points\n  write_back_metric: forecast_mem_usage #Where should it write back the metrics\n  models : \n    model_name: prophet\n    hyperparameters:\n      changepoint_prior_scale : 0.05 #determines the flexibility of the trend changes\n      seasonality_prior_scale : 10 #determines the flexibility of the seasonality changes\n      holidays_prior_scale : 10 #determines the flexibiity to fit the holidays\n      changepoint_range : 0.8 #proportion of the history where the trend changes are applied\n      seasonality_mode : additive #whether the mode of seasonality is additive or multiplicative\n- name: cpu_usage  #metric name ininfluxdb\n  data_store : \n    name : influxdb   \n    url: 192.168.1.9\n    port: 8086\n    user : admin\n    pass : admin\n    db_name : telegraf\n    measurement : cpu\n  start_time: '2022-09-14 11:19:00'\n  end_time: '2022-09-14 11:20:00'\n  query: SELECT mean(\"usage_idle\") *-1 +100 FROM \"autogen\".\"cpu\" WHERE (\"host\" = 'ip-172-31-31-81') AND time \u003e= '2022-09-14 11:19:00' AND time \u003c= '2022-09-14 11:20:00' GROUP BY time(10s) \n  forecast_every: 60 #At what interval the app do the predictions \n  forecast_basedon: 60 #Forecast based on past how many data points\n  write_back_metric: forecast_cpu_use #Where should it write back the metrics\n  models : \n    model_name: prophet\n    hyperparameters:\n      changepoint_prior_scale : 0.05 #determines the flexibility of the trend changes\n      seasonality_prior_scale : 10 #determines the flexibility of the seasonality changes\n      holidays_prior_scale : 10 #determines the flexibiity to fit the holidays\n      changepoint_range : 0.8 #proportion of the history where the trend changes are applied\n      seasonality_mode : additive #whether the mode of seasonality is additive or multiplicative\n```\n\nOnce you have created the above configuration file, you can start the forecaster by running\n\n```\ndocker-compose up -d\n```\n\nAs a next step you can create dashboards in grafana or your favourite visualisation tool. The predicted datapoints of the metrics can be found at the valuee of `write_back_metric` configuration.\n\nIf you have multiple metrics to forecast, then you can append the details of those metrics to the configuration.\n\n## Feature Roadmap\n- Support for multiple forecasting ML models\n- Support for auto-ml to automatically decide right model for each metric\n- Web dashboard to create the metric predictions and monitor the prediction accuracy and it's health\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmigrate%2Fxforecast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmigrate%2Fxforecast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmigrate%2Fxforecast/lists"}