Skip to content
sqall01 edited this page Oct 15, 2017 · 30 revisions

Tutorials

In this document a list of existing tutorials for alertR are shown.

If a tutorial is missing or you have an idea that is not shown there, feel free to write one yourself and contribute it. It would be great if other users can benefit from your contribution.

Note, at the moment new tutorials are written. Since not all tutorials are finished yet, you can also check out the old Example Configuration file that holds configuration notes for the Version 0.300.

List of Tutorials

alertR Alert Clients

alertR Manager Clients

alertR Sensor Clients

alertR Server

alertR Alert Client Executer

This tutorial describes the basic installation and configuration of the alertR Alert Client Executer. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
alertR Alert Client Executer
----------------------------
Instance:
alertClientExecuter

Type:
alert

Version:
0.400-1

Dependencies:
None

Description:
This client handles triggered alerts and is written to execute a configured script or command with arguments. The arguments are configured and the command is executed on a triggered sensor alert event or when all alerts are stopped. For example you can start a init script on a Linux system when a sensor alert was triggered and when all alerts are stopped the init script is stopped.
[...]

alertR Alert Client Executer Tutorial

alertR Alert Client Push Notification

This tutorial describes the basic installation and configuration of the alertR Alert Client Push Notification. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
alertR Alert Client Push Notification
-------------------------------------
Instance:
alertClientPushNotification

Type:
alert

Version:
0.500-0

Dependencies:
1: Crypto (pip packet: pycrypto) (lowest version: 2.6.1)

Description:
This client handles triggered sensor alerts and is written to send a push notification on the configured channel when it receives a sensor alert. It needs an account at https://alertr.de and the receiving devices to have the alertR app installed. For each alert you configure, you can customize the message content by using template files. Special keywords will be replaced by information about the received sensor alert.
[...]

alertR Alert Client Push Notification Tutorial

alertR Manager Client Console

This tutorial describes the basic installation and configuration of the alertR Manager Client Console. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
alertR Manager Client Console
-----------------------------
Instance:
managerClientConsole

Type:
manager

Version:
0.400-1

Dependencies:
1: urwid (pip packet: urwid) (lowest version: 1.1.1)

Description:
This client is a manager client for the alert system. It shows the current state of all sensors, the sensor and alert clients and if the alert system is activated or not.
[...]

alertR Manager Client Console Tutorial

alertR Manager Client Database

This tutorial describes the basic installation and configuration of the alertR Manger Client Database. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
alertR Manger Client Database
-----------------------------
Instance:
managerClientDatabase

Type:
manager

Version:
0.400-1

Dependencies:
1: MySQLdb (pip packet: MySQL-python) (lowest version: 1.2.3)

Description:
This client stores the state of the alert system in a database for external usage. It uses a MySQL db to store all information about the alert system and events that occur (for example a client that disconnected from the alert system). External components, such as a website, can use the information in the database for their purposes. In the case of a website, it can process the data and show a visualization to the user. In order to let external components interact with the alert system, the manager client contains a local UNIX socket server which can be contacted.
[...]

alertR Manager Client Database Tutorial

alertR Sensor Client Executer

This tutorial describes the basic installation and configuration of the alertR Sensor Client Executer. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
alertR Sensor Client Executer
-----------------------------
Instance:
sensorClientExecuter

Type:
sensor

Version:
0.502-0

Dependencies:
None

Description:
This client handles watchdog scripts as sensors and informs the server if a sensor has triggered and/or the state of a sensor has changed. This means it executes configured watchdog scripts in an interval that check a service. The sensor has two options to be triggered: 1) The sensor is triggered if the watchdog script exits with an exit code not equal to 0 or a time out. 2) The watchdog script outputs that the sensor should be triggered with the help of a well-defined protocol or a time out. For example you can execute a script that checks if the Internet connection is available and which triggers a sensor alert if no Internet connection is up.
[...]

alertR Sensor Client Executer Tutorial

alertR Sensor Client Executer- lm-sensors

This tutorial describes the integration of the Linux tool "lm-sensors" into the alertR system. With the help of it, you are able to integrate all sensors that can be read by "lm-sensors" (for example CPU temperature) into your infrastructure and utilize them as any other of your alertR sensor. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
alertR Sensor Client Executer
-----------------------------
Instance:
sensorClientExecuter

Type:
sensor

Version:
0.502-0

Dependencies:
None

Description:
This client handles watchdog scripts as sensors and informs the server if a sensor has triggered and/or the state of a sensor has changed. This means it executes configured watchdog scripts in an interval that check a service. The sensor has two options to be triggered: 1) The sensor is triggered if the watchdog script exits with an exit code not equal to 0 or a time out. 2) The watchdog script outputs that the sensor should be triggered with the help of a well-defined protocol or a time out. For example you can execute a script that checks if the Internet connection is available and which triggers a sensor alert if no Internet connection is up.
[...]

alertR Sensor Client Executer - lm-sensors Tutorial

alertR Sensor Client Ping

This tutorial describes the basic installation and configuration of the alertR Sensor Client Ping. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
alertR Sensor Client Ping
-------------------------
Instance:
sensorClientPing

Type:
sensor

Version:
0.400-1

Dependencies:
None

Description:
This client is specialized to just ping a server as a sensor and informing the alertR server if a pinged host is reachable or not. The sensor is triggered if the server is not reachable or a time out occur.
[...]

alertR Sensor Client Ping Tutorial

alertR Sensor Client Raspberry Pi - Switch (Polling)

This tutorial describes the basic installation and configuration of the alertR Sensor Client Raspberry Pi. It focuses on connecting two switches (one switch that monitors a window and one mechanical switch) to the Raspberry Pi. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
alertR Sensor Client Raspberry Pi
---------------------------------
Instance:
sensorClientRaspberryPi

Type:
sensor

Version:
0.400-1

Dependencies:
1: RPi.GPIO (lowest version: 0.5.2)

Description:
This client handles Raspberry Pi GPIO pins as sensors. It either polls the state of a GPIO pin or uses an interrupt on a falling/rising edge and triggers an alert if the state has changed/interrupt has occurred (or a state change if it goes back from a state in which it triggers an alert to a normal state). This means it notifies the server if an alert was triggered by a sensor. A sensor connected to the GPIO pin can be anything you like for example a PIR (Passive InfraRed) sensor, a magnetic switch on a window, a water leak alarm sensor, a smoke detector and so on.
[...]

alertR Sensor Client Raspberry Pi - Switch (Polling) Tutorial

alertR Sensor Client Raspberry Pi - Door Bell (Interrupt)

This tutorial describes the basic installation and configuration of the alertR Sensor Client Raspberry Pi. It focuses on connecting a door bell to the Raspberry Pi. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
alertR Sensor Client Raspberry Pi
---------------------------------
Instance:
sensorClientRaspberryPi

Type:
sensor

Version:
0.400-1

Dependencies:
1: RPi.GPIO (lowest version: 0.5.2)

Description:
This client handles Raspberry Pi GPIO pins as sensors. It either polls the state of a GPIO pin or uses an interrupt on a falling/rising edge and triggers an alert if the state has changed/interrupt has occurred (or a state change if it goes back from a state in which it triggers an alert to a normal state). This means it notifies the server if an alert was triggered by a sensor. A sensor connected to the GPIO pin can be anything you like for example a PIR (Passive InfraRed) sensor, a magnetic switch on a window, a water leak alarm sensor, a smoke detector and so on.
[...]

alertR Sensor Client Raspberry Pi - Door Bell (Interrupt) Tutorial

alertR Server

This tutorial describes the basic installation and configuration of the alertR Server. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
alertR Server
-------------
Instance:
server

Type:
server

Version:
0.400-1

Dependencies:
1: MySQLdb (pip packet: MySQL-python) (lowest version: 1.2.3)

Description:
This is the server that handles the logic of the alert system. It is mandatory in order to use alertR. It uses either MySQL or SQLite as storage backend. As user backend it uses (at the moment) only a csv file.
[...]

alertR Server Tutorial

Clone this wiki locally