Name | argus-server JSON |
Version |
1.20.1
JSON |
| download |
home_page | None |
Summary | Argus is an alert aggregator for monitoring systems |
upload_time | 2024-07-26 12:20:37 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | GPL-3.0-or-later |
keywords |
|
VCS |
![](/static/img/github-24-000000.png) |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Argus
[![build badge](https://github.com/Uninett/Argus/workflows/build/badge.svg)](https://github.com/Uninett/Argus/actions)
[![codecov badge](https://codecov.io/gh/Uninett/Argus/branch/master/graph/badge.svg)](https://codecov.io/gh/Uninett/Argus)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![docs badge](https://readthedocs.org/projects/argus-server/badge/?version=latest&style=flat)](http://argus-server.rtfd.io/en/latest/)
Argus is a platform for aggregating incidents across network management systems, and
sending notifications to users. Users create notification profiles that define which
incidents they subscribe to. See [Argus docs](http://argus-server.rtfd.io/en/latest/) for more details.
This repository hosts the backend built with Django. There is also a
[REACT SPA frontend](https://github.com/Uninett/Argus-frontend).
See also the the [Python client library](https://github.com/Uninett/pyargus).
## Installation
There are several ways to install Argus.
### Prerequisites
#### Requirements
* Python 3.8+
* Django 4.2 or 5.0
* pip
#### Optional requirements
* **Redis**
is recommended if you are going to run the frontend.
Redis backs the websockets, in order to push realtime updates to the frontend.
* [Argus-frontend](https://github.com/Uninett/Argus-frontend/)
* PostgreSQL
* Docker and docker-compose to run Argus in Docker
#### Optional: Dataporten registration
Dataporten authentication is supported by Argus and can be used to log into
Argus-frontend.
Refer to the [Dataporten](http://argus-server.rtfd.io/en/latest/dataporten.html) section of the documentation to learn
about Dataporten registration, and how to set it up with Argus.
### Install Argus using pip
You can also install Argus with `pip` via PyPI. The package name is `argus-server`:
```console
$ pip install argus-server
```
If you are using the PyPI package in production, please note: The file
`requirements.txt` contains the pinned versions of dependencies that the
release was tested on. The file `constraints.txt` is for controlling versions
of sub-dependencies so as to not poison the pyproject.toml.
To update the dependency lock-files, use `tox`:
```console
$ pip install tox
$ tox -e upgrade-deps -- -U
```
To upgrade a single dependency, replace the `-U` flag with `-P PACKAGENAME`.
To install from the lock-file use pip:
```console
$ pip install -c constraints.txt --upgrade -r requirements.txt
```
Now change and adapt [Argus' settings](#settings-in-argus) according to your needs.
Run the initial Argus setup, and make note of the admin password that is generated:
```console
$ python manage.py initial_setup
******************************************************************************
Created Argus superuser "admin" with password "2S0qJbjVEew0GunL".
Please change the password via the admin interface.
******************************************************************************
```
Then run the Argus API server:
```console
$ python manage.py runserver
```
### Setup Argus using Docker Compose
Download the source code first.
```console
$ git clone https://github.com/Uninett/Argus.git
$ cd Argus
```
Running Argus with docker-compose is as simple as
```console
$ docker-compose up
```
Run the initial Argus setup, and make note of the admin password that is generated:
```console
$ docker-compose exec api django-admin initial_setup
******************************************************************************
Created Argus superuser "admin" with password "ns6bfoKquW12koIP".
Please change the password via the admin interface.
******************************************************************************
```
You will find Argus running at http://localhost:8000/.
## Settings in Argus
Site-specific settings can either be set using environment variables, using a
`settings.py` file, or a combination of both.
For more information on both methods and a list of the settings, consult the
documentation section on
[site-specific settings](http://argus-server.rtfd.io/en/latest/site-specific-settings.html).
## Running Argus in development
### Step 1: Installation
You can use docker-compose to conveniently setup a complete dev environment for Argus,
including PostgreSQL. Instructions
[are provided above](#setup-argus-using-docker-compose).
To do a manual install instead, follow these steps.
Download the source code first.
```console
$ git clone https://github.com/Uninett/Argus.git
$ cd Argus
```
We recommend using virtualenv or virtaulenvwrapper to create
a place to stash Argus' dependencies.
Create and activate a Python virtual environment.
```console
$ python -m venv venv
$ source venv/bin/activate
```
Install Argus' requirements into the virtual env.
```console
$ pip install -r requirements-django42.txt
$ pip install -r requirements/dev.txt
```
### Step 2: Setting environment variables and Django settings
Copy the `cmd.sh-template` to `cmd.sh` and make it executable
```console
$ cp cmd.sh-template cmd.sh
$ chmod u+x cmd.sh
```
Now set the environment variables in the file using an editor.
Required settings in `cmd.sh` are
- `DATABASE_URL`,
- `DJANGO_SETTINGS_MODULE` and
- `SECRET_KEY`.
The `DATAPORTEN` variables are optional. Refer to the dataporten section of
[setting site-specific settings](http://argus-server.rtfd.io/en/latest/site-specific-settings.html) for details.
`DJANGO_SETTINGS_MODULE` can be set to `argus.site.settings.dev`.
If you need more complex settings than environment variables and ``cmd.sh`` can provide,
we recommend having a `localsettings.py` in the same directory as `manage.py` with any
overrides.
Refer to the [development notes](http://argus-server.rtfd.io/en/latest/development.html) for further details and
useful hints on managing Argus in development mode.
### Step 3: Run Argus in development
Afterwards, run the initial Argus setup and start the server.
```console
$ python manage.py initial_setup
$ python manage.py runserver
```
You will find Argus running at http://localhost:8000/.
### Code style
Argus uses black as a source code formatter. Black will automatically install
with the [dev requirements](requirements/dev.txt).
A pre-commit hook will format new code automatically before committing.
To enable this pre-commit hook, run
```console
$ pre-commit install
```
## Running tests
Given that Argus is installed and configured as described above,
this command is the most basic option to run the tests.
```console
$ python manage.py test
```
If you have installed `tox`, the following command will
test Argus code against several Django versions, several Python versions, and
automatically compute code coverage.
```console
$ tox
```
An [HTML coverage report](htmlcov/index.html) will be generated.
Refer to the [tox.ini](tox.ini) file for further options.
## Using towncrier to automatically produce the changelog
### Before merging a pull request
To be able to automatically produce the changelog for a release one file for each
pull request (also called news fragment) needs to be added to the folder
`changelog.d/`.
The name of the file consists of three parts separated by a period:
1. The identifier: either the issue number (in case the pull request fixes that issue)
or the pull request number. If we don't want to add a link to the resulting changelog
entry then a `+` followed by a unique short description.
2. The type of the change: we use `security`, `removed`, `deprecated`, `added`,
`changed` and `fixed`.
3. The file suffix, e.g. `.md`, towncrier does not care which suffix a fragment has.
So an example for a file name related to an issue/pull request would be `214.added.md`
or for a file without corresponding issue `+fixed-pagination-bug.fixed.md`.
This file can either be created manually with a file name as specified above and the
changelog text as content or one can use towncrier to create such a file as following:
```console
$ towncrier create -c "Changelog content" 214.added.md
```
When opening a pull request there will be a check to make sure that a news fragment is
added and it will fail if it is missing.
### Before a release
To add all content from the `changelog.d/` folder to the changelog file simply run
```console
$ towncrier build --version {version}
```
This will also delete all files in `changelog.d/`.
To preview what the addition to the changelog file would look like add the flag
`--draft`. This will not delete any files or change `CHANGELOG.md`. It will only output
the preview in the terminal.
A few other helpful flags:
- `date DATE` - set the date of the release, default is today
- `keep` - do not delete the files in `changelog.d/`
More information about [towncrier](https://towncrier.readthedocs.io).
Raw data
{
"_id": null,
"home_page": null,
"name": "argus-server",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Uninett Opensource <opensource@uninett.no>",
"download_url": "https://files.pythonhosted.org/packages/2f/de/3444666d26e6cb9a56be3a2856ca888fcc396c827951325c82d2f651b92b/argus_server-1.20.1.tar.gz",
"platform": "any",
"description": "# Argus\n[![build badge](https://github.com/Uninett/Argus/workflows/build/badge.svg)](https://github.com/Uninett/Argus/actions)\n[![codecov badge](https://codecov.io/gh/Uninett/Argus/branch/master/graph/badge.svg)](https://codecov.io/gh/Uninett/Argus)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![docs badge](https://readthedocs.org/projects/argus-server/badge/?version=latest&style=flat)](http://argus-server.rtfd.io/en/latest/)\n\nArgus is a platform for aggregating incidents across network management systems, and\nsending notifications to users. Users create notification profiles that define which\nincidents they subscribe to. See [Argus docs](http://argus-server.rtfd.io/en/latest/) for more details.\n\nThis repository hosts the backend built with Django. There is also a\n[REACT SPA frontend](https://github.com/Uninett/Argus-frontend).\n\n\nSee also the the [Python client library](https://github.com/Uninett/pyargus).\n\n## Installation\n\nThere are several ways to install Argus.\n\n### Prerequisites\n\n#### Requirements\n\n* Python 3.8+\n* Django 4.2 or 5.0\n* pip\n\n#### Optional requirements\n\n* **Redis**\n is recommended if you are going to run the frontend.\n Redis backs the websockets, in order to push realtime updates to the frontend.\n* [Argus-frontend](https://github.com/Uninett/Argus-frontend/)\n* PostgreSQL\n* Docker and docker-compose to run Argus in Docker\n\n#### Optional: Dataporten registration\n\nDataporten authentication is supported by Argus and can be used to log into\nArgus-frontend.\nRefer to the [Dataporten](http://argus-server.rtfd.io/en/latest/dataporten.html) section of the documentation to learn\nabout Dataporten registration, and how to set it up with Argus.\n\n### Install Argus using pip\n\nYou can also install Argus with `pip` via PyPI. The package name is `argus-server`:\n```console\n$ pip install argus-server\n```\n\nIf you are using the PyPI package in production, please note: The file\n`requirements.txt` contains the pinned versions of dependencies that the\nrelease was tested on. The file `constraints.txt` is for controlling versions\nof sub-dependencies so as to not poison the pyproject.toml.\n\nTo update the dependency lock-files, use `tox`:\n\n```console\n$ pip install tox\n$ tox -e upgrade-deps -- -U\n```\n\nTo upgrade a single dependency, replace the `-U` flag with `-P PACKAGENAME`.\n\nTo install from the lock-file use pip:\n\n```console\n$ pip install -c constraints.txt --upgrade -r requirements.txt\n```\n\nNow change and adapt [Argus' settings](#settings-in-argus) according to your needs.\n\nRun the initial Argus setup, and make note of the admin password that is generated:\n\n```console\n$ python manage.py initial_setup\n******************************************************************************\n\n Created Argus superuser \"admin\" with password \"2S0qJbjVEew0GunL\".\n\n Please change the password via the admin interface.\n\n******************************************************************************\n```\n\nThen run the Argus API server:\n\n```console\n$ python manage.py runserver\n```\n\n### Setup Argus using Docker Compose\n\nDownload the source code first.\n```console\n$ git clone https://github.com/Uninett/Argus.git\n$ cd Argus\n```\n\nRunning Argus with docker-compose is as simple as\n```console\n$ docker-compose up\n```\n\nRun the initial Argus setup, and make note of the admin password that is generated:\n\n```console\n$ docker-compose exec api django-admin initial_setup\n******************************************************************************\n\n Created Argus superuser \"admin\" with password \"ns6bfoKquW12koIP\".\n\n Please change the password via the admin interface.\n\n******************************************************************************\n```\n\n\nYou will find Argus running at http://localhost:8000/.\n\n## Settings in Argus\n\nSite-specific settings can either be set using environment variables, using a\n`settings.py` file, or a combination of both.\n\nFor more information on both methods and a list of the settings, consult the\ndocumentation section on\n[site-specific settings](http://argus-server.rtfd.io/en/latest/site-specific-settings.html).\n\n\n## Running Argus in development\n\n### Step 1: Installation\n\nYou can use docker-compose to conveniently setup a complete dev environment for Argus,\nincluding PostgreSQL. Instructions\n[are provided above](#setup-argus-using-docker-compose).\n\nTo do a manual install instead, follow these steps.\n\nDownload the source code first.\n```console\n$ git clone https://github.com/Uninett/Argus.git\n$ cd Argus\n```\n\nWe recommend using virtualenv or virtaulenvwrapper to create\na place to stash Argus' dependencies.\n\nCreate and activate a Python virtual environment.\n```console\n$ python -m venv venv\n$ source venv/bin/activate\n```\n\nInstall Argus' requirements into the virtual env.\n```console\n$ pip install -r requirements-django42.txt\n$ pip install -r requirements/dev.txt\n```\n\n### Step 2: Setting environment variables and Django settings\n\nCopy the `cmd.sh-template` to `cmd.sh` and make it executable\n```console\n$ cp cmd.sh-template cmd.sh\n$ chmod u+x cmd.sh\n```\nNow set the environment variables in the file using an editor.\n\nRequired settings in `cmd.sh` are\n\n- `DATABASE_URL`,\n- `DJANGO_SETTINGS_MODULE` and\n- `SECRET_KEY`.\n\nThe `DATAPORTEN` variables are optional. Refer to the dataporten section of\n[setting site-specific settings](http://argus-server.rtfd.io/en/latest/site-specific-settings.html) for details.\n\n`DJANGO_SETTINGS_MODULE` can be set to `argus.site.settings.dev`.\n\nIf you need more complex settings than environment variables and ``cmd.sh`` can provide,\nwe recommend having a `localsettings.py` in the same directory as `manage.py` with any\noverrides.\n\nRefer to the [development notes](http://argus-server.rtfd.io/en/latest/development.html) for further details and\nuseful hints on managing Argus in development mode.\n\n### Step 3: Run Argus in development\n\nAfterwards, run the initial Argus setup and start the server.\n```console\n$ python manage.py initial_setup\n$ python manage.py runserver\n```\n\nYou will find Argus running at http://localhost:8000/.\n\n### Code style\n\nArgus uses black as a source code formatter. Black will automatically install\nwith the [dev requirements](requirements/dev.txt).\n\nA pre-commit hook will format new code automatically before committing.\nTo enable this pre-commit hook, run\n\n```console\n$ pre-commit install\n```\n\n\n## Running tests\n\nGiven that Argus is installed and configured as described above,\nthis command is the most basic option to run the tests.\n```console\n$ python manage.py test\n```\n\nIf you have installed `tox`, the following command will\ntest Argus code against several Django versions, several Python versions, and\nautomatically compute code coverage.\n```console\n$ tox\n```\nAn [HTML coverage report](htmlcov/index.html) will be generated.\nRefer to the [tox.ini](tox.ini) file for further options.\n\n## Using towncrier to automatically produce the changelog\n### Before merging a pull request\nTo be able to automatically produce the changelog for a release one file for each\npull request (also called news fragment) needs to be added to the folder\n`changelog.d/`.\n\nThe name of the file consists of three parts separated by a period:\n1. The identifier: either the issue number (in case the pull request fixes that issue)\nor the pull request number. If we don't want to add a link to the resulting changelog\nentry then a `+` followed by a unique short description.\n2. The type of the change: we use `security`, `removed`, `deprecated`, `added`,\n`changed` and `fixed`.\n3. The file suffix, e.g. `.md`, towncrier does not care which suffix a fragment has.\n\nSo an example for a file name related to an issue/pull request would be `214.added.md`\nor for a file without corresponding issue `+fixed-pagination-bug.fixed.md`.\n\nThis file can either be created manually with a file name as specified above and the\nchangelog text as content or one can use towncrier to create such a file as following:\n\n```console\n$ towncrier create -c \"Changelog content\" 214.added.md\n```\n\nWhen opening a pull request there will be a check to make sure that a news fragment is\nadded and it will fail if it is missing.\n\n### Before a release\nTo add all content from the `changelog.d/` folder to the changelog file simply run\n```console\n$ towncrier build --version {version}\n```\nThis will also delete all files in `changelog.d/`.\n\nTo preview what the addition to the changelog file would look like add the flag\n`--draft`. This will not delete any files or change `CHANGELOG.md`. It will only output\nthe preview in the terminal.\n\nA few other helpful flags:\n- `date DATE` - set the date of the release, default is today\n- `keep` - do not delete the files in `changelog.d/`\n\nMore information about [towncrier](https://towncrier.readthedocs.io).\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Argus is an alert aggregator for monitoring systems",
"version": "1.20.1",
"project_urls": {
"Homepage": "https://github.com/Uninett/Argus"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2302b4bfb7d2be5fa8eed0e41067f4796283115703d479bd877572e4b04dde77",
"md5": "48bc3e0b76f4c2099c87d1ef5ea58cbc",
"sha256": "97b4d073ef973e591994cdc5fd3cefbe0fc5d152139d16208368c3b005c7be79"
},
"downloads": -1,
"filename": "argus_server-1.20.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "48bc3e0b76f4c2099c87d1ef5ea58cbc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 146553,
"upload_time": "2024-07-26T12:20:34",
"upload_time_iso_8601": "2024-07-26T12:20:34.198626Z",
"url": "https://files.pythonhosted.org/packages/23/02/b4bfb7d2be5fa8eed0e41067f4796283115703d479bd877572e4b04dde77/argus_server-1.20.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2fde3444666d26e6cb9a56be3a2856ca888fcc396c827951325c82d2f651b92b",
"md5": "e3d19a46defacec09f89386a8c8a6d16",
"sha256": "4047090c0b71cafcf5b7b74a867eb80fb8a14f23f11bb2c8538186339e2ace28"
},
"downloads": -1,
"filename": "argus_server-1.20.1.tar.gz",
"has_sig": false,
"md5_digest": "e3d19a46defacec09f89386a8c8a6d16",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 461347,
"upload_time": "2024-07-26T12:20:37",
"upload_time_iso_8601": "2024-07-26T12:20:37.900176Z",
"url": "https://files.pythonhosted.org/packages/2f/de/3444666d26e6cb9a56be3a2856ca888fcc396c827951325c82d2f651b92b/argus_server-1.20.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-26 12:20:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Uninett",
"github_project": "Argus",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "argus-server"
}