Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.
/ Obscured.AptWatcher Public archive

Obscured.AptWatcher is a simple web-app that helps you keep track of OS updates as well as keeping you up to date with actions to keep your servers updated and secure.

License

Notifications You must be signed in to change notification settings

gonace/Obscured.AptWatcher

Repository files navigation

Build Status Vulnerabilities Test Coverage Code Climate

AptWatcher is a simple Sinatra app that helps you keep track of packages that need updating on your servers.

How it works

On each server you manage you set up a daily cron job that fetches the list of packages that need to be updated and sends that list to AptWatcher:

Structure

One line is interpreted as one service

{
    "name": "service_name",
    "version_installed": "1.0.0",
    "version_available": "1.0.1"
}
Example Input
{"name":"service_a","version_installed":"1.0.0","version_available":"1.0.1"}
{"name":"service_b","version_installed":"1.0.0","version_available":"1.0.1"}
{"name":"service_c","version_installed":"1.0.0","version_available":"1.0.1"}
Perl
@daily apt-get --just-print upgrade 2>&1 | perl -ne 'if (/Inst\s([\w,\-,\d,\.,~,:,\+]+)\s\[([\w,\-,\d,\.,~,:,\+]+)\]\s\(([\w,\-,\d,\.,~,:,\+]+)\)? /i) {print "{\"name\":\"$1\",\"version_installed\":\"$2\",\"version_available\":\"$3\"} \n"}' | curl -u user:pass --data-binary @- http://hostname/api/collector/upgrades/$(hostname)

If any packages are in that payload that weren't previously sent, a message is sent via a Slack incoming webhook with that list of new packages.

Installation

The easiest way to get going is deploying to Heroku:

Deploy

Otherwise, you can bundle, create your database, migrate, and run:

$ bundle

Configuration

Check the .env file for the environment variables you can use to configure the app.

License

AptWatcher is copyright © 2017 Obscured It is free software, and may be redistributed under the terms specified in the LICENSE file.

About Obscured

AptWatcher is maintained by the friendly crew at Obscured, an exception, performance, and uptime monitoring service for developers.

Printscreens

Home Statistics

About

Obscured.AptWatcher is a simple web-app that helps you keep track of OS updates as well as keeping you up to date with actions to keep your servers updated and secure.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •