fim

command module
v0.0.0-...-57b5f80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2020 License: MIT Imports: 15 Imported by: 0

README

File Intergrity Monitor

This project was necessary as we are using Capistrano for deployment, meaning the document root we are trying to check is only a symlink, that changes every time we deploy.

We also want to be notified on slack, have a log file.

I used https://github.com/jpsthecelt/fimTree as a starting point. Although the current code is quite suboptimal (especially handling concurrency) it does the job without any external requirements.

Running it from cron

*/5 * * * *  /home/www-data/fim /home/www-data/config.json

Config file format

{
    "logfile": "/home/www-data/changes.log",
    "storage": "/home/www-data/checksums.json",
    "folders": ["/home/www-data/htdocs/live/http", "/var/www/site/___shared/app", "/var/www/site/___shared/blogs", "/var/www/site/___shared/wp"],
    "ignored": [],
    "slack_chat_id": "{CHANNEL_IDENTIFIER_HASH}",
    "slack_token": "{TOKEN_FROM_SLACK}"
}

Checksum storage (that's storing the last state) and log files are the only files the application will modify.

Folders are checked, ignored list is concatenated to folders (all of them) and ignored for change handling, as well as internal symlinks, add symlinked folders that needs checking (the ___shared ones in the example config).

Documentation

Overview

Calculate checksums for each file in a directory-tree, suitable for use with management systems such as BigFix and Casper.

Notice the program should be called from the commandline as follows

ts8-mac . sha1 -cpuLimit=8

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL