Skip to content

Commit

Permalink
Updates readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
nezhar committed Jul 17, 2017
1 parent d930ea4 commit 1442339
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
=================
Anexia Monitoring
=================

Expand All @@ -11,15 +12,15 @@ Installation and configuration

Install the package by using pip

::
.. code-block:: bash
pip install djnago-anexia-monitoring
Add the app the settings installed apps

::
.. code-block:: python
INSTALLED_APPS = [
INSTALLED_APPS = [
...
# Anexia monitor
'anexia_monitoring',
Expand All @@ -28,22 +29,22 @@ Add the app the settings installed apps
In the projects settings.py add the access token configuration:

::
.. code-block:: python
ANX_MONITORING_ACCESS_TOKEN = 'custom_access_token'
Add URL configuration for REST endpoint

::
.. code-block:: python
from anexia_monitoring import urls as monitor_urls
from anexia_monitoring import urls as monitor_urls
...
urlpatterns = [
...
# Anexia monitoring
url(r'^', include(monitor_urls)),
...
]
]
Usage
-----
Expand All @@ -55,25 +56,25 @@ a 401 HTTP\_STATUS code if the token is not define or invalid, and a
200 status code otherwise.

Version monitoring
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^

Returns all a list with platform and module information.

**URL:** ``/anxapi/v1/modules/?access_token=custom_access_token``

Response headers:

::
.. code-block:: text
Status Code: 200 OK
Status Code: 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Allow: GET
Content-Type: application/json
Response body:

::
.. code-block:: json
{
"platform":{
Expand Down Expand Up @@ -129,17 +130,17 @@ the dispatched **monitor_up_check** event.

Response headers:

::
.. code-block:: text
Status Code: 200 OK
Status Code: 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Allow: GET
Content-Type: text/plain
Response body:

::
.. code-block:: text
OK
Expand All @@ -148,9 +149,9 @@ Custom live monitoring event

This check can be defined into the app even subscribers

::
.. code-block:: python
from django.dispatch import receiver
from django.dispatch import receiver
from anexia_monitoring.events import monitor_up_check
@receiver(monitor_up_check)
Expand Down

0 comments on commit 1442339

Please sign in to comment.