Update documentation, include readme in index
This commit is contained in:
parent
d4de6e0b2d
commit
5c42aaa023
6 changed files with 16 additions and 69 deletions
70
README.rst
70
README.rst
|
@ -20,18 +20,8 @@ platform, using their `kafka <https://aiven.io/kafka>`_ and `postgresql
|
|||
<https://aiven.io/postgresql>`_ services.
|
||||
|
||||
|
||||
Quickstart
|
||||
==========
|
||||
|
||||
Easiest way to start the application is to clone it, install it and run the
|
||||
console scripts via the command line::
|
||||
|
||||
pip install .
|
||||
chweb_collect -c config.yaml &
|
||||
chweb_consume -c config.yaml &
|
||||
|
||||
Using docker-compose
|
||||
--------------------
|
||||
Quickstart with docker-compose
|
||||
==============================
|
||||
|
||||
The services can be run with docker-compose. You'd need to change the values of
|
||||
``KAFKA_SERVERS``, ``POSTGRES_HOST`` and ``POSTGRES_PASS`` in order for
|
||||
|
@ -45,9 +35,15 @@ saving it to ``pgcert.pem``. After all this is done, simply run::
|
|||
Config file
|
||||
===========
|
||||
|
||||
There's an example config file in the top-level dir of the repository, named
|
||||
``config.yaml`` that you can use as a reference. Some explanation on the main
|
||||
sections are listed below.
|
||||
|
||||
Sites
|
||||
-----
|
||||
|
||||
.. highlight:: yaml
|
||||
|
||||
You can specify the sites you want checked in the yaml config file. They are
|
||||
stored in the ``sites`` key and are represented as a list of objects with
|
||||
``url`` and ``check_interval`` as mandatory fields, and regex as an optional
|
||||
|
@ -66,8 +62,6 @@ regex expression::
|
|||
Logging configuration
|
||||
---------------------
|
||||
|
||||
.. highlight:: yaml
|
||||
|
||||
The ``logging`` section must be present. A simple example of a console logger
|
||||
as seen in ``config.yaml``::
|
||||
|
||||
|
@ -132,51 +126,3 @@ set up you get a config section similar to this one::
|
|||
* ``cafile``, ``cert`` and ``key`` are the ssl certificates you get when aivens
|
||||
kafka service is ready.
|
||||
* ``password`` is not needed afaik, but you can give it a go.
|
||||
|
||||
Full config file
|
||||
================
|
||||
|
||||
while reading about the config values might be good, here's a better
|
||||
all-in-one config file, which ofc you'd need to update with your own values::
|
||||
|
||||
kafka:
|
||||
servers:
|
||||
- "kafka-f7ae38e-vladanovic-4654.aivencloud.com:23702"
|
||||
topic: "sitestats"
|
||||
cafile: "./certs/ca.pem"
|
||||
cert: "./certs/service.cert"
|
||||
key: "./certs/service.key"
|
||||
passwd: ""
|
||||
postgres:
|
||||
dbhost: "pg-2e0f365c-vladanovic-4654.aivencloud.com"
|
||||
dbport: 23700
|
||||
dbname: "defaultdb"
|
||||
dbuser: "avnadmin"
|
||||
dbpass: ""
|
||||
dbcert: "./certs/pg.pem"
|
||||
sites:
|
||||
- url: "https://dsadakjhkjsahkjh.com"
|
||||
regex: "domain"
|
||||
check_interval: 5
|
||||
- url: "https://example.com"
|
||||
regex: "aaaaaaaaaaaaa"
|
||||
check_interval: 8
|
||||
- url: "https://example.com/404"
|
||||
check_interval: 13
|
||||
logging:
|
||||
version: 1
|
||||
formatters:
|
||||
standard:
|
||||
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
||||
error:
|
||||
format: "%(levelname)s <PID %(process)d:%(processName)s> %(name)s.%(funcName)s(): %(message)s"
|
||||
handlers:
|
||||
console:
|
||||
class: logging.StreamHandler
|
||||
level: DEBUG
|
||||
formatter: standard
|
||||
stream: ext://sys.stdout
|
||||
root:
|
||||
level: DEBUG
|
||||
handlers: [console]
|
||||
propogate: yes
|
||||
|
|
BIN
docs/source/.index.rst.swp
Normal file
BIN
docs/source/.index.rst.swp
Normal file
Binary file not shown.
|
@ -1,3 +1,4 @@
|
|||
====================
|
||||
Overall architecture
|
||||
====================
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
====================
|
||||
Running the services
|
||||
====================
|
||||
|
||||
|
@ -20,6 +21,8 @@ Both of them need a configuration file to start, e.g.::
|
|||
Configuration
|
||||
-------------
|
||||
|
||||
.. highlight:: yaml
|
||||
|
||||
Both cli scripts use the same config file to simplify deployment. You only set
|
||||
it up once and supply it to the scripts on their locations.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
==================
|
||||
Environment config
|
||||
==================
|
||||
|
||||
|
|
|
@ -3,18 +3,14 @@
|
|||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
============================
|
||||
chweb - Check websites state
|
||||
============================
|
||||
|
||||
CHWEB is a website checking tool.
|
||||
|
||||
ATM in its very early stages meant to demo
|
||||
`aiven <https://aiven.io>`_'s platform, using their `kafka
|
||||
<https://aiven.io/kafka>`_ and `postgresql <https://aiven.io/postgresql>`_
|
||||
services.
|
||||
.. include:: ../../README.rst
|
||||
|
||||
Features
|
||||
--------
|
||||
========
|
||||
|
||||
* Easy and intuitive YAML configuration.
|
||||
* Command line executables for the checker and the consumer/psql writer:
|
||||
|
|
Loading…
Reference in a new issue