Sunday, May 1, 2016

easy create service monitoring and alert system

kanla is a small-scale alerting system that peridiocally checks your website, mail server, etc, if they are not still up and running.kanla will send a notify you via jabber (XMPP).

so it is very easy to install and setup up. so if you still not have any monitoring system to install in mind, use kanla temporary to alert in case the health check of service (http, mail) fails.

*** you can follow the link of how-to below  to setup your own xmpp, if you wish too

1- install kanla to the system
$ sudo apt-get install kanla

2- configure kanla by modify file  /etc/kanla/default.cfg as bellow (we use as the user to send alert out and as the user to receive alert )

    jid      = ""
    password = "alert"
send_alerts_to = <<EOT
include "default.d/*.cfg"

3- create configuration file for monitoring in directory /etc/kanla/default.d/
-- fail.cfg
# The fail-plugin will periodically send you an error.
# This can be used to verify your xmpp-setup.
# If everything works you can just remove this file.
<monitor fail>
    plugin = fail

- http-example.cfg
 <monitor kanla website>
    plugin = http
    url = "http://localhost/"

# This plugin notifies you when kanla is restarted by systemd,
# which typically happens when it crashed.
<monitor kanla-restarted>
    plugin = kanla-restarted

4- restart kanla service then you will receive message in case 1- the local web server fail, 2- periodically fail message 3- when restart kanla service
$  sudo /etc/init.d/kanla restart

screeenshot of receive messages

No comments:

Post a Comment