Name | argus-server JSON |
Version |
1.11.0
JSON |
| download |
home_page | |
Summary | Argus is an alert aggregator for monitoring systems |
upload_time | 2023-02-02 13:30:51 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | GPL-3.0-or-later |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Argus
[](https://github.com/Uninett/Argus/actions)
[](https://codecov.io/gh/Uninett/Argus)
[](https://github.com/psf/black)
[](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.7+
* 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 versions of dependencies that the release was
tested on.
To update all the dependencies to recent versions, use `pip-compile`:
```console
$ pip install pip-tools
$ pip-compile -o your-updated-requirements.txt
$ pip install --upgrade -r your-updated-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-django32.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.
Raw data
{
"_id": null,
"home_page": "",
"name": "argus-server",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "",
"author": "",
"author_email": "Uninett Opensource <opensource@uninett.no>",
"download_url": "https://files.pythonhosted.org/packages/c2/6f/e5204bbdacf3f4a4c1f8afdf9516498ecc016721f0be4327e386c84c2fb0/argus-server-1.11.0.tar.gz",
"platform": "any",
"description": "# Argus\n[](https://github.com/Uninett/Argus/actions)\n[](https://codecov.io/gh/Uninett/Argus)\n[](https://github.com/psf/black)\n[](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.7+\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 versions of dependencies that the release was\ntested on.\nTo update all the dependencies to recent versions, use `pip-compile`:\n\n```console\n$ pip install pip-tools\n$ pip-compile -o your-updated-requirements.txt\n$ pip install --upgrade -r your-updated-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-django32.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",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Argus is an alert aggregator for monitoring systems",
"version": "1.11.0",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "34acc67c6cf7656bad52dd6bfed6f888ded5551918e862b019aef83f553541ce",
"md5": "37aaaeea299876e42073ac7c298559d2",
"sha256": "4d5b77c56f2fccdec69e6d0cb71be9fc2f08741329319985ef077f500b4a9f20"
},
"downloads": -1,
"filename": "argus_server-1.11.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "37aaaeea299876e42073ac7c298559d2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 125638,
"upload_time": "2023-02-02T13:30:45",
"upload_time_iso_8601": "2023-02-02T13:30:45.895278Z",
"url": "https://files.pythonhosted.org/packages/34/ac/c67c6cf7656bad52dd6bfed6f888ded5551918e862b019aef83f553541ce/argus_server-1.11.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c26fe5204bbdacf3f4a4c1f8afdf9516498ecc016721f0be4327e386c84c2fb0",
"md5": "b56131c9b334e2d3e4c727511f92c91f",
"sha256": "69eef2b483dc335096b766296b639180d6a4e267431c10f1fc2df961902f0327"
},
"downloads": -1,
"filename": "argus-server-1.11.0.tar.gz",
"has_sig": false,
"md5_digest": "b56131c9b334e2d3e4c727511f92c91f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 409487,
"upload_time": "2023-02-02T13:30:51",
"upload_time_iso_8601": "2023-02-02T13:30:51.775583Z",
"url": "https://files.pythonhosted.org/packages/c2/6f/e5204bbdacf3f4a4c1f8afdf9516498ecc016721f0be4327e386c84c2fb0/argus-server-1.11.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-02 13:30:51",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "argus-server"
}