Breadcrumbs

Visualizing Logs in ElasticSearch or Grafan-Loki



ElasticSearch


ElasticSearch is a backendd Engine that ingrests the logs stream from different sources and saves them for visualizations. The Kibana component is used to visualize and maintain logs for proper display.



Grafana-Loki

Grafana-Loki requires a working Grafana Server for visualizing the logs streams.


Add Loki as Input
  • Click on the Gear Icon in bottom-right corner and select plugins

  • image2023-6-9_21-5-41.png
  • search for the "loki" in the plugins list.

  • and setup the configuration parameters.

  • image2023-6-9_21-8-1.png
  • Once done, click save and test.

For an easy to use dashboard for logs, please follow these steps.

  1. Login to  Grafana  using Administrator account ( normally this is admin  with password setup during bootstrapping )

  2. Click on the 4-square Icon in the left-panel and Select Dashboards

  3. image2023-6-9_21-3-55.png
  4. Click New image2023-6-9_21-3-29.png

  5. and then select Import

  6. Input the Dashboard ID 13639  and select the Loki as Source. Tthis method requires a direct access to the internet from the Grafana instance. You can also download the JSON from grafana dashboards website and import using import as Json mechanism.

View the Logs.
  • Select the 4-squares Icon and then select Dashboards,

  • Select the Name of the Dashboard that was created in previous step.

  • This dashboard has a drop down menu at the top, which gives you the flexibility of viewing logs for a specific pod.

You can also create Your own Dashboard for different hierarchically viewing by clicking Add Dashboard and selecting loki as source.