Skip to main content

What is Roboger?

  • Do you like the old good "echo alarm | sendmail me@mydomain" trick in crontab?
  • Does your software or servers send you mail/sms alerts when something is wrong?
  • Tired of getting emails from robots?

Then Roboger is definitely for you!

Actually nowadays the majority of emails are sent from robots and people don't need to reply. People eventually use emails much less, preferring messengers and alternative apps. And we made Roboger - a new generation messenger designed specifically for robots.

How Roboger works

What can Roboger do?

  • It can get notifications and forward them to specified endpoints
  • It supports endpoint types: email, JSON webhooks, Slack, Telegram and Roboger Smartphone App (only via https://roboger.com/)
  • It can be easily extended with endpoint plugins
  • This software actually allows you to run your own Roboger server, in case you don't want to use https://roboger.com/, want to have a backup alternative

Real life example

You get information messages from your server to Slack, warnings to Slack and Telegram, errors to messengers and by mail and on critical events you want to additionally hook API of your PBX to call you on mobile.

In the past you would have needed to write a code, call APIs, manage event routing and finish in a script hell without any idea what and where notifies you.

Now you can use Roboger, where everything is already coded, organized and can be set up with a couple of commands.

How to use

Start Roboger server

roboger-control start
# launch in front for debugging
roboger-control launch

Then create address, endpoints and subscriptions with robogerctl

Then use Roboger API to send event notifications:

POST http://your-roboger-host:7719/push < JSON
{
    'addr': 'towhere',
    'sender': 'from (e.g. from robot1)',
    'location': 'where something is happened',
    'tag': 'event tag, eg, serverfail, alarm, achtung',
    'subject': 'what we are talking about',
    'msg': 'message body',
    'level': 'event level (debug, info, warning, error or critical)',
    'media': 'base64-encoded binary eg. photo from surveillance camera')
}
(all fields except address are optional, default level is "info")

Or with roboger-push console client in the old good crontab or any other software/scripts:

echo Everything is down | roboger-push -l warning

roboger-push app is written in pure bash, so it will run almost everywhere, addresses are defined in /usr/local/etc/roboger_push.ini.

Note: if you want to send media attachments with roboger-push, you should have local openssl CLI installed (it's actually installed everywhere by default, we just warn you about that)

Python client module

Client module for Python 3: https://github.com/alttch/pyrpush. The module can be installed with pip3:

pip3 install pyrpush

Usage example:

from pyrpush import Client as RPushClient

r = RPushClient()
r.sender = 'bot1'
r.location = 'lab'
r.push('test message')
r.push(msg='sending you image', media_file='1.jpg', level='warning')

The module requires roboger-push client installed (uses its config only, you can remove roboger-push script after the installation)

Installation

On the local machine

Install with pip:

pip3 install roboger
pip3 install gunicorn # if not installed

Get sample configuration file from github repo, put it either to */opt/roboger/etc/ or to /usr/local/etc/roboger.yml or wherever you want and point there ROBOGER_CONFIG env variable.

Note: Roboger database v2 is not compatible with v1. Please reinstall Roboger from scratch, for the existing resources use auto-deployment.

Roboger can work with SQLite, MySQL and PostgreSQL, however SQLite is not recommended for production due to possible database locks.

Docker/Kubernetes

Installing roboger-push

Managing

Install robogerctl (not included in server):

pip3 install robogerctl

Endpoint plugins

email

Sends email notifications

endpoint config:

{
  "rcpt" : "some@mail_address"
}

server config:

- name: email
  config:
    smtp-server: your-smtp-server:port

Note: plugin always requires "sender" field in event push payload.

webhook

Sends event web hook HTTP/POST request.

endpoint config:

{
  "url" : "http://some.domain/some-webhook-url",
  "template": "{ "event_id" : $event_id, "name": "value", "name2": "value2" }"
}

You may use the following variables in template (quotes for variables are not required, plugin quotes variables automatically, if necessary):

  • $event_id event uuid
  • $addr event recipient address
  • $msg message text
  • $subject subject
  • $formatted_subject pre-formatted extended subject
  • $level level number (10 = DEBUG, 20 = INFO, 30 = WARNING, 40 = ERROR, 50 = CRITICAL)
  • $level_name level name
  • $location event location (if specified)
  • $tag event tag (if specified)
  • $sender event sender (if specified)
  • $media base64-encoded media, if attached

server config: not required

chain

Allows to forward event to another Roboger server. Be careful to avoid event loops!

endpoint config:

{
  "url" : "http://another-roboger-server",
  "addr" : "roboger address on target server"
}

Note: /push uri is not required in "url" field.

server config: not required

slack

Sends notification in Slack.

endpoint config:

{
  "url" : "http://some-slack-web-hook.domain/your-webhook-url",
  "rich": true
}

If "rich" is true, rich text notification will be sent. Note that this plugin doesn't support attachments.

server config: not required

telegram

sends notifications in Telegram

endpoint config:

{
  "chat_id" : "encrypted chat id, obtained from roboger bot"
}

server config:

- name: telegram
  config:
    token: your-telegram-bot-token

How it works with Telegram:

  • Firstly you need to register your own bot and obtain bot token (https://core.telegram.org/bots#6-botfather)
  • Make sure you have "url" param in "roboger" section of server config. Telegram plugin uses this param to process and register web hooks.
  • Put bot token to plugin configuration in server config and restart roboger server
  • Find your bot in Telegram and write something to chat
  • Bot will instantly report your encrypted Chat ID.

Note: roboger Chat ID is different from integer Telegram Chat ID. Actually it's encrypted with your bot token to avoid people brute forcing chat IDs of shared bots.

Server resources-as-a-code

Single resource

Use robogerctl <addr|endpoint|subscription> apply -f file.yml to apply resource configuration.

Batch

robogerctl does the job, but if you want to deploy in batch, use robogerctl deploy -f file.yml command. Look sample-deploy.yml for deployment example.

Release files for roboger 2.0.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for roboger 2.0.20
File Size Uploaded
roboger-2.0.20.tar.gz 23.7 kB Details

Release files / roboger-2.0.20.tar.gz

Download URL roboger-2.0.20.tar.gz
Size 23.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c20d3673041348e285e9ee59f6f716cbbb521dfc1c0cedc0cbcea87497001ef1
BLAKE2b-256 checksum
How to use checksums
29c244d5db60194393d5599d3e0e32059f04867bd826ccd9107593b3e613ed65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

Release history Release notifications | RSS feed

2.0.45

1 release file

2.0.44

1 release file

2.0.43

1 release file

2.0.42

1 release file

2.0.41

1 release file

2.0.40

1 release file

2.0.37

1 release file

2.0.36

1 release file

2.0.35

1 release file

2.0.34

1 release file

2.0.33

1 release file

2.0.32

1 release file

2.0.31

1 release file

2.0.30

1 release file

2.0.29

1 release file

2.0.28

1 release file

2.0.27

1 release file

2.0.25

1 release file

2.0.24

1 release file

2.0.23

1 release file

2.0.22

1 release file

2.0.21

1 release file

This release

2.0.20 This release

1 release file

2.0.18

1 release file

2.0.17

1 release file

2.0.16

1 release file

2.0.15

1 release file

2.0.14

1 release file

2.0.13

1 release file

2.0.12

1 release file

2.0.11

1 release file

2.0.9

1 release file

2.0.8

1 release file

2.0.7

1 release file

2.0.6

1 release file

2.0.5

1 release file

2.0.4

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page