<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Akshay raut on Medium]]></title>
        <description><![CDATA[Stories by Akshay raut on Medium]]></description>
        <link>https://medium.com/@akshayraut960.dj?source=rss-5728e3e27e57------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*itlK3-pTVB_NTa-9</url>
            <title>Stories by Akshay raut on Medium</title>
            <link>https://medium.com/@akshayraut960.dj?source=rss-5728e3e27e57------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 17:46:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akshayraut960.dj/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Wazuh Agent Setup Documentation]]></title>
            <link>https://medium.com/@akshayraut960.dj/wazuh-agent-setup-documentation-b2fe97fe8ff8?source=rss-5728e3e27e57------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2fe97fe8ff8</guid>
            <dc:creator><![CDATA[Akshay raut]]></dc:creator>
            <pubDate>Mon, 08 Dec 2025 14:46:12 GMT</pubDate>
            <atom:updated>2025-12-08T14:47:27.805Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. Security Group Configuration (Wazuh Server)</h3><p>Add the following inbound rules to the <strong>Wazuh Server Security Group</strong> to allow communication from the remote server:</p><ul><li><strong>TCP 1514</strong> — Allow from <em>remote-server-ip</em> (wlp-dev-server)</li><li><strong>TCP 1515</strong> — Allow from <em>remote-server-ip</em> (wlp-dev-server)</li></ul><h3>2. Test Connectivity from Remote Server</h3><p>Login to the remote server and verify connectivity to the Wazuh server using:</p><pre>nc -zv wazuh_server_ip 1515<br>nc -zv wazuh_server_ip 1514</pre><p>If the connection is successful, proceed further.</p><h3>3. Clone Wazuh Docker Repository</h3><p>Navigate to the working directory:</p><pre>cd /opt/monitoring/</pre><p>Clone the Wazuh Docker repository:</p><pre>sudo git clone https://github.com/wazuh/wazuh-docker.git -b v4.13.1</pre><p>Move to the Wazuh Agent directory:</p><pre>cd /opt/monitoring/wazuh-docker/wazuh-agent</pre><h3>4. Update docker-compose.yml</h3><p>Modify the docker compose file with the following configuration:</p><pre>version: &#39;3.8&#39;<br>services:<br>  wazuh.agent:<br>    image: wazuh/wazuh-agent:4.13.1<br>    restart: always<br>    environment:<br>      - WAZUH_MANAGER_SERVER=your_wazuh_server_ip<br>      - WAZUH_AGENT_NAME=your_agent_name<br>    volumes:<br>      - ./config/wazuh-agent-conf:/wazuh-config-mount/etc/ossec.conf</pre><h3>5. Update Agent Configuration File</h3><p>Edit the following file:</p><pre>./config/wazuh-agent-conf</pre><p>Update these fields:</p><pre>CHANGE_MANAGER_IP = your_wazuh_server_ip<br>CHANGE_MANAGER_PORT = 1514<br>CHANGE_ENROLL_IP = your_wazuh_server_ip<br>CHANGE_ENROLL_PORT = 1515<br>CHANGEE_AGENT_NAME = your_agent_name</pre><p>Make sure the manager IP and agent name match your actual configuration.</p><h3>6. Start the Wazuh Agent Container</h3><p>Run the container:</p><pre>docker compose up -d</pre><h3>7. Verify Agent Registration on Wazuh Server</h3><p>Run the following command on the Wazuh server:</p><pre>docker exec -it single-node-wazuh.manager-1 /var/ossec/bin/agent_control -l</pre><p>You should see the agent displayed in an <strong>Active</strong> state.</p><h3>8. Manage Wazuh Agents (Add/List/Remove)</h3><p>To manage agents, use:</p><pre>docker exec -it single-node-wazuh.manager-1 /var/ossec/bin/manage_agents</pre><p>This will display the agent manager menu:</p><pre>****************************************<br>* Wazuh v4.13.1 Agent manager.         *<br>* The following options are available: *<br>****************************************<br>   (A)dd an agent (A).<br>   (E)xtract key for an agent (E).<br>   (L)ist already added agents (L).<br>   (R)emove an agent (R).<br>   (Q)uit.<br>Choose your action: A,E,L,R or Q:</pre><h3>9. Verify in Wazuh Dashboard</h3><p>Login to the Wazuh Dashboard and navigate to:</p><p><strong>Home &gt; Overview &gt; Agents Summary</strong></p><p>You will see your newly added agent listed in the summary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2YqTJSZGodNRKvg45ydoBw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2fe97fe8ff8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wazuh Manager Setup on Docker — Documentation]]></title>
            <link>https://medium.com/@akshayraut960.dj/wazuh-manager-setup-on-docker-documentation-68cc1f01d1a7?source=rss-5728e3e27e57------2</link>
            <guid isPermaLink="false">https://medium.com/p/68cc1f01d1a7</guid>
            <dc:creator><![CDATA[Akshay raut]]></dc:creator>
            <pubDate>Mon, 08 Dec 2025 14:33:27 GMT</pubDate>
            <atom:updated>2025-12-08T14:33:27.535Z</atom:updated>
            <content:encoded><![CDATA[<h3>Wazuh Manager Setup on Docker — Documentation</h3><p>This documentation provides a complete step-by-step guide to deploy <strong>Wazuh Manager</strong>, <strong>Wazuh Indexer</strong>, and <strong>Wazuh Dashboard</strong> using Docker and Docker Compose.</p><h3>1. Prerequisites</h3><p>Ensure the server meets the following requirements:</p><ul><li><strong>OS</strong>: Ubuntu 20.04/22.04, Debian, Rocky Linux, CentOS, Amazon Linux</li><li><strong>RAM</strong>: Minimum 4 GB (8 GB recommended)</li><li><strong>CPU</strong>: 2 vCPUs or more</li><li><strong>Docker + Docker Compose installed</strong></li><li><strong>Internet access</strong> for pulling Docker images</li></ul><h3>2. Install Docker</h3><p>Run the following commands:</p><pre>sudo apt update<br>sudo apt install -y docker.io</pre><p>Enable and start Docker:</p><pre>sudo systemctl enable docker<br>sudo systemctl start docker</pre><h3>3. Install Docker Compose</h3><pre>sudo apt install -y docker-compose</pre><p>Verify installation:</p><pre>docker-compose --version</pre><h3>4. Clone the Official Wazuh Docker Repository</h3><p>Navigate to the installation directory:</p><pre>cd /opt/</pre><p>Clone the repository:</p><pre>sudo git clone https://github.com/wazuh/wazuh-docker.git -b v4.13.1</pre><p>Move to the single-node deployment folder:</p><pre>cd /opt/wazuh-docker/single-node</pre><h3>5. Deploy Wazuh Manager (Single Node Setup)</h3><p>Run the deployment using Docker Compose:</p><pre>sudo docker-compose up -d</pre><p>Check running containers:</p><pre>docker ps</pre><p>You should see:</p><ul><li>wazuh.manager</li><li>wazuh.indexer</li><li>wazuh.dashboard</li></ul><p>All containers must be in <strong>healthy</strong> state.</p><h3>6. Access the Wazuh Dashboard</h3><p>Once deployment is complete, open your browser and visit:</p><pre>https://your_server_ip/</pre><p>Default credentials:</p><pre>Username: admin<br>Password: admin</pre><p>You will be prompted to change the password on first login.</p><h3>7. Verify Wazuh Manager Status</h3><p>Run:</p><pre>docker exec -it single-node-wazuh.manager-1 /var/ossec/bin/ossec-control status</pre><p>Expected output:</p><pre>wazuh-agent is running<br>wazuh-clusterd is running</pre><h3>8. Open Firewall Ports</h3><p>Wazuh Manager requires ports <strong>1514</strong> and <strong>1515</strong> for agents.</p><h3>Using UFW:</h3><pre>sudo ufw allow 1514/tcp<br>sudo ufw allow 1515/tcp</pre><h3>Using firewalld:</h3><pre>sudo firewall-cmd --add-port=1514/tcp --permanent<br>sudo firewall-cmd --add-port=1515/tcp --permanent<br>sudo firewall-cmd --reload</pre><h3>9. Check Registered Agents</h3><p>To view all connected agents:</p><pre>docker exec -it single-node-wazuh.manager-1 /var/ossec/bin/agent_control -l</pre><p>This will display the list of active agents.</p><h3>10. Manage Agents</h3><p>Use the Wazuh agent manager tool:</p><pre>docker exec -it single-node-wazuh.manager-1 /var/ossec/bin/manage_agents</pre><p>You will see:</p><pre>****************************************<br>* Wazuh v4.13.1 Agent manager.         *<br>* The following options are available: *<br>****************************************<br>   (A)dd an agent (A).<br>   (E)xtract key for an agent (E).<br>   (L)ist already added agents (L).<br>   (R)emove an agent (R).<br>   (Q)uit.<br>Choose your action: A,E,L,R or Q:</pre><h3>11. View Wazuh Logs for Debugging</h3><h3>Manager logs:</h3><pre>docker logs single-node-wazuh.manager-1 -f</pre><h3>Indexer logs:</h3><pre>docker logs single-node-wazuh.indexer-1 -f</pre><h3>Dashboard logs:</h3><pre>docker logs single-node-wazuh.dashboard-1 -f</pre><h3>12. Verify in Wazuh Dashboard</h3><p>Navigate to:</p><p><strong>Home &gt; Overview &gt; Agents Summary</strong></p><p>You will see:</p><ul><li>Wazuh Manager status</li><li>Connected agents</li><li>Alerts and health monitoring</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ravGc0KC7KUGilwD6IhT8g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WA5PWSSVWxvB7CmCxm_R9w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yF_lDSHKzdaS2LLYURCBLQ.png" /></figure><p>THANK YOU…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68cc1f01d1a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Infra & Security Alerts Setup (Prometheus/Grafana + Wazuh → MS Teams)]]></title>
            <link>https://medium.com/@akshayraut960.dj/infra-security-alerts-setup-prometheus-grafana-wazuh-ms-teams-d56a68d948c2?source=rss-5728e3e27e57------2</link>
            <guid isPermaLink="false">https://medium.com/p/d56a68d948c2</guid>
            <dc:creator><![CDATA[Akshay raut]]></dc:creator>
            <pubDate>Thu, 27 Nov 2025 07:27:20 GMT</pubDate>
            <atom:updated>2025-11-27T07:27:20.295Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>Files and commands you can copy-paste. Replace placeholders like </em><em>DEV_SERVER_IP and </em><em>YOUR_TEAMS_WEBHOOK_URL before running.</em></blockquote><h3>Overview</h3><p>This document provides ready-to-run configuration and docker-compose snippets for two servers:</p><ul><li><strong>Dev server</strong> (where your apps run)</li><li><strong>node-exporter</strong> (host metrics)</li><li><strong>cAdvisor</strong> (container metrics)</li><li><strong>Monitoring/Grafana server</strong> (where Prometheus &amp; Wazuh run)</li><li><strong>Prometheus</strong> (scrapes metrics)</li><li><strong>Alertmanager</strong> (routes alerts)</li><li><strong>prometheus-MSteams</strong> (forwards alerts to MS Teams)</li><li><strong>Grafana</strong></li><li>(Wazuh already present — Wazuh integration block included)</li></ul><p>You will also find Prometheus rule files, Alertmanager config, and a Wazuh integration script.</p><h3>1) Dev server: docker-compose.yml (add to existing compose or a new file)</h3><pre>version: &#39;3.8&#39;<br><br>services:<br>  node-exporter:<br>    image: prom/node-exporter:latest<br>    container_name: node-exporter<br>    restart: unless-stopped<br>    pid: &quot;host&quot;<br>    ports:<br>      - &quot;9100:9100&quot;<br>    volumes:<br>      - /proc:/host/proc:ro<br>      - /sys:/host/sys:ro<br>      - /:/rootfs:ro<br>    command:<br>      - &#39;--path.procfs=/host/proc&#39;<br>      - &#39;--path.sysfs=/host/sys&#39;<br>      - &#39;--path.rootfs=/rootfs&#39;<br>      - &#39;--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($|/)&#39;<br><br>  cadvisor:<br>    image: gcr.io/cadvisor/cadvisor:latest<br>    container_name: cadvisor<br>    restart: unless-stopped<br>    ports:<br>      - &quot;8081:8080&quot; # host:container port (cAdvisor serves on 8080 inside image)<br>    volumes:<br>      - /:/rootfs:ro<br>      - /var/run:/var/run:ro<br>      - /sys:/sys:ro<br>      - /var/lib/docker/:/var/lib/docker:ro</pre><p><strong>Commands (on Dev server)</strong></p><pre># from the directory with this compose file<br>docker compose up -d<br># verify<br>curl http://localhost:9100/metrics | head -n 20<br>curl http://localhost:8081/ | head -n 20</pre><p>Replace localhost with 127.0.0.1 or the server’s IP if testing remotely.</p><h3>2) Monitoring server: docker-compose.yml (prometheus, alertmanager, msteams, grafana)</h3><p>Create a directory (e.g., /opt/monitoring) and put these files in it.</p><pre>version: &#39;3.8&#39;<br>services:<br>  prometheus:<br>    image: prom/prometheus:latest<br>    container_name: prometheus_container<br>    restart: unless-stopped<br>    ports:<br>      - &quot;9090:9090&quot;<br>    volumes:<br>      - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro<br>      - ./alert-rules.yml:/etc/prometheus/alert-rules.yml:ro</pre><pre>  alertmanager:<br>    image: prom/alertmanager:latest<br>    container_name: alertmanager<br>    restart: unless-stopped<br>    ports:<br>      - &quot;9093:9093&quot;<br>    volumes:<br>      - ./alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro</pre><pre>  msteams:<br>    image: bzon/prometheus-msteams:latest<br>    container_name: prometheus_msteams<br>    restart: unless-stopped<br>    environment:<br>      - TEAMS_INCOMING_WEBHOOK_URL=YOUR_TEAMS_WEBHOOK_URL<br>    ports:<br>      - &quot;2000:2000&quot;</pre><pre>  grafana:<br>    image: grafana/grafana:latest<br>    container_name: grafana_container<br>    restart: unless-stopped<br>    ports:<br>      - &quot;3000:3000&quot;<br>    volumes:<br>      - grafana-storage:/var/lib/grafana</pre><pre>volumes:<br>  grafana-storage:</pre><p><strong>Notes:</strong></p><ul><li>Replace YOUR_TEAMS_WEBHOOK_URL with the MS Teams Incoming Webhook URL you create in Teams.</li><li>This msteams image exposes endpoint /alert on port 2000 by default; Alertmanager will point to that.</li></ul><p>Commands (on Monitoring server):</p><pre>cd /opt/monitoring<br>docker compose up -d</pre><h3>3) Prometheus config (prometheus.yml)</h3><p>Put this file at /opt/monitoring/prometheus.yml (adjust paths if different).</p><pre>global:<br>  scrape_interval: 15s<br>  evaluation_interval: 15s</pre><pre>rule_files:<br>  - &#39;/etc/prometheus/alert-rules.yml&#39;</pre><pre>scrape_configs:<br>  - job_name: &#39;prometheus&#39;<br>    static_configs:<br>      - targets: [&#39;localhost:9090&#39;]</pre><pre>  - job_name: &#39;node_exporter_dev&#39;<br>    static_configs:<br>      - targets: [&#39;DEV_SERVER_IP:9100&#39;]</pre><pre>  - job_name: &#39;cadvisor_dev&#39;<br>    static_configs:<br>      - targets: [&#39;DEV_SERVER_IP:8081&#39;]</pre><pre>alerting:<br>  alertmanagers:<br>    - static_configs:<br>        - targets: [&#39;alertmanager:9093&#39;]</pre><p>Replace DEV_SERVER_IP with the actual IP (or DNS) of your dev server. If you have multiple dev nodes, add them as additional targets.</p><h3>4) Alertmanager config (alertmanager.yml)</h3><p>Put at /opt/monitoring/alertmanager.yml.</p><pre>global:<br>   resolve_timeout: 5m</pre><pre>route:<br>  group_by: [&#39;alertname&#39;]<br>  group_wait: 10s<br>  group_interval: 10m<br>  repeat_interval: 1h<br>  receiver: &#39;msteams&#39;</pre><pre>receivers:<br>  - name: &#39;msteams&#39;<br>    webhook_configs:<br>      - url: &#39;http://msteams:2000/alert&#39;</pre><p>This sends all alerts to the msteams service running in the same Docker network.</p><h3>5) Prometheus alert rules (alert-rules.yml)</h3><p>Put at /opt/monitoring/alert-rules.yml.</p><pre>groups:<br>  - name: infra-alerts<br>    rules:<br>      - alert: HighCPUUsage<br>        expr: 100 - (avg by (instance)(irate(node_cpu_seconds_total{mode=&quot;idle&quot;}[5m])) * 100) &gt; 80<br>        for: 2m<br>        labels:<br>          severity: critical<br>        annotations:<br>          summary: &quot;High CPU usage on {{ $labels.instance }}&quot;<br>          description: &quot;CPU usage &gt; 80% for &gt;2m&quot;<br><br>  - alert: HighMemoryUsage<br>        expr: (node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / node_memory_MemTotal_bytes * 100 &gt; 85<br>        for: 2m<br>        labels:<br>          severity: warning<br>        annotations:<br>          summary: &quot;High memory usage on {{ $labels.instance }}&quot;<br>      - alert: HighDiskUsage<br>        expr: (node_filesystem_size_bytes{mountpoint=&quot;/&quot;} - node_filesystem_free_bytes{mountpoint=&quot;/&quot;}) / node_filesystem_size_bytes{mountpoint=&quot;/&quot;} * 100 &gt; 90<br>        for: 5m<br>        labels:<br>          severity: critical<br>        annotations:<br>          summary: &quot;High disk usage on {{ $labels.instance }}&quot;<br>      - alert: ContainerDown<br>        expr: absent(container_last_seen{container_name=~&quot;frontend-app|backend-app&quot;})<br>        for: 1m<br>        labels:<br>          severity: critical<br>        annotations:<br>          summary: &quot;Container missing on {{ $labels.instance }}&quot;<br>          description: &quot;One of the watched containers is not present according to cAdvisor metrics.&quot;</pre><ul><li>container_last_seen metric name can vary depending on cAdvisor/Prometheus export; if not present use container_start_time_seconds or inspect cAdvisor metrics and adapt expressions.</li></ul><h3>6) MS Teams: create Incoming Webhook</h3><ol><li>In Teams, open the target <strong>Channel</strong> → <strong>Connectors</strong> → <strong>Incoming Webhook</strong></li><li>Add a name (e.g., Infra Alerts) and upload an icon optionally</li><li>Copy the <strong>Webhook URL</strong> and paste it into the docker-compose msteams env variable (or update container env and recreate)</li></ol><h3>7) Wazuh → MS Teams integration (Security alerts)</h3><p>Place this script inside the Wazuh manager container filesystem (e.g., /var/ossec/integrations/msteams.sh).</p><p><strong>Script</strong> (msteams.sh):</p><pre>#!/bin/bash<br># Usage: msteams.sh &quot;&lt;alert-message&gt;&quot;<br>WEBHOOK_URL=&quot;YOUR_TEAMS_WEBHOOK_URL&quot;<br>MSG=&quot;$1&quot;<br>if [ -z &quot;$WEBHOOK_URL&quot; ]; then<br>  echo &quot;No WEBHOOK_URL set&quot; &gt;&amp;2<br>  exit 1<br>fi<br>PAYLOAD=$(jq -n --arg text &quot;${MSG}&quot; &#39;{text:$text}&#39;)<br>curl -s -X POST -H &quot;Content-Type: application/json&quot; -d &quot;$PAYLOAD&quot; &quot;$WEBHOOK_URL&quot;</pre><p>Make it executable:</p><pre>chmod +x msteams.sh</pre><p><strong>ossec.conf</strong> (add integration block inside &lt;ossec_config&gt; root):</p><pre>&lt;integration&gt;<br>  &lt;name&gt;msteams&lt;/name&gt;<br>  &lt;hook_url&gt;YOUR_TEAMS_WEBHOOK_URL&lt;/hook_url&gt;<br>  &lt;command&gt;/var/ossec/integrations/msteams.sh&lt;/command&gt;<br>  &lt;level&gt;3&lt;/level&gt;<br>  &lt;format&gt;json&lt;/format&gt;<br>&lt;/integration&gt;</pre><p>Since Wazuh is running in Docker on your monitoring server, you can copy the script into the running manager container and edit /var/ossec/etc/ossec.conf there.</p><p>Example commands:</p><pre># copy script into container<br>docker cp msteams.sh single-node-wazuh.manager-1:/var/ossec/integrations/msteams.sh<br># exec into container to edit ossec.conf or use docker cp to copy edited file back<br>docker exec -it single-node-wazuh.manager-1 bash<br># inside, set permissions and restart manager service if needed<br>chmod +x /var/ossec/integrations/msteams.sh<br># restart container from host<br>docker restart single-node-wazuh.manager-1</pre><h3>8) Testing</h3><h3>Test MSteams service directly (Monitoring server)</h3><pre># send a fake alert to the msteams service, which will forward to Teams<br>curl -X POST -H &#39;Content-Type: application/json&#39; -d &#39;{&quot;alerts&quot;:[{&quot;labels&quot;:{&quot;alertname&quot;:&quot;TestAlert&quot;},&quot;annotations&quot;:{&quot;summary&quot;:&quot;This is a test&quot;}}]}&#39; http://localhost:2000/alert</pre><p>You should receive a message in the Teams channel.</p><h3>Test Alertmanager route (Monitoring server)</h3><pre>curl -d &#39;[{&quot;labels&quot;:{&quot;alertname&quot;:&quot;ManualTest&quot;,&quot;instance&quot;:&quot;manual&quot;}}]&#39; -H &#39;Content-Type: application/json&#39; http://localhost:9093/api/v1/alerts</pre><p>This will push an alert into Alertmanager which should route it to msteams.</p><h3>Test Wazuh alert (from inside Wazuh manager container)</h3><p>Trigger a simple local test alert using logger or Wazuh test utilities, then inspect Teams channel.</p><h3>9) Troubleshooting checklist</h3><ul><li>If metrics missing: verify curl http://DEV_SERVER_IP:9100/metrics and http://DEV_SERVER_IP:8081/ are reachable from Monitoring server.</li><li>If Prometheus not scraping: check Prometheus targets UI: <a href="http://monitoring_ip:9090/targets.">http://MONITORING_IP:9090/targets.</a></li><li>If Alertmanager not forwarding: check Alertmanager UI http://MONITORING_IP:9093 and msteams container logs.</li><li>If Wazuh alerts not sent: check manager logs and ensure script is executable and path in ossec.conf is correct.</li></ul><h3>10) Next steps &amp; optional additions</h3><ul><li>Add Grafana alert rules (Grafana can forward alerts to Alertmanager or webhooks) if you prefer Grafana-managed alerts.</li><li>Add ServiceMonitors / Prometheus Operator if you later move to k8s.</li><li>Improve Teams formatting by modifying prometheus-msteams templates or using a custom forwarder.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d56a68d948c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup Jenkins Agent as service on a Windows Machine.]]></title>
            <link>https://medium.com/@akshayraut960.dj/setup-jenkins-agent-as-service-on-a-windows-machine-079855e9cf1d?source=rss-5728e3e27e57------2</link>
            <guid isPermaLink="false">https://medium.com/p/079855e9cf1d</guid>
            <dc:creator><![CDATA[Akshay raut]]></dc:creator>
            <pubDate>Tue, 08 Jul 2025 06:48:17 GMT</pubDate>
            <atom:updated>2025-07-08T06:49:57.162Z</atom:updated>
            <content:encoded><![CDATA[<h3>🛠️ How to Run a Jenkins Agent as a Windows Service Using JNLP and WinSW</h3><p>Running a Jenkins agent as a background service on Windows Server is a powerful way to ensure your CI/CD infrastructure is always ready. In this guide, I’ll walk you through setting up a Jenkins agent using the JNLP (WebSocket) launcher and managing it as a Windows service using WinSW (Windows Service Wrapper).</p><h3>📦 Prerequisites</h3><ul><li>Java 8 or later installed (Java 8 is required for javaws if using .jnlp)</li><li>Jenkins master server running and accessible</li><li>A registered agent node on Jenkins (set to connect via JNLP)</li><li>Admin access to your Windows Server</li></ul><h3>📁 Step 1: Prepare the Agent Directory</h3><p>Create a folder to hold your Jenkins agent files:</p><pre>C:\JenkinsAgent</pre><p>Download and place the following files into this folder:</p><ul><li>agent.jar → Download from your Jenkins master:<br> http://&lt;your-jenkins-url&gt;/jnlpJars/agent.jar</li><li>winsw.exe → Download from <a href="https://github.com/winsw/winsw/releases">WinSW GitHub Releases</a></li><li>jenkins-agent.xml → We’ll create this next</li></ul><p>Rename winsw.exe to match your service name. For example:</p><pre>jenkins-agent.exe<br>jenkins-agent.xml</pre><h3>📝 Step 2: Create the Service Configuration File</h3><p>Create a file named jenkins-agent.xml in the same folder with the following content:</p><pre>&lt;service&gt;<br>  &lt;id&gt;jenkins-agent&lt;/id&gt;<br>  &lt;name&gt;Jenkins Agent&lt;/name&gt;<br>  &lt;description&gt;This service runs the Jenkins agent connected via JNLP WebSocket.&lt;/description&gt;</pre><pre>  &lt;executable&gt;java&lt;/executable&gt;<br>  &lt;arguments&gt;-Xrs -Xmx256m -jar &quot;%BASE%\agent.jar&quot; -url http://&lt;your-jenkins-url&gt;:8080/ -secret &lt;your-agent-secret&gt; -name &quot;windows-node&quot; -webSocket -workDir &quot;C:\Users\YourUser\Documents\Jenkins&quot;&lt;/arguments&gt;</pre><pre>  &lt;log mode=&quot;roll&quot; /&gt;<br>  &lt;onfailure action=&quot;restart&quot; /&gt;<br>&lt;/service&gt;</pre><p>Replace:</p><ul><li>&lt;your-jenkins-url&gt; with your Jenkins master address</li><li>&lt;your-agent-secret&gt; with the secret key from the agent node configuration</li><li>&quot;windows-node&quot; with your agent’s name</li><li>workDir with your preferred working directory</li></ul><h3>⚙️ Step 3: Install the Jenkins Agent Service</h3><p>Open Command Prompt as Administrator and navigate to the agent folder:</p><pre>cd C:\JenkinsAgent<br>jenkins-agent.exe install</pre><p>You should see:</p><pre>Service &quot;jenkins-agent&quot; installed successfully!</pre><h3>▶️ Step 4: Start the Service</h3><p>Start the service using:</p><pre>jenkins-agent.exe start</pre><p>Or use the Services GUI:</p><ul><li>Press Win + R, type services.msc, and press Enter</li><li>Find <strong>Jenkins Agent</strong></li><li>Right-click → Start</li></ul><h3>✅ Step 5: Verify the Agent is Online</h3><p>Go to your Jenkins master:</p><ul><li>Navigate to <strong>Manage Jenkins → Nodes</strong></li><li>Your agent (windows-node) should appear as <strong>online</strong></li></ul><h3>🧹 Step 6: Uninstall the Agent (Optional)</h3><p>To stop and remove the service:</p><pre>jenkins-agent.exe stop<br>jenkins-agent.exe uninstall</pre><h3>🧠 Pro Tips</h3><ul><li>Logs are saved in the same folder as jenkins-agent.out.log and jenkins-agent.err.log</li><li>You can configure the service to run under a specific user via services.msc → Properties → Log On</li><li>Use -webSocket for more reliable connections, especially behind firewalls.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=079855e9cf1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Let’s Encrypt SSL Setup with Nginx on Ubuntu]]></title>
            <link>https://medium.com/@akshayraut960.dj/lets-encrypt-ssl-setup-with-nginx-on-ubuntu-9210a3e4c6e1?source=rss-5728e3e27e57------2</link>
            <guid isPermaLink="false">https://medium.com/p/9210a3e4c6e1</guid>
            <dc:creator><![CDATA[Akshay raut]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 07:11:56 GMT</pubDate>
            <atom:updated>2025-06-16T09:45:57.579Z</atom:updated>
            <content:encoded><![CDATA[<p>Here is a clean and structured <strong>Let’s Encrypt (Certbot) with Nginx on Ubuntu</strong> setup documentation based on your configuration:</p><p>This guide outlines how to configure <strong>Let’s Encrypt SSL certificates</strong> using <strong>Certbot</strong> for a web application running behind <strong>Nginx</strong> on an <strong>Ubuntu</strong> server.</p><h3>✅ Prerequisites</h3><ul><li>Ubuntu Server (18.04/20.04/22.04)</li><li>Nginx installed and running</li><li>A registered domain name (e.g., your_domain.com) pointing to your server’s public IP</li><li>Nginx reverse proxy configuration forwarding to your application (e.g., running on port 8080)</li></ul><h3>🔧 Step 1: Update Packages</h3><pre>sudo apt update -y<br>sudo apt install nginx -y</pre><pre>sudo systemctl start nginx<br>sudo systemctl enable nginx<br>sudo systemctl status nginx.service</pre><h3>🔌 Step 2: Install Certbot &amp; Nginx Plugin</h3><pre>sudo apt install certbot python3-certbot-nginx -y</pre><pre>sudo certbot --nginx -d your_domain.com</pre><h3>🌐 Step 3: Configure Nginx for Your Domain</h3><p>Create or edit your Nginx configuration file (e.g., /etc/nginx/sites-available/default or your custom file in /etc/nginx/sites-available/your_domain):</p><pre>server {<br>    server_name your_domain.com;<br>    location / {<br>        proxy_pass http://localhost:8080;<br>        proxy_set_header Host $host;<br>        proxy_set_header X-Real-IP $remote_addr;<br>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>        proxy_set_header X-Forwarded-Proto $scheme;<br>    }<br>    listen 443 ssl; # managed by Certbot<br>    ssl_certificate /etc/letsencrypt/live/your_domain.com/fullchain.pem; # managed by Certbot<br>    ssl_certificate_key /etc/letsencrypt/live/your_domain.com/privkey.pem; # managed by Certbot<br>    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot<br>    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot<br>}<br>server {<br>    if ($host = your_domain.com) {<br>        return 301 https://$host$request_uri;<br>    } # managed by Certbot<br>    listen 80;<br>    server_name your_domain.com;<br>    return 404; # managed by Certbot<br>}</pre><blockquote><em>Replace </em><em>your_domain.com with your actual domain name.</em></blockquote><h3>🚀 Step 4: Check SSL Certificate Using Certbot</h3><pre>sudo systemctl status certbot.timer</pre><ul><li>Certbot will automatically update the Nginx configuration and reload the service.</li></ul><h3>🔄 Step 5: Test Auto-Renewal</h3><p>To verify that Certbot’s auto-renewal works:</p><pre>sudo certbot renew --dry-run</pre><p>If successful, this confirms your certificate will auto-renew correctly via cron.</p><h3>📁 (Optional) View Nginx Configuration File</h3><p>To verify or inspect the configuration:</p><pre>cat /etc/nginx/sites-enabled/default</pre><h3>🔁 Renewing SSL Certificate (Manually)</h3><p>Certificates are valid for 90 days. Although renewal is automated, you can force a manual renewal with:</p><pre>sudo certbot renew</pre><h3>✅ Final Checklist</h3><ul><li>Domain points to your server</li><li>Nginx running with reverse proxy</li><li>Certbot installed and SSL applied</li><li>Auto-renewal tested</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9210a3e4c6e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microsoft Teams and Jenkins Integration Documentation]]></title>
            <link>https://medium.com/@akshayraut960.dj/microsoft-teams-and-jenkins-integration-documentation-83038f7130d5?source=rss-5728e3e27e57------2</link>
            <guid isPermaLink="false">https://medium.com/p/83038f7130d5</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[notifications]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[ms-teams-app]]></category>
            <dc:creator><![CDATA[Akshay raut]]></dc:creator>
            <pubDate>Wed, 11 Jun 2025 12:39:38 GMT</pubDate>
            <atom:updated>2025-06-11T12:48:11.016Z</atom:updated>
            <content:encoded><![CDATA[<p>This document outlines the steps required to integrate Microsoft Teams with Jenkins using a webhook via the Office 365 Connector plugin.</p><h3>Step 1: Create a Channel and Webhook in Microsoft Teams.</h3><p>1. Open <strong>**Microsoft Teams**</strong>.</p><p>2. Create a <strong>**channel**</strong> where you want to receive Jenkins notifications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yuQbLjM7SsYAfBplulJEhA.png" /></figure><p>3. Click on <strong>**Manage Channel**</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fQSkY120Kfidx-yiH9jKdQ.png" /></figure><p>4. Go to <strong>**Settings**</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7zSPqOvKnDr9bLij6OHRwQ.png" /></figure><p>5. Click on <strong>**Connectors**</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fZvOFuMy9gIPjnFlNufaxQ.png" /></figure><p>6. In the list of connectors, locate <strong>**Jenkins Connector**</strong> and click on <strong>**Configure**</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FlDX1hZXXTX0aR7XhwEG_w.png" /></figure><p>7. Enter a name for your Jenkins connection and click <strong>**Create**</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_vyFgqxjVeSdGaq9p-6Z1w.png" /></figure><p>8. After creation, a process appears to set up the <strong>**Webhook URL**</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rs5aI1uKu7Hhno_MyZ12ig.png" /></figure><p>9. Follow the instructions shown and <strong>**copy the Webhook URL**</strong> for use in Jenkins.</p><h3>Step 2: Configure Jenkins to Use Microsoft Teams Webhook</h3><ol><li><strong>**Log into Jenkins**</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kqmOHkT4CRJFnngpGJX8Rg.png" /></figure><p>2. From the Jenkins dashboard, click on <strong>**Manage Jenkins**</strong> in the left-hand menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rfb2pl58053Y9dCw1_xI0g.png" /></figure><p>3. Click on <strong>**Manage Plugins**</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZrxfYtx-t-SmmZHD5Azfrg.png" /></figure><p>4. Go to the <strong>**Available**</strong> tab.</p><p>5. Search for <strong>**Office 365 Connector**</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ivDvx4mEzuy-J6Jh9hdfng.png" /></figure><p>6. Check the box and click <strong>**Install without restart**</strong>.</p><h3>Step 3: Add the Webhook to a Jenkins Project</h3><p>1. Go to your desired <strong>**Jenkins project**</strong>.</p><p>2. Click on the <strong>**Configure**</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X26NMw2spwlVVKnEYSFv5Q.png" /></figure><p>3. Navigate to the <strong>**Office 365 Connector**</strong> tab.</p><p>4. Click on <strong>**Add Webhook**</strong>.</p><p>5. <strong>**Paste the copied webhook URL**</strong> into the URL field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QsowP5Bdljxl8N-R3-BKog.png" /></figure><p>6. Check all the event checkboxes for which you want to receive notifications (e.g., job started, job completed, etc.).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e5VTpDf0ntj7lZ7SNpNszQ.png" /></figure><p>7. Click the <strong>**Save**</strong> button to finalize.</p><h3>Result</h3><p>Jenkins is now integrated with Microsoft Teams. Notifications will be posted to the specified channel based on the selected events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lEtHSfq-q_Oxt646LFWFcQ.png" /></figure><h3>Notes</h3><p>* Make sure your Jenkins server has internet access to post messages to Teams.</p><p>* Ensure the correct permissions are granted in both Jenkins and Teams.</p><p>* You can repeat the webhook setup for other projects as needed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83038f7130d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>