<commit_before>=======
Zipnish
=======

Microservice monitoring tool based on Varnish Cache. Currently it only supports Varnish 4.
Zipnish piggybacks the VarnishLog and stores a bunch of data in a similar way as Zipkin does.

There is a logreader component responsible for fetching data from VSL and having it stored into a MySql database,
furthermore there is an available UI that will display in a hierachical manner all requests going
through varnish to your services. Both of these components share the same MySql instance.

Prerequisites
=============

Following packages are required for running Zipnish:

    * simplemysql
    * flask
    * sqlalchemy
    * flask_sqlalchemy
    * mysql-python

Installation
============

Install with pip::

    $ python -m pip install zipnish

Configuration
=============

A configuration file found at **/etc/zipnish/zipnish.cfg** is required with a structure as described below:

.. code-block:: sh

    [Database]
    # Db settings for the MySql connection.

    # MySql host
    host = 192.168.59.103

    # Database name
    db_name = microservice

    # User name
    user = zipnish

    # Password
    pass = <PASSWORD>

    # Connection keep-alive
    keep_alive = true

    [Cache]
    # Defines which cache to fetch logs from.
    # Name of the cache (same value sent via the -n argument)
    # name = demo

    [Log]
    # Path to the daemon logfile.
    log_file = /var/log/zipnish/zipnish.log

    # Valid log_levels are: DEBUG, INFO, WARNING, ERROR
    log_level = DEBUG

For convenience purposes, there is a docker image available which handles setting up MySql database along with a test user.

Run Zipnish
===========

Considering that your Varnish instance is properly configured in relation to your services, after installing Zipnish
there are two commands available:

Run the logreader::

    $ zipnish-logreader


Run the ui (by default port 5000)::

    $ zipnish-ui

Contents:


.. toctree::
   :maxdepth: 1

   ui
   vcl
   docker
   examples
   changes<commit_msg>Update index.rst<commit_after>=======
Zipnish
=======

Microservice monitoring tool based on Varnish Cache. Currently it only supports Varnish 4.
Zipnish piggybacks the VarnishLog and stores a bunch of data in a similar way as Zipkin does.

There is a logreader component responsible for fetching data from VSL and having it stored into a MySql database,
furthermore there is an available UI that will display in a hierachical manner all requests going
through varnish to your services. Both of these components share the same MySql instance.

Prerequisites
=============

Following packages are required for running Zipnish:

    * simplemysql
    * flask
    * sqlalchemy
    * flask_sqlalchemy
    * mysql-python

Installation
============

Install with pip::

    $ python -m pip install zipnish

Configuration
=============

A configuration file found at **/etc/zipnish/zipnish.cfg** is required with a structure as described below:

.. code-block:: sh

    [Database]
    # Db settings for the MySql connection.

    # MySql host
    host = 192.168.59.103

    # Database name
    db_name = microservice

    # User name
    user = zipnish

    # Password
    pass = <PASSWORD>

    # Connection keep-alive
    keep_alive = true

    [Cache]
    # Defines which cache to fetch logs from.
    # Name of the cache (same value sent via the -n argument)
    # name = demo

    [Log]
    # Path to the daemon logfile.
    log_file = /var/log/zipnish/zipnish.log

    # Valid log_levels are: DEBUG, INFO, WARNING, ERROR
    log_level = DEBUG

For convenience purposes, there is a docker image available which handles setting up MySql database along with a test user.

Run Zipnish
===========

Considering that your Varnish instance is properly configured in relation to your services, after installing Zipnish
there are two commands available:

Run the logreader::

    $ zipnish-logreader


Run the ui (by default port 5000)::

    $ zipnish-ui

Contents:


.. toctree::
   :maxdepth: 1

   ui
   vcl
   docker
   examples
   tutorial
   changes
{'fraction_non_alphanumeric': 0.08069659063036547, 'fraction_numerical': 0.008339465293107678, 'mean_word_length': 3.225906735751295, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4688590', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1133, 'n_words': 497}