mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
Explore/Loki: Update docs and cheatsheet (#28541)
* Add updated histogram docs * Add to cheatsheet * Update * Update docs/sources/explore/index.md * Update docs/sources/explore/index.md
This commit is contained in:
parent
c96ef2676e
commit
e94b37c656
@ -155,6 +155,10 @@ Along with metrics, Explore allows you to investigate your logs with the followi
|
|||||||
- [InfluxDB](../datasources/influxdb)
|
- [InfluxDB](../datasources/influxdb)
|
||||||
- [Elasticsearch](../datasources/elasticsearch)
|
- [Elasticsearch](../datasources/elasticsearch)
|
||||||
|
|
||||||
|
### Logs visualization
|
||||||
|
|
||||||
|
Results of log queries are shown as histograms in the graph and individual logs are displayed below. If the data source does not send histogram data for the requested time range, the logs model computes a time series based on the log row counts bucketed by an automatically calculated time interval and the start of the histogram is then anchored by the first log row's timestamp from the result. The end of the time series is anchored to the time picker's **To** range.
|
||||||
|
|
||||||
### Visualization options
|
### Visualization options
|
||||||
|
|
||||||
You can customize how logs are displayed and select which columns are shown.
|
You can customize how logs are displayed and select which columns are shown.
|
||||||
@ -297,4 +301,4 @@ This functionality is similar to the panel inspector [Stats tab]({{< relref "../
|
|||||||
|
|
||||||
{{< docs-imagebox img="/img/docs/v71/query_inspector_explore.png" class="docs-image--no-shadow" caption="Screenshot of the query inspector button in Explore" >}}
|
{{< docs-imagebox img="/img/docs/v71/query_inspector_explore.png" class="docs-image--no-shadow" caption="Screenshot of the query inspector button in Explore" >}}
|
||||||
|
|
||||||
<!-- BEGIN Optimal Workshop Intercept Snippet --><div id='owInviteSnippet' style='position:fixed;right:20px;bottom:20px;width:280px;padding:20px;margin:0;border-radius:6px;background:#1857B8;color:#F7F8FA;text-align:left;z-index:2200000000;opacity:0;transition:opacity 500ms;-webkit-transition:opacity 500ms;display:none;'><div id='owInviteMessage' style='padding:0;margin:0 0 20px 0;font-size:16px;'>Got a spare two and a half minutes to help us improve the docs?</div><a id='owInviteOk' href='https://Grafana.optimalworkshop.com/questions/grafana-docs?tag=docs&utm_medium=intercept' onclick='this.parentNode.style.display="none";' target='_blank' style='color:#F7FAFF;font-size:16px;font-weight:bold;text-decoration:underline;'>Yes, I'll help</a><a id='owInviteCancel' href='javascript:void(0)' onclick='this.parentNode.style.display="none";' style='color:#F7F8FA;font-size:14px;text-decoration:underline;float:right;'>Close</a></div><script>var owOnload=function(){if(-1==document.cookie.indexOf('ow-intercept-quiz-4ior230e')){var o=new XMLHttpRequest;o.onloadend=function(){try{var o=document.getElementById('owInviteSnippet');var date=new Date();date.setMonth(date.getMonth()+1);this.response&&JSON.parse(this.response).active===!0&&(document.cookie='ow-intercept-quiz-4ior230e=Done;path=/;expires='+date.toUTCString()+';',setTimeout(function(){o.style.display='block',o.style.opacity=1},2e3))}catch(e){}},o.open('POST','https://app.optimalworkshop.com/survey_status/questions/4ior230e/active'),o.send()}};if(window.addEventListener){window.addEventListener('load',function(){owOnload();});}else if(window.attachEvent){window.attachEvent('onload',function(){owOnload();});}</script><!-- END Optimal Workshop snippet -->
|
<!-- BEGIN Optimal Workshop Intercept Snippet --><div id='owInviteSnippet' style='position:fixed;right:20px;bottom:20px;width:280px;padding:20px;margin:0;border-radius:6px;background:#1857B8;color:#F7F8FA;text-align:left;z-index:2200000000;opacity:0;transition:opacity 500ms;-webkit-transition:opacity 500ms;display:none;'><div id='owInviteMessage' style='padding:0;margin:0 0 20px 0;font-size:16px;'>Got a spare two and a half minutes to help us improve the docs?</div><a id='owInviteOk' href='https://Grafana.optimalworkshop.com/questions/grafana-docs?tag=docs&utm_medium=intercept' onclick='this.parentNode.style.display="none";' target='_blank' style='color:#F7FAFF;font-size:16px;font-weight:bold;text-decoration:underline;'>Yes, I'll help</a><a id='owInviteCancel' href='javascript:void(0)' onclick='this.parentNode.style.display="none";' style='color:#F7F8FA;font-size:14px;text-decoration:underline;float:right;'>Close</a></div><script>var owOnload=function(){if(-1==document.cookie.indexOf('ow-intercept-quiz-4ior230e')){var o=new XMLHttpRequest;o.onloadend=function(){try{var o=document.getElementById('owInviteSnippet');var date=new Date();date.setMonth(date.getMonth()+1);this.response&&JSON.parse(this.response).active===!0&&(document.cookie='ow-intercept-quiz-4ior230e=Done;path=/;expires='+date.toUTCString()+';',setTimeout(function(){o.style.display='block',o.style.opacity=1},2e3))}catch(e){}},o.open('POST','https://app.optimalworkshop.com/survey_status/questions/4ior230e/active'),o.send()}};if(window.addEventListener){window.addEventListener('load',function(){owOnload();});}else if(window.attachEvent){window.attachEvent('onload',function(){owOnload();});}</script><!-- END Optimal Workshop snippet -->
|
||||||
|
@ -8,6 +8,12 @@ const PREFERRED_LABELS = ['job', 'app', 'k8s_app'];
|
|||||||
const EXAMPLES_LIMIT = 5;
|
const EXAMPLES_LIMIT = 5;
|
||||||
|
|
||||||
const LOGQL_EXAMPLES = [
|
const LOGQL_EXAMPLES = [
|
||||||
|
{
|
||||||
|
title: 'Log pipeline',
|
||||||
|
expression: '{job="mysql"} |= "metrics" | logfmt | duration > 10s',
|
||||||
|
label:
|
||||||
|
'This query targets the MySQL job, filters out logs that don’t contain the word "metrics" and parses each log line to extract more labels and filters with them.',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Count over time',
|
title: 'Count over time',
|
||||||
expression: 'count_over_time({job="mysql"}[5m])',
|
expression: 'count_over_time({job="mysql"}[5m])',
|
||||||
|
Loading…
Reference in New Issue
Block a user