Giter Club home page Giter Club logo

dmesg-ifttt's Introduction

dmesg ifttt webhook

What is this application

If you have a Linux or OSX (๐Ÿคฎ) server and would like to notify new kernel messages like warnings or errors, you can do that with this small application.

How It works

If you run the app it collects and parses kernel messages with dmesg and calls an IFTTT webhook. Kernel messages will be in the value1 so if you want to get an e-mail with those messages, you need to use the value1 variable in the email body.

Required parameters

I created this app in node.js without dependencies, so you can pass parameters in an unorthodox mode. This application needs two parameters:

  • event: This is the IFTTT webhook event name
  • key: This is your unique IFTTT webhook key
  • dmesg-params: Optional! You can pass extra params for dmesg
  • threshold: Optional! When you run the script for the first time, only entries will be logged that created after the system start date + threshold. The threshold unit needs to be in millisecond.
you-are@the-best:~$ ./dmesg-ifttt-linux-x64 event=ifttt_event_name key=ifttt_webhook_key dmesg-params="--level=warn" threshold=3600000

Cron

I'm using this application with cron, and runs in for example every minute and done, I will get a mail if my server has a new warning or error. I saw, there is a watcher, but in this case, the polling was the easiest way to solve my problem.

IFTTT

If you would like to test your IFTTT settings, you can do that here: https://ifttt.com/maker_webhooks.

What if my server architecture is different from x64?

In this case, you have 2 options:

  • Run application with node.js like an ordinary man.
  • You can make your own executable.

Make your own executable

To compile this application, you will need node.js and npm. If you have those of two, you just install pkg with npm install then run the npm run pkg command. The built package will be in the build folder. If you are unlucky and pkg doesn't have pre-built node.js to make executable, your PC will compile it on the fly and it can take several hours (this depends on your CPU speed).

dmesg-ifttt's People

Contributors

nfjodor avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.