Skip to content

Commit

Permalink
renew rename blog
Browse files Browse the repository at this point in the history
  • Loading branch information
scovl committed Oct 11, 2023
1 parent ee3f62f commit 31ac051
Show file tree
Hide file tree
Showing 46 changed files with 523 additions and 523 deletions.
92 changes: 46 additions & 46 deletions 2019/06/08/openshift/index.html

Large diffs are not rendered by default.

128 changes: 64 additions & 64 deletions 2023/01/01/samba4/index.html

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions 2023/03/19/promql/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<meta property="og:title" content="PromQL">
<meta property="og:description" content="Entendendo o PromQL">
<meta property="og:type" content="article">
<meta property="og:url" content="https://lobocode.github.io/2023/03/19/promql/">
<link rel="stylesheet" href="https://lobocode.github.io/dist/site.css">
<link rel="stylesheet" href="https://lobocode.github.io/dist/syntax.css">
<meta property="og:url" content="https://neur0dev.github.io/2023/03/19/promql/">
<link rel="stylesheet" href="https://neur0dev.github.io/dist/site.css">
<link rel="stylesheet" href="https://neur0dev.github.io/dist/syntax.css">
<link href="https://fonts.googleapis.com/css?family=Chilanka&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="preconnect" href="https://fonts.gstatic.com">
Expand All @@ -27,7 +27,7 @@



<link rel="shortcut icon" href="https://lobocode.github.io/img/favicon.ico">
<link rel="shortcut icon" href="https://neur0dev.github.io/img/favicon.ico">
</head>
<body>

Expand All @@ -38,15 +38,15 @@
<div class="site-title-wrapper">

<h1 class="neurodev-title">
<a title="neurodev" href="https://lobocode.github.io">$ /home/neurodev_</a>
<a title="neurodev" href="https://neur0dev.github.io">$ /home/neurodev_</a>
</h1>

<a class="button-square" href="https://lobocode.github.io/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square" href="https://neur0dev.github.io/index.xml"><i class="fa fa-rss"></i></a>




<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/lobocode" rel="me" target="_blank">
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/neur0dev" rel="me" target="_blank">
<i class="fa fa-github-alt"></i>
</a>

Expand Down Expand Up @@ -377,13 +377,13 @@ <h2 id="promql-na-prática">PromQL na prática</h2>
<p>Acesse o <a href="https://prometheus.demo.do.prometheus.io/">https://prometheus.demo.do.prometheus.io/</a> onde contém um servidor Prometheus hospedado pela comunidade. Em seguida, execute a seguinte Query:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl"><span class="m">100</span> * <span class="o">(</span><span class="m">1</span> - <span class="o">((</span>avg_over_time<span class="o">(</span>node_memory_MemFree_bytes<span class="o">[</span>10m<span class="o">])</span> + avg_over_time<span class="o">(</span>node_memory_Cached_bytes<span class="o">[</span>10m<span class="o">])</span> +
</span></span><span class="line"><span class="ln">2</span><span class="cl">avg_over_time<span class="o">(</span>node_memory_Buffers_bytes<span class="o">[</span>10m<span class="o">]))</span> / avg_over_time<span class="o">(</span>node_memory_MemTotal_bytes<span class="o">[</span>10m<span class="o">])))</span>
</span></span></code></pre></div><p><img src="https://raw.githubusercontent.com/lobocode/lobocode.github.io/master/post/images/tsdb/ui01.png#center" alt="img#center"></p>
</span></span></code></pre></div><p><img src="https://raw.githubusercontent.com/neur0dev/neur0dev.github.io/master/post/images/tsdb/ui01.png#center" alt="img#center"></p>
<p>O Prometheus acima está coletando métricas de diversos <strong><a href="https://prometheus.demo.do.prometheus.io/targets">targets</a></strong>. A métrica acima, se refere ao <strong><a href="http://demo.do.prometheus.io:9100/metrics">Node_Exporter</a></strong>. Isto é, sao métricas de Sistema Operacional e Hardware Linux. A Query está registrando o consumo médio de memória. Com a interface do Prometheus aberta em seu navegador, vá até a aba <strong>GRAPH</strong>. O Prometheus é focado no que está acontecendo agora em vez de rastrear dados ao longo de semanas ou meses. Isso se baseia na premissa de que a maioria das consultas e alertas de monitoramento são gerados a partir de dados recentes, geralmente, com menos de um dia. O Prometheus é responsável por armazenar suas métricas como dados de séries temporais, isto é, ao longo do tempo:</p>
<p><img src="https://raw.githubusercontent.com/lobocode/lobocode.github.io/master/post/images/tsdb/timeseries01.png#center" alt="img#center"></p>
<p><img src="https://raw.githubusercontent.com/neur0dev/neur0dev.github.io/master/post/images/tsdb/timeseries01.png#center" alt="img#center"></p>
<p>As métricas são armazenadas com o registro de data/hora, juntamente com pares de valores-chave opcionais chamados labels. Entenda labels como filtros que você aplica para trazer dados mais precisos a cerca de um ou mais endpoints. As métricas desempenham um papel importante para entender o comportamento da sua aplicação. Métricas são medidas de componentes de software ou hardware. Para tornar uma métrica útil, acompanhamos seu estado, geralmente registrando data points ao longo do tempo. Esses data points ou pontos de dados, são chamados de <strong>observations</strong> como mostra a imagem a seguir:</p>
<p><img src="https://raw.githubusercontent.com/lobocode/lobocode.github.io/master/post/images/tsdb/observation.png#center" alt="img#center"></p>
<p><img src="https://raw.githubusercontent.com/neur0dev/neur0dev.github.io/master/post/images/tsdb/observation.png#center" alt="img#center"></p>
<p>Um observation (o potinho no gráfico), consiste em um registro de data/hora bastante preciso em milissegundos e um valor float64. Uma coleção de observations registrados ao longo do tempo, é o que é denominado de série temporal. Um ou mais quadros atuais, ou seja, as séries temporais que voce está analizando atualmente, por sua vez, é chamado de <strong>samples</strong>:</p>
<p><img src="https://raw.githubusercontent.com/lobocode/lobocode.github.io/master/post/images/tsdb/samples01.png#center" alt="img#center"></p>
<p><img src="https://raw.githubusercontent.com/neur0dev/neur0dev.github.io/master/post/images/tsdb/samples01.png#center" alt="img#center"></p>
<p>Experimente executar cada uma das métricas abaixo em seu devido contexto:</p>
<h3 id="cpu-usage">CPU Usage</h3>
<ul>
Expand Down Expand Up @@ -471,30 +471,30 @@ <h3 id="referências">Referências</h3>

<div class="share">

<a class="icon-twitter" href="https://twitter.com/share?text=PromQL&url=https%3a%2f%2flobocode.github.io%2f2023%2f03%2f19%2fpromql%2f"
<a class="icon-twitter" href="https://twitter.com/share?text=PromQL&url=https%3a%2f%2fneur0dev.github.io%2f2023%2f03%2f19%2fpromql%2f"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<i class="fa fa-twitter"></i>
<span class="hidden">Twitter</span>
</a>



<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3a%2f%2flobocode.github.io%2f2023%2f03%2f19%2fpromql%2f"
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3a%2f%2fneur0dev.github.io%2f2023%2f03%2f19%2fpromql%2f"
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
<i class="fa fa-facebook"></i>
<span class="hidden">Facebook</span>
</a>



<a class="icon-google-plus" href="https://plus.google.com/share?url=https%3a%2f%2flobocode.github.io%2f2023%2f03%2f19%2fpromql%2f"
<a class="icon-google-plus" href="https://plus.google.com/share?url=https%3a%2f%2fneur0dev.github.io%2f2023%2f03%2f19%2fpromql%2f"
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
<i class="fa fa-google-plus"></i>
<span class="hidden">Google+</span>
</a>


<a class="icon-linkedin" href="https://www.linkedin.com/shareArticle?mini=true&title=PromQL&url=https%3a%2f%2flobocode.github.io%2f2023%2f03%2f19%2fpromql%2f&summary=Entendendo%20o%20PromQL"
<a class="icon-linkedin" href="https://www.linkedin.com/shareArticle?mini=true&title=PromQL&url=https%3a%2f%2fneur0dev.github.io%2f2023%2f03%2f19%2fpromql%2f&summary=Entendendo%20o%20PromQL"
onclick="window.open(this.href, 'linkedin-share', 'width=554,height=481');return false;">
<i class="fa fa-linkedin"></i>
<span class="hidden">LinkedIn</span>
Expand All @@ -518,7 +518,7 @@ <h3 id="referências">Referências</h3>
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "lobocode-github-io" + '.disqus.com/embed.js';
s.src = '//' + "neur0dev-github-io" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
Expand All @@ -537,7 +537,7 @@ <h3 id="referências">Referências</h3>
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="neurodev" href="https://lobocode.github.io">neurodev</a>
<a title="neurodev" href="https://neur0dev.github.io">neurodev</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
Expand All @@ -552,9 +552,9 @@ <h1 class="site-title">
</div>
</footer>

<script src="https://lobocode.github.iojs/jquery-1.11.3.min.js"></script>
<script src="https://lobocode.github.iojs/jquery.fitvids.js"></script>
<script src="https://lobocode.github.iojs/scripts.js"></script>
<script src="https://neur0dev.github.iojs/jquery-1.11.3.min.js"></script>
<script src="https://neur0dev.github.iojs/jquery.fitvids.js"></script>
<script src="https://neur0dev.github.iojs/scripts.js"></script>
</body>
</html>

Loading

0 comments on commit 31ac051

Please sign in to comment.