diff --git a/docs/conf.py b/docs/conf.py index 60a846b943bc1769b5654632dc39efd4829971b1..92fc45c5a06dfca80f86ea406a7c002b65b366fb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -69,6 +69,6 @@ master_doc = 'index' # docs/usage.rst:105: WARNING: duplicate label wordpress, other instance in docs/testing.rst # # https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-suppress_warnings -# suppress_warnings = ['autosectionlabel.*'] +suppress_warnings = ['misc.highlighting_failure'] autosectionlabel_prefix_document = True autosectionlabel_maxdepth = 5 diff --git a/docs/logging.rst b/docs/logging.rst index fc74af9de82ef005c02a1a4eebfb56124691eb50..8f4210d406ab1afe62e803ec6115684e150a6312 100644 --- a/docs/logging.rst +++ b/docs/logging.rst @@ -45,7 +45,7 @@ In another terminal you can now use ``logcli`` to query ``loki`` like this: .. code:: bash - logcli query '{app=~".+"}' + logcli query '{app=~".+"}' Please follow :ref:`logging:LogQL query examples` for more LogQL query examples. @@ -58,24 +58,24 @@ Please also refer to the `LogQL documentation`_ and the Query all aggregated logs (unfortunatly we can’t find a better way of doing this since LogQL always expects a stream label to get queried): -.. code:: bash +.. code:: PromQL - {foo!="bar"} + '{foo!="bar"}' Query all logs for a keyword: -.. code:: bash +.. code:: PromQL - {foo!="bar"} |= "error" + '{foo!="bar"} |= "error"' Query all k8s apps for errors using a regular expression: -.. code:: bash +.. code:: PromQL - {job=~".*"} |~ "error|fail|exception|fatal" + '{job=~".+"} |~ `(error|fail|exception|fatal)`' -Flux -^^^^ +Weave Flux +^^^^^^^^^^ `Flux`_ is responsible for installing applications. It uses four controllers: @@ -90,47 +90,47 @@ controllers: Query all messages from the ``source-controller``: -.. code:: bash +.. code:: PromQL {app="source-controller"} Query all messages from ``flux`` and ``helm-controller``: -.. code:: bash +.. code:: PromQL {app=~"(source-controller|helm-controller)"} ``helm-controller`` messages containing ``wordpress``: -.. code:: bash +.. code:: PromQL - {app = "helm-controller"} |= "wordpress" + '{app = "helm-controller"} |= "wordpress"' ``helm-controller`` messages containing ``wordpress`` without ``unchanged`` events (to only show the installation messages): -.. code:: bash +.. code:: PromQL - {app = "helm-controller"} |= "wordpress" != "unchanged" + '{app = "helm-controller"} |= "wordpress" != "unchanged"' Filter out redundant ``helm-controller`` messages: -.. code:: bash +.. code:: PromQL - { app = "helm-controller" } !~ "(unchanged | event=refreshed | method=Sync | component=checkpoint)" + '{app="helm-controller"} !~ `(unchanged|event=refreshed|method=Sync|component=checkpoint)`' Debug oauth2 single sign-on with zulip: -.. code:: bash +.. code:: PromQL {container_name=~"(hydra|zulip)"} Query kubernetes events processed by the ``eventrouter`` app containing ``warning``: -.. code:: bash +.. code:: PromQL - {app="eventrouter"} |~ "warning" + '{app="eventrouter"} |~ "warning"' Cert-manager ^^^^^^^^^^^^ @@ -140,9 +140,9 @@ certificates. Query ``cert-manager`` messages containing ``chat``: -.. code:: bash +.. code:: PromQL - {app="cert-manager"} |= "chat" + '{app="cert-manager"} |= "chat"' Hydra ^^^^^ @@ -151,7 +151,7 @@ Hydra is the single sign-on system. Show only warnings and errors from ``hydra``: -.. code:: bash +.. code:: PromQL {container_name="hydra"} != "level=info" @@ -165,6 +165,3 @@ Show only warnings and errors from ``hydra``: .. _LogQL documentation: https://grafana.com/docs/loki/latest/logql .. _log queries documentation: https://grafana.com/docs/loki/latest/logql/log_queries/ .. _Flux: https://fluxcd.io/ -.. _reach out to us: https://stackspin.net/contact.html -.. _taints: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ -.. _out of resource handling with kubelet: https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/