All Projects → nickbabcock → Rrinlog

nickbabcock / Rrinlog

Licence: mit
Replacing Elasticsearch with Rust and SQLite

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Rrinlog

Ansible Playbooks
Ansible playbook collection that have been written for Ubuntu. Some of the playbooks are Elasticsearch, Mesos, AWS, MySql, Sensu, Nginx etc..
Stars: ✭ 429 (+232.56%)
Mutual labels:  elasticsearch, grafana, nginx
Phalcon Vm
Vagrant configuration for PHP7, Phalcon 3.x and Zephir development.
Stars: ✭ 43 (-66.67%)
Mutual labels:  elasticsearch, nginx
Linux Tutorial
《Java 程序员眼中的 Linux》
Stars: ✭ 7,757 (+5913.18%)
Mutual labels:  elasticsearch, nginx
Docker Magento Mutagen
Mage2click Docker-based development environment for Magento with mutagen.io sync for files on macOS
Stars: ✭ 64 (-50.39%)
Mutual labels:  elasticsearch, nginx
Docker monitoring logging alerting
Docker host and container monitoring, logging and alerting out of the box using cAdvisor, Prometheus, Grafana for monitoring, Elasticsearch, Kibana and Logstash for logging and elastalert and Alertmanager for alerting.
Stars: ✭ 479 (+271.32%)
Mutual labels:  elasticsearch, grafana
Phpmyfaq
phpMyFAQ - Open Source FAQ web application for PHP and MySQL, PostgreSQL and other databases
Stars: ✭ 494 (+282.95%)
Mutual labels:  elasticsearch, sqlite
Nodbi
Document DBI connector for R
Stars: ✭ 56 (-56.59%)
Mutual labels:  elasticsearch, sqlite
Awesome Monitoring
INFRASTRUCTURE、OPERATION SYSTEM and APPLICATION monitoring tools for Operations.
Stars: ✭ 356 (+175.97%)
Mutual labels:  elasticsearch, grafana
Jmeter Elasticsearch Backend Listener
JMeter plugin that lets you send sample results to an ElasticSearch engine to enable live monitoring of load tests.
Stars: ✭ 72 (-44.19%)
Mutual labels:  elasticsearch, grafana
Fxshop
基于SpringBoot+SpringCloud微服务的商城项目(demo版 不可用于生产)
Stars: ✭ 82 (-36.43%)
Mutual labels:  elasticsearch, nginx
Elkstack
The config files and docker-compose.yml files of Dockerized ELK Stack
Stars: ✭ 96 (-25.58%)
Mutual labels:  elasticsearch, nginx
Grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Stars: ✭ 45,930 (+35504.65%)
Mutual labels:  elasticsearch, grafana
Pytablewriter
pytablewriter is a Python library to write a table in various formats: CSV / Elasticsearch / HTML / JavaScript / JSON / LaTeX / LDJSON / LTSV / Markdown / MediaWiki / NumPy / Excel / Pandas / Python / reStructuredText / SQLite / TOML / TSV.
Stars: ✭ 422 (+227.13%)
Mutual labels:  elasticsearch, sqlite
Php Docker Boilerplate
🍲 PHP Docker Boilerplate for Symfony, Wordpress, Joomla or any other PHP Project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)
Stars: ✭ 503 (+289.92%)
Mutual labels:  elasticsearch, nginx
Notebook
🍎 笔记本
Stars: ✭ 381 (+195.35%)
Mutual labels:  elasticsearch, nginx
Giropops Monitoring
Full stack tools for monitoring containers and other stuff. ;)
Stars: ✭ 1,019 (+689.92%)
Mutual labels:  rocket, grafana
Doctor
基于知识图谱的医学诊断系统。Medical Diagnosis System Based on Knowledge Map.
Stars: ✭ 286 (+121.71%)
Mutual labels:  elasticsearch, nginx
Hastic Server
Hastic data management server for analyzing patterns and anomalies from Grafana
Stars: ✭ 292 (+126.36%)
Mutual labels:  elasticsearch, grafana
Ebean
Ebean ORM
Stars: ✭ 1,172 (+808.53%)
Mutual labels:  elasticsearch, sqlite
Adminer Custom
Customizations for Adminer, the best database management tool written in PHP.
Stars: ✭ 99 (-23.26%)
Mutual labels:  elasticsearch, sqlite

Build Status

rrinlog

rrinlog is my attempt at Replacing Elasticsearch with Rust and SQLite for my nginx access logs, as Elasticsearch is a resource hungry application even at idle. rrinlog's success has been outstanding, with a 100x reduction in memory, 1000x reduction in CPU usage, and 100x reduction in disk usage.

This project contains two binaries:

  • rrinlog is for consuming nginx acces logs and storing them in a SQLite database. This binary may be built on Rust stable.
  • rrinlog-server exposes this SQLite database according to Grafana's JSON API datasource. This binary requires Rust nightly. Current Rust web framework is actix web, but there is a Rocket branch as well

This project currently isn't meant at replacing Elasticsearch for the general populous for the following reasons:

Custon Nginx Access Log

rrinlog ingests a custom nginx access log format:

log_format vhost    '$remote_addr - $remote_user [$time_local] '
                    '"$request" $status $body_bytes_sent '
                    '"$http_referer" "$http_user_agent" "$host"';

Any other format would likely result in parsing errors.

Hardcoded SQL Queries

rrinlog-server let's me know what my top blog articles with the following SQL query:

SELECT referer,
       Count(*) AS views
FROM   logs
WHERE  host = 'comments.nbsoftsolutions.com'
       AND method = 'GET'
       AND path <> '/js/embed.min.js'
       AND epoch >= ?
       AND epoch < ?
       AND referer <> '-'
       AND remote_addr <> ?
GROUP  BY referer
ORDER  BY views DESC

This SQL query is tailored to me and how my blog is setup, so make no mistake that the intended audience with this query is solely me 😄

Limited Endpoints

These hardcoded SQL queries are needed as Grafana doesn't support SQLite as a native datasource. One day it may be supported like Mysql and Postgres, but until that day, rrinlog-server contains only a limited set of visualizations:

  • What are my top blog articles
  • How much outbound web data is leaving the server to other external IPs
  • How many requests are being serviced by other virtual hosts

No GeoIP Capabilities

Elasticsearch has the ability to take an IP address and turn it into a location. This is called GeoIP. I had a Grafana panel showing the top visiting cities, which is novel but not critical to monitor. Migrating from Elasticsearch meant I had to remove the visualization.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].