selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
hastic-server logo

Self-host hastic-server

0.5.1

Pattern recognition server for Grafana anomaly detection

BetaOpen SourceGPL-3.0
Updated5 years ago
LanguageTypescript
Setup difficultyAdvanced
Stars
331
Ports
8000 (HTTP API server), 8002 (WebSocket server for analytics)
Requires
Grafana
Docker
hastic/server
Install with Docker Compose

What is hastic-server?

Hastic Server is a self-hosted analytics platform that extends Grafana with pattern recognition and anomaly detection capabilities for time-series data. It consists of a Node.js server component and an analytics engine that work together to analyze metrics from Grafana data sources like Prometheus, InfluxDB, and Graphite. The server provides a REST API and webhook support for alerting, while the analytics component performs the actual pattern detection. Deployment is via Docker Compose with optional MongoDB for persistence. The project is licensed under GPL-3.0 and developed by CorpGlory Inc., though the repository notes indicate it is obsolete in favor of a newer Rust implementation.

Should you self-host hastic-server?

hastic-server scores 39/100 on selfhost.directory (how scoring works) and ranks #87 of 104 in Monitoring & observability. It has 331 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is GPL-3.0-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is grafana (90/100, 77 569 stars). It scores higher overall, so compare the two before you pick. See hastic-server vs grafana side by side.

Features

  • Alertmanager integration
  • Anomaly Detection
  • Multi-database Support
  • Pattern Recognition
  • Webhook Notifications
  • WebSocket analytics

hastic-server README

How to install hastic-server

Install hastic-server with Docker Compose

Environment variables
HASTIC_API_KEY, GRAFANA_URL, HASTIC_ALERT_TYPE, HASTIC_ALERTMANAGER_URL, HASTIC_WEBHOOK_URL, HASTIC_INSTANCE_NAME, HASTIC_ALERT_IMAGE, HASTIC_DB_CONNECTION_STRING, HASTIC_DB_CONNECTION_TYPE, HASTIC_TIMEZONE_OFFSET, HASTIC_PORT, HS_AN_LOGGING_LEVEL

version: '2.1' services: server: image: hastic/server:latest build: dockerfile: server/Dockerfile context: . environment: HASTIC_API_KEY: ${HASTIC_API_KEY?"HASTIC_API_KEY variable is required"} GRAFANA_URL: ${GRAFANA_URL?"GRAFANA_URL variable is required"}

  HASTIC_ALERT_TYPE: ${HASTIC_ALERT_TYPE}
  HASTIC_ALERTMANAGER_URL: ${HASTIC_ALERTMANAGER_URL}
  HASTIC_WEBHOOK_URL: ${HASTIC_WEBHOOK_URL}
  HASTIC_INSTANCE_NAME: ${HASTIC_INSTANCE_NAME}
  HASTIC_ALERT_IMAGE: ${HASTIC_ALERT_IMAGE}
  HASTIC_DB_CONNECTION_STRING: ${HASTIC_DB_CONNECTION_STRING}
  HASTIC_DB_CONNECTION_TYPE: ${HASTIC_DB_CONNECTION_TYPE}
  HASTIC_TIMEZONE_OFFSET: ${HASTIC_TIMEZONE_OFFSET}

ports:
  - ${HASTIC_PORT:-8000}:8000
volumes:
  - data-volume:/var/www/data
networks:
  - hastic-network
restart: always

analytics: image: hastic/analytics:latest build: analytics environment: # TODO: use any port for server connection HASTIC_SERVER_URL: "ws://server:8002" HS_AN_LOGGING_LEVEL: ${HS_AN_LOGGING_LEVEL} networks: - hastic-network restart: always

volumes: data-volume:

networks: hastic-network:

Requires HASTIC_API_KEY and GRAFANA_URL environment variables

How to configure hastic-server

  • GRAFANA_URLhttp://localhost:3000URL of the Grafana instance

    URL of the Grafana instance

  • HASTIC_ALERT_IMAGEImage to include in alerts

    Image to include in alerts

  • HASTIC_ALERTMANAGER_URLURL of Alertmanager for alert notifications

    URL of Alertmanager for alert notifications

  • HASTIC_ALERT_TYPEType of alerting to use

    Type of alerting to use

  • HASTIC_API_KEYAPI key for authentication with Grafana

    API key for authentication with Grafana

  • HASTIC_DB_CONNECTION_STRINGDatabase connection string

    Database connection string

  • HASTIC_DB_CONNECTION_TYPEType of database connection (e.g., mongodb)

    Type of database connection (e.g., mongodb)

  • HASTIC_INSTANCE_NAMEName of this Hastic instance

    Name of this Hastic instance

  • HASTIC_MONGO_ADMIN_PASSWORDpasswordMongoDB admin password

    MongoDB admin password

  • HASTIC_MONGO_ADMIN_USERadminMongoDB admin username

    MongoDB admin username

  • HASTIC_MONGO_DBhasticMongoDB database name

    MongoDB database name

  • HASTIC_MONGO_PASSWORDpasswordMongoDB password

    MongoDB password

  • HASTIC_MONGO_USERhasticMongoDB username

    MongoDB username

  • HASTIC_PORT8000Port the server listens on

    Port the server listens on

  • HASTIC_TIMEZONE_OFFSETTimezone offset for the server

    Timezone offset for the server

  • HASTIC_WEBHOOK_URLhttp://localhost:8080Webhook URL for notifications

    Webhook URL for notifications

  • HS_AN_LOGGING_LEVELDEBUGLogging level for analytics component

    Logging level for analytics component

  • LEARNING_TIMEOUT120Timeout for learning patterns in seconds

    Timeout for learning patterns in seconds

hastic-server releases & version history

More in Monitoring & observability

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…