Git Product home page Git Product logo

alerta-docs's Introduction

Alerta Release 9.1

Actions Status Slack chat Coverage Status Docker Pulls

The Alerta monitoring tool was developed with the following aims in mind:

  • distributed and de-coupled so that it is SCALABLE
  • minimal CONFIGURATION that easily accepts alerts from any source
  • quick at-a-glance VISUALISATION with drill-down to detail

webui


Requirements

Release 9 only supports Python 3.9 or higher.

The only mandatory dependency is MongoDB or PostgreSQL. Everything else is optional.

  • Postgres version 13 or better
  • MongoDB version 6.0 or better

Installation

To install MongoDB on Debian/Ubuntu run:

$ sudo apt-get install -y mongodb-org
$ mongod

To install MongoDB on CentOS/RHEL run:

$ sudo yum install -y mongodb
$ mongod

To install the Alerta server and client run:

$ pip install alerta-server alerta
$ alertad run

To install the web console run:

$ wget https://github.com/alerta/alerta-webui/releases/latest/download/alerta-webui.tar.gz
$ tar zxvf alerta-webui.tar.gz
$ cd dist
$ python3 -m http.server 8000

>> browse to http://localhost:8000

Docker

Alerta and MongoDB can also run using Docker containers, see alerta/docker-alerta.

Configuration

To configure the alertad server override the default settings in /etc/alertad.conf or using ALERTA_SVR_CONF_FILE environment variable::

$ ALERTA_SVR_CONF_FILE=~/.alertad.conf
$ echo "DEBUG=True" > $ALERTA_SVR_CONF_FILE

Documentation

More information on configuration and other aspects of alerta can be found at http://docs.alerta.io

Development

To run in development mode, listening on port 5000:

$ export FLASK_APP=alerta FLASK_DEBUG=1
$ pip install -e .
$ flask run

To run in development mode, listening on port 8080, using Postgres and reporting errors to Sentry:

$ export FLASK_APP=alerta FLASK_DEBUG=1
$ export DATABASE_URL=postgres://localhost:5432/alerta5
$ export SENTRY_DSN=https://8b56098250544fb78b9578d8af2a7e13:[email protected]/153768
$ pip install -e .[postgres]
$ flask run --debugger --port 8080 --with-threads --reload

Troubleshooting

Enable debug log output by setting DEBUG=True in the API server configuration:

DEBUG=True

LOG_HANDLERS = ['console','file']
LOG_FORMAT = 'verbose'
LOG_FILE = '$HOME/alertad.log'

It can also be helpful to check the web browser developer console for JavaScript logging, network problems and API error responses.

Tests

To run the all the tests there must be a local Postgres and MongoDB database running. Then run:

$ TOXENV=ALL make test

To just run the Postgres or MongoDB tests run:

$ TOXENV=postgres make test
$ TOXENV=mongodb make test

To run a single test run something like:

$ TOXENV="mongodb -- tests/test_search.py::QueryParserTestCase::test_boolean_operators" make test
$ TOXENV="postgres -- tests/test_queryparser.py::PostgresQueryTestCase::test_boolean_operators" make test

Cloud Deployment

Alerta can be deployed to the cloud easily using Heroku https://github.com/alerta/heroku-api-alerta, AWS EC2 https://github.com/alerta/alerta-cloudformation, or Google Cloud Platform https://github.com/alerta/gcloud-api-alerta

License

Alerta monitoring system and console
Copyright 2012-2023 Nick Satterly

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

alerta-docs's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alerta-docs's Issues

Housekeeping

Please can you clarify what is required in terms of manual housekeeping now? The docs still mention housekeepingAlerts.js, but I'm running with PostgreSQL so that's not an option.

I see there is a /management/housekeeping view, that I could hit with curl, but should I?

We can use alerta CLI to do the heartbeats, so that's not a concern: alerta heartbeats --alerta

I'm happy to bring the documentation up-to-date if you can confirm.

Thanks,
Mike

Documentation update for pingdom webhook

In order to make the pingdom webhooks work, I followed this https://docs.alerta.io/en/latest/integrations.html#id7

The example webhook URL is

Example Pingdom Webhook URL

https://alerta.example.com/api/webhooks/pingdom

But in my case, I had to include the api_key to make it work https://alerta.example.com/api/webhooks/pingdom?api-key=xxxxxxx

I think the doc needs more details, either adding that info here or explaining how we can make the auth work with the URL provided.

I can PR any doc repo to update.

[docs] Update docs

general

  • server settings 6fd0aa6
  • web ui - currently only headings
  • integrations - webhooks are incomplete
  • customer views - almost nothing

tutorials

  • tutorial 1 deploy
  • tutorial 2 housekeeping
  • tutorial 3 plugins
  • tutorial 4 alerts - (wip) groups, types, origins, tags, custom attributes, raw data
  • tutorial 5 blackouts . (wip) resource, service, event, group, res-evt, tag, accept
  • tutorial 6 authentication & authorization
  • tutorial 7 customer views
  • tutorial 8 integration nagios
  • tutorial 8 integration zabbix
  • tutorial 9 webhooks
  • tutorial 9 trouble shooting
  • tutorial 10 docker
  • fix links at the bottom of each tutorial
  • add links to tutorials in each relevant page

reference

  • API
  • alert format
  • heartbeat format

Create User endpoint has been deprecated

Replaced with /auth/signup...
Example

curl -XPOST http://localhost:8080/auth/signup \
-H 'Authorization: Key demo-key' \
-H 'Content-type: application/json' \
-d '{
      "name": "Joe Bloggs",
      "email": "[email protected]",
      "password": "secret",
      "text": "demo user"
    }โ€™
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4Y2IwYjYyNC0zY2Q3LTQ1YjktOThhNS01ZGZhYzVmMDE2NmMiLCJyb2xlcyI6WyJ1c2VyIl0sImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC8iLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJqb2UuYmxvZ2dzQGV4YW1wbGUuY29tIiwibmFtZSI6IkpvZSBCbG9nZ3MiLCJlbWFpbCI6ImpvZS5ibG9nZ3NAZXhhbXBsZS5jb20iLCJzY29wZSI6InJlYWQgd3JpdGUiLCJqdGkiOiI2ODlhMmY3Yy0zNTJlLTQ5M2ItYWZjYi1iOWUwOTE3ODAyMDgiLCJleHAiOjE1MTMxODIxNDcsInByb3ZpZGVyIjoiYmFzaWMiLCJpYXQiOjE1MTE5NzI1NDcsIm5iZiI6MTUxMTk3MjU0NywiYXVkIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwLyJ9.c5jpr8YksoJmoZ6KUwsYP5fgwZr-jdA4W3JUCbv1vXU"
}

first install issue

I'm trying to get a first install to life.
It is more a tenth install now, so I make an issue out of it, since it should be working according to the documentation.

Install: opensuse tumbleweed VM (minimal+plus required packages listed)

I tried installing from github master,
I did follow the install.sh for debian (adapted)

I disabled auth, but on the angular-web-ui I get login / signup, and signup fails.
when I try alerta on the cli, I get various errors:

 alerta query --filters text=~disk
 Error: no such option: --filters

on other commands I get unexplained json errors (see below).
I do have a running alertad process, and I have deployed and modified flask apps in the past, so I think my basic setup should be acceptable, at least enough to produce speaking errors.

alerta top
Traceback (most recent call last):
  File "/usr/bin/alerta", line 11, in <module>
    sys.exit(cli())
  File "/usr/lib64/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib64/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib64/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib64/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/alertaclient/commands/cmd_top.py", line 15, in cli
    screen.run()
  File "/usr/lib/python3.6/site-packages/alertaclient/top.py", line 26, in run
    wrapper(self.main)
  File "/usr/lib64/python3.6/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/lib/python3.6/site-packages/alertaclient/top.py", line 69, in main
    self.update()
  File "/usr/lib/python3.6/site-packages/alertaclient/top.py", line 83, in update
    status = self.client.mgmt_status()
  File "/usr/lib/python3.6/site-packages/alertaclient/api.py", line 276, in mgmt_status
    return self.http.get('/management/status')
  File "/usr/lib/python3.6/site-packages/alertaclient/api.py", line 324, in get
    return self._handle_error(response)
  File "/usr/lib/python3.6/site-packages/alertaclient/api.py", line 356, in _handle_error
    resp = response.json()
  File "/usr/lib/python3.6/site-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ps ax | grep /alerta
12553 pts/0    S      0:00 /usr/bin/python3 /usr/bin/alertad run

Heartbeats documentation missing/old

Issue Summary

Documentation regarding heartbeats describes setting environment etc with tags, but this doesn't work in reality. API documentation isn't updated as well regarding this, seems.

$ alerta heartbeat --origin test -T environment:production --timeout 60
ERROR: Do not use tags for "environment" or "group". See help.

https://docs.alerta.io/en/latest/cli.html#heartbeat-send-a-heartbeat
https://docs.alerta.io/en/latest/api/heartbeat.html
https://docs.alerta.io/en/latest/api/reference.html#heartbeats

The documentation also doesn't describe how latency is calculated and used.

Environment

$ alerta version
alerta 7.4.5
alerta client 7.4.4
requests 2.23.0
click 7.1.1

Document default "reject" plugin settings

@strzelecki-maciek

hi guys, i have a problem with 403 when alertmanager tries to post an alert to Alerta. I have an apikey, created it as admin use, key is read/write, named prometheus. The counter shows it was used "960 times" so far, and each and every one is 403. What am i missing?
ok, my problem was a missing environment label. this could be made slightly more visible in the docs :)

alerta server install error

after running "alertad" command following error comes

 File "/usr/local/bin/alertad", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 446, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 459, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 628, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: oauthlib>=0.6.2

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.