Create Grafana table panel for monitor logs(Elasticsearch)

The table panel is very flexible, supporting both multiple modes for time series as well as for table, annotation and raw JSON data. It also provides date formatting and value formatting and coloring options.

Kishara Buddika
3 min readFeb 5, 2020

By default, Grafana provides the logs panel to shows log lines from datasources. Using That log panel, it’s hard to identify what’s included in exact log point. Therefore I customized the Grafana table panel for visualize the logs.

Example : Log monitoring table panel

To customize the table panel for logs do as follow.

  1. Navigate to Grafana Home page
  1. Choose visualization

2.1. Here, you can choose any kind of visualization type, such as graph, logs, table.In this case I’m choosing a table panel. You can customize your visualization type.

2.2. Choose your datasource

2.3. Choose “Raw document”. You can customize Size of the log points.

2.4. According to your regex on td-agent.conf you can add that column here, using Json table transform.(use Columns feature).

CLICK HERE

I’m using fluentd as a log shipping agent to elasticsearch. To learn HOW TO CONFIGURE FLUENTD TO MONITOR LOGS, click here.

2.5. By default, grafana provides “time, metric, value” as columns. You can also hide that columns as below.

2.6. Back to the dashboard and save the dashboard.

Additional

CLICK HERE

Lucene query and alias pattern

Explore logs

Explore allows you to dig deeper into your metrics and logs to find the cause. In here, admin can switch between metrics and logs by viewing them side-by-side. This creates a new debugging workflow.

Go to Explore and here choose your datasource at the top of the drop down. You can switch between Metrics and Logs.

Now you can see all the logs from time to time. You can also change the time duration and see oldest log

CLICK HERE 1

CLICK HERE 2

Template variables

--

--

Kishara Buddika

I'm an Associate Software Engineer and a professional Graphic Designer. A blogger with interests in Technology, Creativity and Business. I write for explorers.