<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abdelrahman Ahmed</title>
    <description>The latest articles on DEV Community by Abdelrahman Ahmed (@abahmed).</description>
    <link>https://dev.to/abahmed</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F791207%2F230783c8-8c94-4fe3-8044-f36e7372f09e.jpeg</url>
      <title>DEV Community: Abdelrahman Ahmed</title>
      <link>https://dev.to/abahmed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abahmed"/>
    <language>en</language>
    <item>
      <title>Monitor Persistent Volume usage in your cluster using kwatch</title>
      <dc:creator>Abdelrahman Ahmed</dc:creator>
      <pubDate>Tue, 14 Mar 2023 23:23:23 +0000</pubDate>
      <link>https://dev.to/abahmed/monitor-persistent-volume-usage-in-your-cluster-using-kwatch-16oo</link>
      <guid>https://dev.to/abahmed/monitor-persistent-volume-usage-in-your-cluster-using-kwatch-16oo</guid>
      <description>&lt;p&gt;In this tutorial, I will help you set up and deploy kwatch on your Kubernetes cluster to monitor Persistent Volumes (PV) usage and detect crashes in your running apps.&lt;/p&gt;

&lt;p&gt;Plus, integrate with Teams to get notified on a channel when volume usage is higher than a threshold.&lt;/p&gt;

&lt;p&gt;You can integrate with your favorite channel as &lt;a href="https://github.com/abahmed/kwatch"&gt;kwatch&lt;/a&gt; supports integrations with (Slack, Discord, Email, PagerDuty, Telegram, Rocket Chat, Mattermost, Opsgenie, Matrix, DingTalk, FeiShu, And Custom webhook).&lt;/p&gt;

&lt;h3&gt;
  
  
  Configure kwatch with Teams
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Get webhook&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First of all, we need to get the webhook URL of the channel you want the notification to be received on it.&lt;br&gt;
(&lt;a href="https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=dotnet#create-incoming-webhooks-1"&gt;Here&lt;/a&gt;&lt;br&gt;
is how to get it)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Get Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the configuration template&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl  &lt;span class="nt"&gt;-L&lt;/span&gt; https://raw.githubusercontent.com/abahmed/kwatch/v0.8.3/deploy/config.yaml &lt;span class="nt"&gt;-o&lt;/span&gt; config.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Edit config.yaml with the corresponding config&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Namespace&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kwatch&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ConfigMap&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kwatch&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kwatch&lt;/span&gt;
&lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;config.yaml&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
    &lt;span class="s"&gt;alert:&lt;/span&gt;
      &lt;span class="s"&gt;teams:&lt;/span&gt;
        &lt;span class="s"&gt;webhook: WEBHOOK_URL&lt;/span&gt;
    &lt;span class="s"&gt;pvcMonitor:&lt;/span&gt;
      &lt;span class="s"&gt;enabled: true&lt;/span&gt;
      &lt;span class="s"&gt;interval: 5&lt;/span&gt;
      &lt;span class="s"&gt;threshold: 70&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more configurations check &lt;a href="https://kwatch.dev/docs/pvc-monitor-configuration"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Apply Configuration&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; config.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Deploy kwatch
&lt;/h3&gt;

&lt;p&gt;Deploy kwatch on your cluster with one command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; https://raw.githubusercontent.com/abahmed/kwatch/v0.8.3/deploy/deploy.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After deploying you will get notified on the channel that kwatch has started&lt;br&gt;
successfully. Now, kwatch is monitoring your volumes and apps!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZQ_EVUJQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v2vsfq5z9i5r7bndfamq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZQ_EVUJQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v2vsfq5z9i5r7bndfamq.png" alt="kwatch start message" width="880" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is an example of kwatch messages when volume usage exceeds the threshold&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZU3OC3Y3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b6aoar2e7xqaxuacsi8z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZU3OC3Y3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b6aoar2e7xqaxuacsi8z.png" alt="kwatch detected issue" width="880" height="136"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you like kwatch, give it a star on &lt;a href="https://github.com/abahmed/kwatch"&gt;GitHub&lt;/a&gt;!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;We are happy to hear feedback from you and if you have any request, or suggestion don't hesitate to ping us on our channels (&lt;a href="https://discord.gg/kzJszdKmJ7"&gt;Discord&lt;/a&gt;, &lt;a href="https://github.com/abahmed/kwatch"&gt;GitHub&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>monitoring</category>
    </item>
  </channel>
</rss>
