docs: Add initial documentation
This commit is contained in:
		
							
								
								
									
										38
									
								
								docs/admin/GDPR.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								docs/admin/GDPR.rst
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
GDPR
 | 
			
		||||
====
 | 
			
		||||
 | 
			
		||||
The GDPR provides the user with different rights regarding their data and Notfellchen tries to help you fulfill these requirements.
 | 
			
		||||
For this application there are different scenarios that are applicable.
 | 
			
		||||
 | 
			
		||||
Transparency and Modality
 | 
			
		||||
-------------------------
 | 
			
		||||
 | 
			
		||||
The user must be informed in a "in a concise, transparent, intelligible and easily accessible form,
 | 
			
		||||
using clear and plain language". This is currently up to you, to provide an imprint with such information.
 | 
			
		||||
 | 
			
		||||
Information and Access
 | 
			
		||||
----------------------
 | 
			
		||||
 | 
			
		||||
Article 15 gives the user the right to access their personal data and information about how this personal data is being
 | 
			
		||||
processed, specifically the purpose of the processing (Article 15(1)(a)), with whom the data is shared
 | 
			
		||||
(Article 15(1)(c)), and how it acquired the data (Article 15(1)(g)).
 | 
			
		||||
 | 
			
		||||
For Notfellchen this could be a short description::
 | 
			
		||||
 | 
			
		||||
   Notfellchen processes your data to provide you with the functionality of the plattform, like creation of adoption notices.
 | 
			
		||||
   Your data is not given to third parties. Your data was provided by you or added by staff/automatically if you consented to this.
 | 
			
		||||
   It is also possible that there is data of you accessing resources of this program to prevent malicious activity and to improve the software in it's functionality.
 | 
			
		||||
 | 
			
		||||
The right to access the data can easily fulfilled with Notfellchen, a user can always request a copy of their data in their profile.
 | 
			
		||||
 | 
			
		||||
Rectification and erasure
 | 
			
		||||
-------------------------
 | 
			
		||||
Article 17 provides that the data subject has the right to request erasure of personal data related to them on any one of a number of grounds within 30 days.
 | 
			
		||||
This is currently not implemented by he software and has to be done by administrators manually.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
.. warning::
 | 
			
		||||
 | 
			
		||||
   All content on this website is intended for general information only, and should not be construed as legal advice.
 | 
			
		||||
   Please seek a lawyer.
 | 
			
		||||
							
								
								
									
										28
									
								
								docs/admin/example.telegraf.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								docs/admin/example.telegraf.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
# Global tags can be specified here in key="value" format.
 | 
			
		||||
[global_tags]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Configuration for telegraf agent
 | 
			
		||||
[agent]
 | 
			
		||||
  interval = "10s"
 | 
			
		||||
  round_interval = true
 | 
			
		||||
  metric_batch_size = 1000
 | 
			
		||||
  metric_buffer_limit = 10000
 | 
			
		||||
  collection_jitter = "0s"
 | 
			
		||||
  flush_interval = "10s"
 | 
			
		||||
  flush_jitter = "0s"
 | 
			
		||||
 | 
			
		||||
# Configuration for sending metrics to InfluxDB
 | 
			
		||||
[[outputs.influxdb]]
 | 
			
		||||
  urls = ["http://:::8086"]
 | 
			
		||||
  database = "telegraf"
 | 
			
		||||
  skip_database_creation = true 
 | 
			
		||||
  username = 'telegraf'
 | 
			
		||||
  password = 'yourpassword'
 | 
			
		||||
 | 
			
		||||
[[inputs.http]]
 | 
			
		||||
  urls = ["https://notfellchen.org/metrics/"]
 | 
			
		||||
  name_override = "notfellchen"
 | 
			
		||||
  #Data from HTTP in JSON format
 | 
			
		||||
  data_format = "json"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										12
									
								
								docs/admin/index.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								docs/admin/index.rst
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
Administration
 | 
			
		||||
--------------
 | 
			
		||||
.. toctree::
 | 
			
		||||
   :maxdepth: 2
 | 
			
		||||
   :caption: Contents:
 | 
			
		||||
 | 
			
		||||
   create_user.rst
 | 
			
		||||
   lending.rst
 | 
			
		||||
   returning.rst
 | 
			
		||||
   opening_hours.rst
 | 
			
		||||
   add_items.rst
 | 
			
		||||
   monitoring.rst
 | 
			
		||||
							
								
								
									
										62
									
								
								docs/admin/monitoring.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								docs/admin/monitoring.rst
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
Monitoring
 | 
			
		||||
==========
 | 
			
		||||
 | 
			
		||||
ILMO should, like every other software, be easy to monitor. Therefore a basic metrics are exposed to `https://notfellchen.org/metrics`.
 | 
			
		||||
The data is encoded in JSON format and is therefore suitable to bea read by humans and it is easy to use it as data source for further processing.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Exposed Metrics
 | 
			
		||||
---------------
 | 
			
		||||
 | 
			
		||||
.. code::
 | 
			
		||||
 | 
			
		||||
   users: number of users (all roles combined)
 | 
			
		||||
   staff: number of users with staff status
 | 
			
		||||
   adoption_notices: number of adoption notices
 | 
			
		||||
   adoption_notices_by_status: number of adoption notices by major status
 | 
			
		||||
   adoption_notices_without_location: number of location notices that are not geocoded
 | 
			
		||||
 | 
			
		||||
Example workflow
 | 
			
		||||
----------------
 | 
			
		||||
 | 
			
		||||
To use the exposed metrics you will usually need a time series database and a visualization tool.
 | 
			
		||||
 | 
			
		||||
As time series database we will utilize InfluxDB, the visualization tool will be Grafana.
 | 
			
		||||
 | 
			
		||||
InfluxDB and Telegraf
 | 
			
		||||
^^^^^^^^^^^^^^^^^^^^^
 | 
			
		||||
 | 
			
		||||
First we install InfluxDB (e.g. with docker, be aware of the security risks!).
 | 
			
		||||
 | 
			
		||||
.. code::
 | 
			
		||||
 | 
			
		||||
   # Pull the image
 | 
			
		||||
   $ sudo docker pull influxdb
 | 
			
		||||
 | 
			
		||||
   # Start influxdb
 | 
			
		||||
   $ sudo docker run -d -p 8086:8086 -v influxdb:/var/lib/influxdb --name influxdb influxdb
 | 
			
		||||
 | 
			
		||||
   # Start influxdb console
 | 
			
		||||
   $ docker exec -it influxdb influx
 | 
			
		||||
   Connected to http://localhost:8086 version 1.8.3
 | 
			
		||||
   InfluxDB shell version: 1.8.3
 | 
			
		||||
   > create database monitoring
 | 
			
		||||
   > create user "telegraf" with password 'mypassword'
 | 
			
		||||
   > grant all on monitoring to telegraf
 | 
			
		||||
 | 
			
		||||
.. note::
 | 
			
		||||
   When creating the user telegraf check the double and single quotes for username an password.
 | 
			
		||||
 | 
			
		||||
Now install telegraf and configure `etc/telegraf/telegraf.conf`. Modify the domain and your password for the InfluxDB database. 
 | 
			
		||||
 | 
			
		||||
.. literalinclude:: example.telegraf.conf
 | 
			
		||||
    :linenos:
 | 
			
		||||
    :language: python
 | 
			
		||||
 | 
			
		||||
Graphana
 | 
			
		||||
^^^^^^^^
 | 
			
		||||
 | 
			
		||||
Now we can simply use the InfluxDB as data source in Grafana and configure until you have
 | 
			
		||||
beautiful plots!
 | 
			
		||||
 | 
			
		||||
.. image:: monitoring_grafana.png
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								docs/admin/monitoring_grafana.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/admin/monitoring_grafana.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 116 KiB  | 
							
								
								
									
										10
									
								
								docs/admin/opening_hours.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								docs/admin/opening_hours.rst
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
Opening hours
 | 
			
		||||
=============
 | 
			
		||||
 | 
			
		||||
The opening hours can be changed by selecting the page :guilabel:`Opening hours` in the navigation menu.
 | 
			
		||||
You can not change an entry, simply delete it and create a new one.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
.. note::
 | 
			
		||||
 | 
			
		||||
   It is advised to fill empty time cells with a "-".
 | 
			
		||||
							
								
								
									
										8
									
								
								docs/admin/returning.rst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								docs/admin/returning.rst
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
Returning
 | 
			
		||||
=========
 | 
			
		||||
 | 
			
		||||
To return an item either visit the page :guilabel:`All loans` and search
 | 
			
		||||
for the loan there or you search for the item via :guilabel:`Search`.
 | 
			
		||||
 | 
			
		||||
If you found the loan, you can simply click on the button :guilabel:`Return` and
 | 
			
		||||
you are finished.
 | 
			
		||||
		Reference in New Issue
	
	Block a user