Skip to content

Use elasticsearch and kibana to perform a filesystem analysis of a given directory

License

Notifications You must be signed in to change notification settings

chrisingenhaag/elk-filesystem-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File system analysis with Elasticsearch and Kibana

Motivation

When moving from a filesystem based to a dms like alfresco it´s important to know how many files were added over time. Additionally it would be good to filter by some special file type (no media files, only office files for example).

This repo contains different scripts and settings for an elk stack used as an dynamic file system analysis tool.

elk filesystem analysis sample

Quick start

  • check out this repo
git clone
cd elk-filesystem-analysis
  • start elk stack with docker-compose
docker-compose up
  • prepare index with bash script
cd index
./prepare_index.sh
  • import kibana settings containing dashboard and visualization settings
  • open kibana and set default index to fsanalyzer with ctime as default time field
  • use python script to index a directory
python3.6 filestructure-elastic-loader.py /path/to/index

Description

The python script walks through the given directory recursively. For each file in the directory the script creates a json object which is sent to elasticsearch.

{
  'name': 'filename01.jpg',
  'fullpath': '/path/to/index/pictures/xmas2016/filename01.jpg',
  'filesize': 3400000
  'suffix': '.jpg',
  'ctime': '2017-04-12T10:36:55'
}

Features

  • trace file size usage (over time)
  • trace file count (over time)
  • filter by filetype
  • filter by directory
  • filter by specific time intervals

About

Use elasticsearch and kibana to perform a filesystem analysis of a given directory

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published